Skip to content

Commit c0cfecb

Browse files
authored
Merge pull request #9 from vngcloud/fixbug-mount-root-node
[fix] improve error handling in getDevicePath by providing detailed e…
2 parents 978e220 + 4b07e30 commit c0cfecb

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pkg/driver/node.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -758,10 +758,9 @@ func (s *nodeService) isMounted(_ string, target string) (bool, error) {
758758
}
759759

760760
func (s *nodeService) getDevicePath(volumeID string) (string, error) {
761-
var devicePath string
762761
devicePath, err := s.mounter.GetDevicePathBySerialID(volumeID)
763762
if err != nil {
764-
klog.Warningf("Couldn't get device path from mount: %v", err)
763+
return "", fmt.Errorf("failed to get device path for volume %s: %w", volumeID, err)
765764
}
766765

767766
return devicePath, nil

0 commit comments

Comments
 (0)