mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #62168 from piontec/hotfix/fix-rbd-nbd
Automatic merge from submit-queue (batch tested with PRs 62043, 62168). 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>. fix typo that redefines variable and breaks code **What this PR does / why we need it**: Fixes bug in `rbd_util.go`, where a variable is overriden in `if` scope. **Which issue(s) this PR fixes** Fixes #32266 **Special notes for your reviewer**: This is related to the PR: https://github.com/kubernetes/kubernetes/pull/58916 This can not work, as the variable `nbdToolsFound` is changed only in local scope of `if` and is always `false` outside. **Release note**: ```release-note Fixes bug in rbd-nbd utility when rbd is used. ```
This commit is contained in:
commit
051195be12
@ -374,7 +374,7 @@ func (util *RBDUtil) AttachDisk(b rbdMounter) (string, error) {
|
||||
nbdToolsFound := false
|
||||
|
||||
if !mapped {
|
||||
nbdToolsFound := checkRbdNbdTools(b.exec)
|
||||
nbdToolsFound = checkRbdNbdTools(b.exec)
|
||||
if nbdToolsFound {
|
||||
devicePath, mapped = waitForPath(b.Pool, b.Image, 1 /*maxRetries*/, true /*useNbdDriver*/)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user