mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-04-23 23:29:52 -04:00
Before:
findDisk()
fcPathExp := "^(pci-.*-fc|fc)-0x" + wwn + "-lun-" + lun
After:
findDisk()
fcPathExp := "^(pci-.*-fc|fc)-0x" + wwn + "-lun-" + lun + "$"
fc path may have the same wwns but different luns.for example:
pci-0000:41:00.0-fc-0x500a0981891b8dc5-lun-1
pci-0000:41:00.0-fc-0x500a0981891b8dc5-lun-12
Function findDisk() may mismatch the fc path, return the wrong device and wrong associated devicemapper parent.
This may cause a disater that pods attach wrong disks. Accutally it happended in my testing environment before.
|
||
|---|---|---|
| .. | ||
| attacher.go | ||
| disk_manager.go | ||
| doc.go | ||
| fc.go | ||
| fc_test.go | ||
| fc_util.go | ||
| fc_util_test.go | ||
| OWNERS | ||