-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[release-1.30] OCPBUGS-42276: Only restore container if all bind mounts are defined #8793
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
[release-1.30] OCPBUGS-42276: Only restore container if all bind mounts are defined #8793
Conversation
To avoid the situation where a container that is restored via a registry
mounts unexpected host paths into the container, this changes the
restore behaviour of CRI-O.
Previously all bind mounted paths in the original container which were
defined for example like this:
volumeMounts:
- mountPath: /data
name: data-volume
volumes:
- name: data-volume
hostPath:
path: /srv/container/data
Were automatically mounted in the restored container without and
definition necessary. This lead to the situation that the user does not
know which path will be mounted if starting a restored container.
Now CRI-O will refuse to restore a container if not all bind mounts are
defined via the CRI CreateContainer RPC in the CreateContainerRequest
message.
CRI-O will now return an error that will look something likes this:
Error: the container to restore (7f...be) expects following bind mounts defined (/data,/data2)
Now the user has to explicitly add those bind mounts in the same way as
it was done during initial container creation.
Signed-off-by: Adrian Reber <[email protected]>
Signed-off-by: Sascha Grunert <[email protected]>
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: kwilczynski, saschagrunert 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 |
7be0d22
into
cri-o:release-1.30
|
@kwilczynski: Jira Issue OCPBUGS-42276: All pull requests linked via external trackers have merged: Jira Issue OCPBUGS-42276 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
/jira refresh |
|
@kwilczynski: Jira Issue OCPBUGS-42276 is in an unrecognized state (ON_QA) and will not be moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
This is a manual cherry-pick of commit 429ef7c
/assign kwilczynski
Note
This cherry-pickl brings the following Pull Request as a dependency: