mirror of https://github.com/k3s-io/k3s
![]() Automatic merge from submit-queue (batch tested with PRs 64645, 66832). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Detect if GCE PD udev link is wrong and try to correct it **What this PR does / why we need it**: udev can miss scsi events and not update device links properly when disks are detached and reattached to the same node in a different order. This PR workarounds the issue by comparing the udev link name, which is the PD disk name, with the scsi disk serial number returned from scsi_id, and prevents mounting of the disk if the link is wrong. It will also run `udevadm trigger` on the disk to try to correct the bad link. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note This fix prevents a GCE PD volume from being mounted if the udev device link is stale and tries to correct the link. ``` |
||
---|---|---|
.. | ||
utils | ||
vsphere | ||
BUILD | ||
OWNERS | ||
csi_objects.go | ||
csi_volumes.go | ||
empty_dir_wrapper.go | ||
ephemeral_volume.go | ||
flexvolume.go | ||
generic_persistent_volume-disruptive.go | ||
mounted_volume_resize.go | ||
nfs_persistent_volume-disruptive.go | ||
pd.go | ||
persistent_volumes-gce.go | ||
persistent_volumes-local.go | ||
persistent_volumes-volumemode.go | ||
persistent_volumes.go | ||
pv_protection.go | ||
pvc_protection.go | ||
regional_pd.go | ||
subpath.go | ||
volume_expand.go | ||
volume_io.go | ||
volume_metrics.go | ||
volume_provisioning.go | ||
volumes.go |