lxd icon indicating copy to clipboard operation
lxd copied to clipboard

Improve VM shutdown

Open hamistao opened this issue 1 year ago • 2 comments

Includes cherry picks from https://github.com/lxc/incus/pull/362

hamistao avatar Aug 05 '24 12:08 hamistao

@hamistao ready for review?

tomponline avatar Aug 06 '24 07:08 tomponline

@tomponline This is still missing working tests for 129 exit code in containers, as there weren't any before. I am still busy with the API metrics but I will return to this as soon as I finish the changes on the metrics PR.

hamistao avatar Aug 06 '24 12:08 hamistao

@hamistao ready for a review, is there an accompanying test for this in lxd-ci?

tomponline avatar Sep 05 '24 09:09 tomponline

@mihalicyn Thanks for the review, but my main question was regarding the failing tests. Although the VM case is currently working as expected, container disconnections result in a 137 exit code instead of 129 on my local tests. I wanted to confirm if this behavior can be considered a bug and if just catching this exit code and changing it to 129 would be an adequate solution or if there could be a deeper problem involved.

Also, the GH tests behave differentely from my local tests and return a 143 exit code, @simondeziel discovered that this exit code is also what we get when killing the agent process inside the instance to make it disconnect.

hamistao avatar Sep 05 '24 11:09 hamistao

@tomponline This is ready for a review, the PR containing the tests was also opened here. When both are merged I will also add tests for containers on the LXD repo.

hamistao avatar Sep 06 '24 20:09 hamistao