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

libcontainer: Don't set container state to running when exec'ing #1771

Merged
merged 1 commit into from
Apr 3, 2018

Conversation

sboeuf
Copy link
Contributor

@sboeuf sboeuf commented Mar 30, 2018

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]

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]>
@sboeuf
Copy link
Contributor Author

sboeuf commented Mar 30, 2018

@mrunalp is there any test I can run to make sure this does not break some expected behavior ?

@crosbymichael
Copy link
Member

I'll run this patch on the containerd stress test server and see if we have any issues.

@sboeuf
Copy link
Contributor Author

sboeuf commented Mar 30, 2018

Thank you @crosbymichael !

@crosbymichael
Copy link
Member

I'll let it run all weekend and let you know. so far so good as far as identifying any regressions on the runc consumer side.

@sboeuf
Copy link
Contributor Author

sboeuf commented Mar 30, 2018

@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.
Thank you !

@mrunalp
Copy link
Contributor

mrunalp commented Mar 31, 2018

Looks fine 👍 will wait for the test results :)

@sboeuf
Copy link
Contributor Author

sboeuf commented Apr 2, 2018

@crosbymichael any results ?

@crosbymichael
Copy link
Member

No issues

@crosbymichael
Copy link
Member

crosbymichael commented Apr 3, 2018

LGTM

Approved with PullApprove

@sboeuf
Copy link
Contributor Author

sboeuf commented Apr 3, 2018

Cool :)

@sboeuf
Copy link
Contributor Author

sboeuf commented Apr 3, 2018

@mrunalp PTAL

@mrunalp
Copy link
Contributor

mrunalp commented Apr 3, 2018

LGTM

Approved with PullApprove

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.

3 participants