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

Allow 'container restore' with '--ipc host' #12088

Conversation

adrianreber
Copy link
Collaborator

Trying to restore a container that was started with '--ipc host' fails with:

Error: error creating container storage: ProcessLabel and Mountlabel must either not be specified or both specified

We already fixed this exact same error message for containers started with '--privileged'. The previous fix was to check if the to be restored container is a privileged container (c.config.Privileged). Unfortunately this does not work for containers started with '--ipc host'.

This commit changes the check for a privileged container to check if both the ProcessLabel and the MountLabel is actually set and only then re-uses those labels.

Fixes: #12042

@mheon
Copy link
Member

mheon commented Oct 25, 2021

CI is asking that you add a test, or add [NO NEW TESTS NEEDED] to your commit message.

@rhatdan PTAL

@rhatdan
Copy link
Member

rhatdan commented Oct 25, 2021

LGTM
Either add a test if possible, or just add [NO NEW TESTS NEEDED] flag.

@TomSweeneyRedHat
Copy link
Member

LGTM
assuming happy tests

Trying to restore a container that was started with '--ipc host' fails
with:

Error: error creating container storage: ProcessLabel and Mountlabel must either not be specified or both specified

We already fixed this exact same error message for containers started
with '--privileged'. The previous fix was to check if the to be restored
container is a privileged container (c.config.Privileged). Unfortunately
this does not work for containers started with '--ipc host'.

This commit changes the check for a privileged container to check if
both the ProcessLabel and the MountLabel is actually set and only then
re-uses those labels.

Signed-off-by: Adrian Reber <[email protected]>
@adrianreber adrianreber force-pushed the 2021-10-25-fix-label-ipc-host branch from 515b16b to bf8fd94 Compare October 26, 2021 14:42
@adrianreber
Copy link
Collaborator Author

Just added a test. Let's see if CI likes it.

@rhatdan
Copy link
Member

rhatdan commented Oct 26, 2021

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Oct 26, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Oct 26, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: adrianreber, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 26, 2021
@openshift-merge-robot openshift-merge-robot merged commit 420ac5d into containers:main Oct 26, 2021
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when importing a checkpoint of a container with --ipc host
5 participants