mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
add csi volume device mount path to csi plugin
Signed-off-by: Huamin Chen <hchen@redhat.com>
This commit is contained in:
@ -55,7 +55,7 @@ func (ns *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
|
||||
} else {
|
||||
// Get volName from targetPath
|
||||
if !strings.HasSuffix(targetPath, "/mount") {
|
||||
return nil, fmt.Errorf("rnd: malformed the value of target path: %s", targetPath)
|
||||
return nil, fmt.Errorf("rbd: malformed the value of target path: %s", targetPath)
|
||||
}
|
||||
s := strings.Split(strings.TrimSuffix(targetPath, "/mount"), "/")
|
||||
volName = s[len(s)-1]
|
||||
|
Reference in New Issue
Block a user