Move mounting staging instance to a sub-path within staging path

This commit moves the mounting of a block volumes and filesystems
to a sub-file (already the case) or a sub-dir within the staging
path.

This enables using the staging path to store any additional data
regarding the mount. For example, this will be extended in the
future to store the fsid of the cluster, and maybe the pool name
to map unmap requests to the right image.

Also, this fixes the noted hack in the code, to determine in a
common manner if there is a mount on the passed in staging path.

Signed-off-by: ShyamsundarR <srangana@redhat.com>
This commit is contained in:
ShyamsundarR
2019-07-31 12:24:19 -04:00
committed by mergify[bot]
parent b812ec26df
commit 925bda2881
3 changed files with 33 additions and 42 deletions

View File

@ -200,7 +200,7 @@ func checkVolExists(rbdVol *rbdVolume, cr *util.Credentials) (bool, error) {
return false, err
}
klog.V(4).Infof("found existng volume (%s) with image name (%s) for request (%s)",
klog.V(4).Infof("found existing volume (%s) with image name (%s) for request (%s)",
rbdVol.VolID, rbdVol.RbdImageName, rbdVol.RequestName)
return true, nil