mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #41289 from ferdinandhuebner/fix-cinder-udevadm-exec
Automatic merge from submit-queue (batch tested with PRs 41312, 41289) resolve udevadm from PATH in cinder_util.go **What this PR does / why we need it**: When a cinder volume gets attached to a node, the cinder volume plugin calls `udevadm` with an absolute path `/usr/bin/udevadm`. This path is incorrect for recent versions of debian, ubuntu or the hyperkube image on gcr.io where `udevadm` is located at `/bin/udevadm` or `/sbin/udevadm`. A variant of the hyperkube image is used on CoreOS to run kubelet with rkt fly stage 1. As a result of the failed `udevadm` exec, the `AttachDisk` function in `cinder_util.go` returns an error. This PR removes the absolute path from the `udevadm` exec. As a result, `udevadm` is resolved by looking it up in `PATH`. This is consistent with the gce volume plugin, which executes `udevadm` the same way. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #29832 **Special notes for your reviewer**: **Release note**: ```release-note ```
This commit is contained in:
commit
06e2a0820e
@ -180,7 +180,7 @@ func probeAttachedVolume() error {
|
||||
|
||||
executor := exec.New()
|
||||
args := []string{"trigger"}
|
||||
cmd := executor.Command("/usr/bin/udevadm", args...)
|
||||
cmd := executor.Command("udevadm", args...)
|
||||
_, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
glog.Errorf("error running udevadm trigger %v\n", err)
|
||||
|
Loading…
Reference in New Issue
Block a user