Commit a010950
authored
[cinder-csi-plugin] Fix ControllerGetVolume multi-cloud iteration bug (#3121)
In ControllerGetVolume, when multiple clouds are configured, the loop
iterates over all clouds without breaking on success. If the volume is
found in an earlier cloud but a subsequent cloud returns NotFound, the
err variable is overwritten and the function erroneously returns
NotFound despite having already located the volume.
Add a break statement after a successful GetVolume call to stop
iterating once the volume is found.
Signed-off-by: Walter Boring <waboring@hemna.com>1 parent 46c2161 commit a010950
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
952 | 952 | | |
953 | 953 | | |
954 | 954 | | |
| 955 | + | |
955 | 956 | | |
956 | 957 | | |
957 | 958 | | |
| |||
0 commit comments