Append rootfs mount to containerdisk base path
This is needed to support the devicemapper filesystem backend. The disk
path should include the '/.../rootfs' part.
@@ -236,7 +236,7 @@ func (m *mounter) Mount(vmi *v1.VirtualMachineInstance, verify bool) error {
if err != nil {
return fmt.Errorf("failed to detect root mount point of containerDisk %v on the node: %v", volume.Name, err)
}
- sourceFile, err := containerdisk.GetImage(filepath.Join(nodeRes.MountRoot(), nodeMountInfo.Root, nodeMountInfo.MountPoint), volume.ContainerDisk.Path)
+ sourceFile, err := containerdisk.GetImage(filepath.Join(nodeRes.MountRoot(), nodeMountInfo.Root, nodeMountInfo.MountPoint, mountInfo.Root), volume.ContainerDisk.Path)
if err != nil {
return fmt.Errorf("failed to find a sourceFile in containerDisk %v: %v", volume.Name, err)
}
