mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-24 10:41:43 +00:00
Merge pull request #1623 from awprice/system-mount-skip
mounts: fix isSystemMount check for mountSharedDirMounts
This commit is contained in:
commit
bb44f65a68
@ -519,10 +519,11 @@ func (c *Container) mountSharedDirMounts(hostSharedDir, guestSharedDir string) (
|
|||||||
var sharedDirMounts []Mount
|
var sharedDirMounts []Mount
|
||||||
var ignoredMounts []Mount
|
var ignoredMounts []Mount
|
||||||
for idx, m := range c.mounts {
|
for idx, m := range c.mounts {
|
||||||
if isSystemMount(m.Destination) {
|
// Skip mounting certain system paths from the source on the host side
|
||||||
if !(IsDockerVolume(m.Source) || Isk8sHostEmptyDir(m.Source)) {
|
// into the container as it does not make sense to do so.
|
||||||
continue
|
// Example sources could be /sys/fs/cgroup etc.
|
||||||
}
|
if isSystemMount(m.Source) {
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if m.Type != "bind" {
|
if m.Type != "bind" {
|
||||||
|
Loading…
Reference in New Issue
Block a user