Skip to content

Commit

Permalink
bug hunting
Browse files Browse the repository at this point in the history
Signed-off-by: Eddie Torres <[email protected]>
  • Loading branch information
torredil committed Nov 1, 2023
1 parent bddbe0b commit abaefe0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cloud/cloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,11 @@ func (c *cloud) WaitForAttachmentState(ctx context.Context, volumeID, expectedSt
// attached as /dev/xvdbb, where it was attached before and it was already detached.
// Retry couple of times, hoping AWS starts reporting the right status.
device := aws.StringValue(attachment.Device)
if expectedDevice != "" && device != "" && device != expectedDevice {
if device != expectedDevice {
if expectedState == volumeDetachedState && attachmentState == volumeDetachedState {
attachment = nil
return true, nil
}
klog.InfoS("Expected device for volume not found", "expectedDevice", expectedDevice, "expectedState", expectedState, "volumeID", volumeID, "device", device, "attachmentState", attachmentState)
return false, nil
}
Expand Down

0 comments on commit abaefe0

Please sign in to comment.