Skip to content

Conversation

@swiftveteran
Copy link

When a container is stopped and immediately restarted, the autoRemove cleanup could race with the restart and delete the container.

  • Add wait loop in ContainerStart for containers in stopping state
  • Skip cleanup when bootstrap fails due to sandbox shutting down
  • Add test for rapid stop+start scenario

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Motivation and Context

When a container with autoRemove is stopped and immediately restarted, the cleanup task could race with the restart and delete the container unexpectedly. ContainerStart now waits for containers in stopping state before proceeding, and bootstrap failures due to sandbox shutdown no longer trigger container deletion. Includes a test covering the rapid stop+start scenario.

Testing

  • Tested locally
  • Added/updated tests
  • Added/updated docs

When a container is stopped and immediately restarted, the autoRemove
cleanup could race with the restart and delete the container.

- Add wait loop in ContainerStart for containers in stopping state
- Skip cleanup when bootstrap fails due to sandbox shutting down
- Add test for rapid stop+start scenario
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

Successfully merging this pull request may close these issues.

1 participant