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

Always save own namespace paths #1477

Merged
merged 1 commit into from
Aug 2, 2017

Conversation

yummypeng
Copy link

fix #1476

If containerA shares namespace, say ipc namespace, with containerB, then
its ipc namespace path would be the same as containerB and be stored in
state.json. Exec into containerA will just read the namespace paths
stored in this file and join these namespaces. So, if containerB has
already been stopped, docker exec containerA will fail.

To address this issue, we should always save own namespace paths no
matter if we share namespaces with other containers.

Signed-off-by: Yuanhong Peng pengyuanhong@huawei.com

@hqhq
Copy link
Contributor

hqhq commented Jul 13, 2017

Is CI failure relevant?

fix opencontainers#1476

If containerA shares namespace, say ipc namespace, with containerB, then
its ipc namespace path would be the same as containerB and be stored in
`state.json`. Exec into containerA will just read the namespace paths
stored in this file and join these namespaces. So, if containerB has
already been stopped, `docker exec containerA` will fail.

To address this issue, we should always save own namespace paths no
matter if we share namespaces with other containers.

Signed-off-by: Yuanhong Peng <pengyuanhong@huawei.com>
@yummypeng
Copy link
Author

@hqhq I have modified the testcase, and now CI is green.

@hqhq
Copy link
Contributor

hqhq commented Jul 13, 2017

LGTM

Approved with PullApprove

@yummypeng
Copy link
Author

ping @opencontainers/runc-maintainers PTAL

@yummypeng
Copy link
Author

ping @cyphar PTAL 😜

@dqminh
Copy link
Contributor

dqminh commented Aug 2, 2017

LGTM

Approved with PullApprove

@dqminh dqminh merged commit b313a75 into opencontainers:master Aug 2, 2017
runcom added a commit to projectatomic/runc that referenced this pull request Nov 12, 2017
Fix https://bugzilla.redhat.com/show_bug.cgi?id=1510573
Upstream reference: opencontainers/runc#1477

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
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.

docker exec failed if shared ipc namespace container was stopped
3 participants