mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
remove duplicated check of device path in aws attacher
This commit is contained in:
parent
b7100f1ee7
commit
edd66c9bdf
@ -168,19 +168,15 @@ func (attacher *awsElasticBlockStoreAttacher) WaitForAttach(spec *volume.Spec, d
|
|||||||
select {
|
select {
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
glog.V(5).Infof("Checking AWS Volume %q is attached.", volumeID)
|
glog.V(5).Infof("Checking AWS Volume %q is attached.", volumeID)
|
||||||
if devicePath != "" {
|
devicePaths := getDiskByIdPaths(aws.KubernetesVolumeID(volumeSource.VolumeID), partition, devicePath)
|
||||||
devicePaths := getDiskByIdPaths(aws.KubernetesVolumeID(volumeSource.VolumeID), partition, devicePath)
|
path, err := verifyDevicePath(devicePaths)
|
||||||
path, err := verifyDevicePath(devicePaths)
|
if err != nil {
|
||||||
if err != nil {
|
// Log error, if any, and continue checking periodically. See issue #11321
|
||||||
// Log error, if any, and continue checking periodically. See issue #11321
|
glog.Errorf("Error verifying AWS Volume (%q) is attached: %v", volumeID, err)
|
||||||
glog.Errorf("Error verifying AWS Volume (%q) is attached: %v", volumeID, err)
|
} else if path != "" {
|
||||||
} else if path != "" {
|
// A device path has successfully been created for the PD
|
||||||
// A device path has successfully been created for the PD
|
glog.Infof("Successfully found attached AWS Volume %q.", volumeID)
|
||||||
glog.Infof("Successfully found attached AWS Volume %q.", volumeID)
|
return path, nil
|
||||||
return path, nil
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
glog.V(5).Infof("AWS Volume (%q) is not attached yet", volumeID)
|
|
||||||
}
|
}
|
||||||
case <-timer.C:
|
case <-timer.C:
|
||||||
return "", fmt.Errorf("Could not find attached AWS Volume %q. Timeout waiting for mount paths to be created.", volumeID)
|
return "", fmt.Errorf("Could not find attached AWS Volume %q. Timeout waiting for mount paths to be created.", volumeID)
|
||||||
|
Loading…
Reference in New Issue
Block a user