-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
libcontainer: Don't set container state to running when exec'ing #1771
Conversation
There is no reason to set the container state to "running" as a temporary value when exec'ing a process on a container in "created" state. The problem doing this is that consumers of the libcontainer library might use it by keeping pointers in memory. In this case, the container state will indicate that the container is running, which is wrong, and this will end up with a failure on the next action because the check for the container state transition will complain. Fixes opencontainers#1767 Signed-off-by: Sebastien Boeuf <[email protected]>
@mrunalp is there any test I can run to make sure this does not break some expected behavior ? |
I'll run this patch on the containerd stress test server and see if we have any issues. |
Thank you @crosbymichael ! |
I'll let it run all weekend and let you know. so far so good as far as identifying any regressions on the |
@crosbymichael that's great, I really don't want to break anything and such testing seems very appropriate to confirm if we can merge this. |
Looks fine 👍 will wait for the test results :) |
@crosbymichael any results ? |
No issues |
Cool :) |
@mrunalp PTAL |
There is no reason to set the container state to "running" as a
temporary value when exec'ing a process on a container in "created"
state. The problem doing this is that consumers of the libcontainer
library might use it by keeping pointers in memory. In this case,
the container state will indicate that the container is running, which
is wrong, and this will end up with a failure on the next action
because the check for the container state transition will complain.
Fixes #1767
Signed-off-by: Sebastien Boeuf [email protected]