Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix pot internal state in start-cleanup #227

Merged
merged 1 commit into from
Sep 17, 2022

Conversation

grembo
Copy link
Collaborator

@grembo grembo commented Sep 16, 2022

This introduces a distinct state called "doa" (dead on arrival), which is also an allowed prerequisite
for going to state stopping.

@grembo grembo force-pushed the fix-start-cleanup-status branch from 310fa6c to ac2f870 Compare September 16, 2022 14:58
@grembo
Copy link
Collaborator Author

grembo commented Sep 16, 2022

Tested locally:

# grep ip= /opt/pot/jails/cloneme/conf/pot.conf
ip=lo0|garbage
# pot start cloneme
###>  No ipv4 address found for cloneme
error: Invalid value for '--host <host>': invalid IP address syntax
###>  cloneme failed to start
# cat /tmp/pot_status_cloneme
pot.status=stopped

@grembo
Copy link
Collaborator Author

grembo commented Sep 16, 2022

And of course:

# grep ip= /opt/pot/jails/cloneme/conf/pot.conf
ip=lo0|127.0.0.1
# pot start cloneme
===>  Starting the pot cloneme
ip6addrctl: socket(UDP): Protocol not supported
# cat /tmp/pot_status_cloneme 
pot.status=started

@grembo grembo requested a review from pizzamig September 16, 2022 15:03
@grembo grembo mentioned this pull request Sep 16, 2022
This introduces a distinct state called "doa" (dead on
arrival), which is also an allowed prerequisite
for going to state stopping.
@grembo grembo force-pushed the fix-start-cleanup-status branch from ac2f870 to fc1ca0e Compare September 16, 2022 16:03
@grembo
Copy link
Collaborator Author

grembo commented Sep 16, 2022

@pizzamig 0.15.2 maybe?

@pizzamig pizzamig merged commit 22e7e49 into bsdpot:master Sep 17, 2022
@pizzamig
Copy link
Collaborator

A different approach could be to remove the status file, in case of failure.
But it can add additional complexity and corner cases

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants