Skip to content
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

An interrupted service restart may leave services in the exited state #2257

Open
pipex opened this issue Mar 25, 2024 · 0 comments
Open

An interrupted service restart may leave services in the exited state #2257

pipex opened this issue Mar 25, 2024 · 0 comments

Comments

@pipex
Copy link
Contributor

pipex commented Mar 25, 2024

A service restart via the supervisor API endpoints

performs the following actions

  1. stop the container
  2. remove the container
  3. create the container with the same configuration as before
  4. start the newly created container

Because of the changes in #1926 if the supervisor gets stopped between steps 1 and 2, on restart, the service won't get restarted by the supervisor when applying the target state, and it won't be started by the engine since a stop request already took place

This might be solved by combining steps 1 and 2 by doing a remove with force: true when killing a container

pipex added a commit that referenced this issue May 8, 2024
When uninstalling a container for a restart from the API on when
moving between releases, this prefers to force remove the container
rather than stop then remove. This has the same effect in the end, but
force remove is an atomic call, meaning if the supervisor is killed
between the stop and remove, the engine will proceed with the operation
and the supervisor will know to recover from the target state after the
restart.

Change-type: patch
Relates-to: #2257
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant