Skip to content

Commit

Permalink
Correct attachedName nvme in one other place
Browse files Browse the repository at this point in the history
  • Loading branch information
sevagh committed Aug 11, 2019
1 parent 1eb1a2b commit 8d617d6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ebs.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,12 @@ func (e *EC2Instance) findEbsVolumes(tagPrefix string) ([]EbsVol, error) {
if *attachment.InstanceId != e.InstanceID {
return volumes, fmt.Errorf("Volume %s attached to different instance-id: %s", *volume.VolumeId, *attachment.InstanceId)
}
ebsVolume.AttachedName = *attachment.Device
attachedName := *attachment.Device
realAttachedName, err := filesystem.GetActualBlockDeviceName(attachedName)
if err != nil {
return volumes, fmt.Errorf("Couldn't get real device name of %s", attachedName)
}
ebsVolume.AttachedName = realAttachedName
}
} else {
ebsVolume.AttachedName = ""
Expand Down

0 comments on commit 8d617d6

Please sign in to comment.