mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
fix#50150: azure disk mount failure on coreos
add log message
This commit is contained in:
parent
2425486b5e
commit
db3c5a7881
@ -77,6 +77,19 @@ func findDiskByLunWithConstraint(lun int, io ioHandler, azureDisks []string) (st
|
|||||||
if len(arr) < 4 {
|
if len(arr) < 4 {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
if len(azureDisks) == 0 {
|
||||||
|
glog.V(4).Infof("/dev/disk/azure is not populated, now try to parse %v directly", name)
|
||||||
|
target, err := strconv.Atoi(arr[0])
|
||||||
|
if err != nil {
|
||||||
|
glog.Errorf("failed to parse target from %v (%v), err %v", arr[0], name, err)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
// as observed, targets 0-3 are used by OS disks. Skip them
|
||||||
|
if target <= 3 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// extract LUN from the path.
|
// extract LUN from the path.
|
||||||
// LUN is the last index of the array, i.e. 1 in /sys/bus/scsi/devices/3:0:0:1
|
// LUN is the last index of the array, i.e. 1 in /sys/bus/scsi/devices/3:0:0:1
|
||||||
l, err := strconv.Atoi(arr[3])
|
l, err := strconv.Atoi(arr[3])
|
||||||
|
Loading…
Reference in New Issue
Block a user