This repository was archived by the owner on May 12, 2021. It is now read-only.
mounts: fix isSystemMount check for mountSharedDirMounts#1623
Merged
jodh-intel merged 1 commit intokata-containers:masterfrom May 9, 2019
Merged
mounts: fix isSystemMount check for mountSharedDirMounts#1623jodh-intel merged 1 commit intokata-containers:masterfrom
jodh-intel merged 1 commit intokata-containers:masterfrom
Conversation
This change updates the isSystemMount check for mountSharedDirMounts when setting up shared directory mounts for the container and uses the source of the mount instead of the destination for the check. We want to exclude system mounts from the host side as they shouldn't be mounted into the container. We do however want to allow system mounts within the container as denying them can prevent some containers from running properly. Fixes kata-containers#1591 Signed-off-by: Alex Price <aprice@atlassian.com>
Contributor
|
/test |
egernst
approved these changes
May 6, 2019
mcastelino
approved these changes
May 6, 2019
Contributor
mcastelino
left a comment
There was a problem hiding this comment.
LGTM This should work I think. I do not see any issue. /cc @amshinde ?
amshinde
reviewed
May 7, 2019
| // Skip mounting certain system paths from the source on the host side | ||
| // into the container as it does not make sense to do so. | ||
| // Example sources could be /sys/fs/cgroup etc. | ||
| if isSystemMount(m.Source) { |
Member
There was a problem hiding this comment.
@awprice Your comment makes sense, we do not mount certain system paths from the host side into the guest, however it makes sense to do so for system paths that are docker volumes and k8s empty dirs.
Contributor
Author
There was a problem hiding this comment.
We are using containerd, maybe we need to update the logic to handle docker volumes, k8s empty dirs and containerd volumes?
I don't think containerd volumes have been factored in here and that's probably why we are running into this issue, as we don't use docker.
amshinde
approved these changes
May 8, 2019
jodh-intel
approved these changes
May 9, 2019
|
Only the single centos CI failure which is known (#1604), so merging... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change updates the isSystemMount check for mountSharedDirMounts
when setting up shared directory mounts for the container and uses
the source of the mount instead of the destination for the check.
We want to exclude system mounts from the host side as they
shouldn't be mounted into the container.
We do however want to allow system mounts within the
container as denying them can prevent some containers from
running properly.
Fixes #1591
Signed-off-by: Alex Price aprice@atlassian.com