Skip to content

Commit

Permalink
fix(region): Set default value if rootdisk's driver is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
rainzm committed May 15, 2020
1 parent 3530bca commit 4530564
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/compute/models/guests.go
Original file line number Diff line number Diff line change
Expand Up @@ -1187,6 +1187,9 @@ func (manager *SGuestManager) validateCreateData(
rootDiskConfig.SizeMb = sysMinDiskMB
}
}
if len(rootDiskConfig.Driver) == 0 {
rootDiskConfig.Driver = osProf.DiskDriver
}
log.Debugf("ROOT DISK: %#v", rootDiskConfig)
input.Disks[0] = rootDiskConfig
//data.Set("disk.0", jsonutils.Marshal(rootDiskConfig))
Expand Down

0 comments on commit 4530564

Please sign in to comment.