mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 05:21:58 +00:00
rdb util: AttachDisk: Skip unnecessary call for waitforpath
Skip unnecessary call to waitforpath if found = true during the first call.
This commit is contained in:
parent
e88593d788
commit
ab01a22fef
@ -237,13 +237,13 @@ func (util *RBDUtil) AttachDisk(b rbdBuilder) error {
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
devicePath, found = waitForPath(b.Pool, b.Image, 10)
|
||||
if !found {
|
||||
return errors.New("Could not map image: Timeout after 10s")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
devicePath, found = waitForPath(b.Pool, b.Image, 10)
|
||||
if !found {
|
||||
return errors.New("Could not map image: Timeout after 10s")
|
||||
}
|
||||
}
|
||||
// mount it
|
||||
globalPDPath := b.manager.MakeGlobalPDName(*b.rbd)
|
||||
|
Loading…
Reference in New Issue
Block a user