Open
Description
// The path to which the volume MAY be staged. It MUST be an
// absolute path in the root filesystem of the process serving this
// request, and MUST be a directory. The CO SHALL ensure that there
// is only one `staging_target_path` per volume. The CO SHALL ensure
// that the path is directory and that the process serving the
// request has `read` and `write` permission to that directory. The
// CO SHALL be responsible for creating the directory if it does not
// exist.
// This is a REQUIRED field.
string staging_target_path = 3;
The Staging target path is carved out by CO and passed to SP. From the spec it is not clear that, whether the SP has to stage a volume on this target path only.
Is it mandatory ?
If it is not mandatory, I see there are couple of issues.
-
The SP dont have a mechanism to pass the
new
target path to CO viaNodeStageVolumeResponse
. -
The cleanup operation of stage volume actually happens on the path provided by CO ( ex: Kubernetes) . Here I am referring to
removeMountDir
code in kubernetes.
func removeMountDir(plug *csiPlugin, mountPath string) error {
klog.V(4).Info(log("removing mount path [%s]", mountPath))
....
if !mnt {
klog.V(4).Info(log("dir not mounted, deleting it [%s]", mountPath))
if err := os.Remove(mountPath); err != nil && !os.IsNotExist(err) {
return errors.New(log("failed to remove dir [%s]: %v", mountPath, err))
}
....
Any thoughts ?
Metadata
Metadata
Assignees
Labels
No labels