mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-28 14:07:14 +00:00
"Attach" function records information collation
This commit is contained in:
parent
2bad7e6be1
commit
84316ad559
@ -83,17 +83,17 @@ func (attacher *cinderDiskAttacher) Attach(spec *volume.Spec, nodeName types.Nod
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
// Log error and continue with attach
|
// Log error and continue with attach
|
||||||
glog.Warningf(
|
glog.Warningf(
|
||||||
"Error checking if volume (%q) is already attached to current node (%q). Will continue and try attach anyway. err=%v",
|
"Error checking if volume (%q) is already attached to current instance (%q). Will continue and try attach anyway. err=%v",
|
||||||
volumeID, instanceid, err)
|
volumeID, instanceid, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err == nil && attached {
|
if err == nil && attached {
|
||||||
// Volume is already attached to node.
|
// Volume is already attached to instance.
|
||||||
glog.Infof("Attach operation is successful. volume %q is already attached to node %q.", volumeID, instanceid)
|
glog.Infof("Attach operation is successful. volume %q is already attached to instance %q.", volumeID, instanceid)
|
||||||
} else {
|
} else {
|
||||||
_, err = attacher.cinderProvider.AttachDisk(instanceid, volumeID)
|
_, err = attacher.cinderProvider.AttachDisk(instanceid, volumeID)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
glog.Infof("Attach operation successful: volume %q attached to node %q.", volumeID, instanceid)
|
glog.Infof("Attach operation successful: volume %q attached to instance %q.", volumeID, instanceid)
|
||||||
} else {
|
} else {
|
||||||
glog.Infof("Attach volume %q to instance %q failed with %v", volumeID, instanceid, err)
|
glog.Infof("Attach volume %q to instance %q failed with %v", volumeID, instanceid, err)
|
||||||
return "", err
|
return "", err
|
||||||
|
Loading…
Reference in New Issue
Block a user