mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
bugfix
This commit is contained in:
@@ -203,7 +203,7 @@ func (self *SRegion) GetImageStatus(imageId string) (ImageStatusType, error) {
|
||||
func getRootDiskSize(image *ec2.Image) (int, error) {
|
||||
rootDeivce := *image.RootDeviceName
|
||||
for _, volume := range image.BlockDeviceMappings {
|
||||
if *volume.DeviceName == rootDeivce {
|
||||
if len(rootDeivce) > 0 && *volume.DeviceName == rootDeivce {
|
||||
return int(*volume.Ebs.VolumeSize), nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user