mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #27893 from saad-ali/fixAwsEbsDevicePath
Automatic merge from submit-queue Fix device path used by volume WaitForAttach Fixes https://github.com/kubernetes/kubernetes/issues/27872 "AWS: problem mounting dynamic PVs"
This commit is contained in:
commit
ae1e194766
@ -121,6 +121,7 @@ func (nsu *nodeStatusUpdater) UpdateNodeStatuses() error {
|
|||||||
|
|
||||||
glog.V(3).Infof(
|
glog.V(3).Infof(
|
||||||
"Updating status for node %q succeeded. patchBytes: %q",
|
"Updating status for node %q succeeded. patchBytes: %q",
|
||||||
|
nodeName,
|
||||||
string(patchBytes))
|
string(patchBytes))
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
@ -575,11 +575,12 @@ func (oe *operationExecutor) generateMountVolumeFunc(
|
|||||||
if volumeAttacher != nil {
|
if volumeAttacher != nil {
|
||||||
// Wait for attachable volumes to finish attaching
|
// Wait for attachable volumes to finish attaching
|
||||||
glog.Infof(
|
glog.Infof(
|
||||||
"Entering MountVolume.WaitForAttach for volume %q (spec.Name: %q) pod %q (UID: %q).",
|
"Entering MountVolume.WaitForAttach for volume %q (spec.Name: %q) pod %q (UID: %q) DevicePath: %q",
|
||||||
volumeToMount.VolumeName,
|
volumeToMount.VolumeName,
|
||||||
volumeToMount.VolumeSpec.Name(),
|
volumeToMount.VolumeSpec.Name(),
|
||||||
volumeToMount.PodName,
|
volumeToMount.PodName,
|
||||||
volumeToMount.Pod.UID)
|
volumeToMount.Pod.UID,
|
||||||
|
volumeToMount.DevicePath)
|
||||||
|
|
||||||
devicePath, err := volumeAttacher.WaitForAttach(
|
devicePath, err := volumeAttacher.WaitForAttach(
|
||||||
volumeToMount.VolumeSpec, volumeToMount.DevicePath, waitForAttachTimeout)
|
volumeToMount.VolumeSpec, volumeToMount.DevicePath, waitForAttachTimeout)
|
||||||
@ -889,12 +890,13 @@ func (oe *operationExecutor) generateVerifyControllerAttachedVolumeFunc(
|
|||||||
for _, attachedVolume := range node.Status.VolumesAttached {
|
for _, attachedVolume := range node.Status.VolumesAttached {
|
||||||
if attachedVolume.Name == volumeToMount.VolumeName {
|
if attachedVolume.Name == volumeToMount.VolumeName {
|
||||||
addVolumeNodeErr := actualStateOfWorld.MarkVolumeAsAttached(
|
addVolumeNodeErr := actualStateOfWorld.MarkVolumeAsAttached(
|
||||||
volumeToMount.VolumeSpec, nodeName, volumeToMount.DevicePath)
|
volumeToMount.VolumeSpec, nodeName, attachedVolume.DevicePath)
|
||||||
glog.Infof("Controller successfully attached volume %q (spec.Name: %q) pod %q (UID: %q)",
|
glog.Infof("Controller successfully attached volume %q (spec.Name: %q) pod %q (UID: %q) devicePath: %q",
|
||||||
volumeToMount.VolumeName,
|
volumeToMount.VolumeName,
|
||||||
volumeToMount.VolumeSpec.Name(),
|
volumeToMount.VolumeSpec.Name(),
|
||||||
volumeToMount.PodName,
|
volumeToMount.PodName,
|
||||||
volumeToMount.Pod.UID)
|
volumeToMount.Pod.UID,
|
||||||
|
attachedVolume.DevicePath)
|
||||||
|
|
||||||
if addVolumeNodeErr != nil {
|
if addVolumeNodeErr != nil {
|
||||||
// On failure, return error. Caller will log and retry.
|
// On failure, return error. Caller will log and retry.
|
||||||
|
Loading…
Reference in New Issue
Block a user