Skip to content

Commit

Permalink
Fix device path used by volume WaitForAttach
Browse files Browse the repository at this point in the history
  • Loading branch information
saad-ali committed Jun 22, 2016
1 parent b7ac841 commit dfe8e60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions pkg/controller/volume/statusupdater/node_status_updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ func (nsu *nodeStatusUpdater) UpdateNodeStatuses() error {

glog.V(3).Infof(
"Updating status for node %q succeeded. patchBytes: %q",
nodeName,
string(patchBytes))
}
return nil
Expand Down
12 changes: 7 additions & 5 deletions pkg/volume/util/operationexecutor/operation_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,11 +575,12 @@ func (oe *operationExecutor) generateMountVolumeFunc(
if volumeAttacher != nil {
// Wait for attachable volumes to finish attaching
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.VolumeSpec.Name(),
volumeToMount.PodName,
volumeToMount.Pod.UID)
volumeToMount.Pod.UID,
volumeToMount.DevicePath)

devicePath, err := volumeAttacher.WaitForAttach(
volumeToMount.VolumeSpec, volumeToMount.DevicePath, waitForAttachTimeout)
Expand Down Expand Up @@ -889,12 +890,13 @@ func (oe *operationExecutor) generateVerifyControllerAttachedVolumeFunc(
for _, attachedVolume := range node.Status.VolumesAttached {
if attachedVolume.Name == volumeToMount.VolumeName {
addVolumeNodeErr := actualStateOfWorld.MarkVolumeAsAttached(
volumeToMount.VolumeSpec, nodeName, volumeToMount.DevicePath)
glog.Infof("Controller successfully attached volume %q (spec.Name: %q) pod %q (UID: %q)",
volumeToMount.VolumeSpec, nodeName, attachedVolume.DevicePath)
glog.Infof("Controller successfully attached volume %q (spec.Name: %q) pod %q (UID: %q) devicePath: %q",
volumeToMount.VolumeName,
volumeToMount.VolumeSpec.Name(),
volumeToMount.PodName,
volumeToMount.Pod.UID)
volumeToMount.Pod.UID,
attachedVolume.DevicePath)

if addVolumeNodeErr != nil {
// On failure, return error. Caller will log and retry.
Expand Down

0 comments on commit dfe8e60

Please sign in to comment.