mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-05 02:09:56 +00:00
AttachDisk should not call detach inside of Cinder volume provider
This PR fixes #50038 which removes the detach call inside of AttachDisk.
This commit is contained in:
parent
2c624e590f
commit
8ffc361564
@ -230,11 +230,9 @@ func (os *OpenStack) AttachDisk(instanceID, volumeID string) (string, error) {
|
|||||||
glog.V(4).Infof("Disk %s is already attached to instance %s", volumeID, instanceID)
|
glog.V(4).Infof("Disk %s is already attached to instance %s", volumeID, instanceID)
|
||||||
return volume.ID, nil
|
return volume.ID, nil
|
||||||
}
|
}
|
||||||
glog.V(2).Infof("Disk %s is attached to a different instance (%s), detaching", volumeID, volume.AttachedServerId)
|
errmsg := fmt.Sprintf("Disk %s is attached to a different instance (%s)", volumeID, volume.AttachedServerId)
|
||||||
err = os.DetachDisk(volume.AttachedServerId, volumeID)
|
glog.V(2).Infof(errmsg)
|
||||||
if err != nil {
|
return "", errors.New(errmsg)
|
||||||
return "", err
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
startTime := time.Now()
|
startTime := time.Now()
|
||||||
|
Loading…
Reference in New Issue
Block a user