-
Notifications
You must be signed in to change notification settings - Fork 933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Container: Match container disconnection with VMs #14075
Conversation
96cbab1
to
7e54870
Compare
Signed-off-by: hamistao <[email protected]>
Signed-off-by: hamistao <[email protected]>
7e54870
to
e0846d5
Compare
If I understand the meaning of those code, As such, I think this kind of information is valuable.
I think that's be preferable, indeed. |
@simondeziel may I assume your point being that I should add some of this info as comment on the code?
I would agree if not by the fact that we do not have direct access to the exit codes from VMs, so the best we could do is derive that the process was sigkilled based on the I should have mentioned this in the PR description as well, sorry about that. |
My interpretation of the exit code numbers is not based on reading the code, I'm just making an educated guess based on the information I gathered here an there. So I might be way off. Assuming my interpretation of those 3 different exit codes for containers is right, I think it's nice to have them to know what actually happened to the instance.
For the VM case, I see a few possible scenario:
For the user initiated ones, is there a different error being received (maybe For the LXD initiated ones, I think a clean shutdown sould be |
I think you are spot on!
This is the case, For example, I believe (not tested) that both a SIGHUP and SIGTERM cause a |
@tomponline If we are just going to keep the differences between VMs and containers, this PR can be closed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, yeah lets keep the extra container exit codes
Match container disconnection with VMs on
lxc exec
, making it return a 129 independentely on how the container disconnected.The previous behavior was getting a 137 if the container was stopped forcefully and either a 129 or 143 if it was stopped gracefully.
An alternative would be changing VMs to return a 137 when stopped forcefully as well and stardardize the clean stop case to 129.