Skip to content

Commit 2379742

Browse files
authored
Merge pull request #506 from yussufsh/test
Refactor some logs and mount get device name func
2 parents 356b891 + d6c2ce6 commit 2379742

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/driver/node.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,15 @@ func (d *nodeService) nodeUnstageVolume(req *csi.NodeUnstageVolumeRequest) error
295295
klog.V(5).Infof("found staged device: %s", deviceName)
296296

297297
// If mounted, then unmount the filesystem
298-
klog.V(5).Infof("starting unmounting %s", stagingTarget, "volumeID", volumeID)
298+
klog.V(5).Infof("starting unmounting %s for volumeID %s", stagingTarget, volumeID)
299299
err = d.mounter.Unmount(stagingTarget)
300300
if err != nil {
301301
return status.Errorf(codes.Internal, "failed to unmount for vol %s target %q: %v", volumeID, stagingTarget, err)
302302
}
303-
klog.V(5).Infof("completed unmounting %s", stagingTarget, "volumeID", volumeID)
303+
klog.V(5).Infof("completed unmounting %s for volumeID %s", stagingTarget, volumeID)
304304

305305
// Delete device
306-
klog.V(5).Infof("deleting device %s", deviceName, "volumeID", volumeID)
306+
klog.V(5).Infof("deleting device %s for volumeID %s", deviceName, volumeID)
307307
//check if device is mounted or has holders
308308
isDirMounted, err := d.mounter.IsMountPoint(stagingTarget)
309309
if err != nil {
@@ -391,7 +391,7 @@ func (d *nodeService) NodeExpandVolume(ctx context.Context, req *csi.NodeExpandV
391391
return nil, status.Errorf(codes.Internal, "volume path %s volumeID %s is not mounted", volumePath, volumeID)
392392
}
393393

394-
devicePath, _, err := mount.GetDeviceNameFromMount(d.mounter, volumePath)
394+
devicePath, _, err := d.mounter.GetDeviceName(volumePath)
395395
if err != nil {
396396
return nil, status.Errorf(codes.Internal, "failed to get device from volume path %s volumeID %s: %v", volumePath, volumeID, err)
397397
}

0 commit comments

Comments
 (0)