disk_available_least become a negative value unexpectedly
Bug #1758278 reported by
yangjie
This bug report is a duplicate of:
Bug #1739646: Instance type with disk set to 0 can cause DoS.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
New
|
Undecided
|
Unassigned |
Bug Description
The value of disk_available_
When user try to boot a image-based vm using a flavor with 0 GB disk size, Nova use the virtual size from image property to replace the '0' size to create disk file in instance folder.
This virtual size from image property make the value of disk_available_
Maybe we should forbid the creation of a image-based vm from flavor with zero disk size, and throw out a HTTP exception in Nova API.
Thanks for raising this. Normally, when I think of a flavor with 0 GB disk size, I'm thinking of boot-from-volume. And we don't see the disk_available_ least negative problem with boot-from-volume because there is no image associated and thus disk_available_ least won't take any virtual size from an image property to create any files (boot-from-volume won't create any disk file at all). Is that right?
It seems like it would be reasonable to disallow server create of an image-based server with a 0 GB disk size flavor, but I think we would have to add a new microversion if we did it because it would change the behavior for those that might be booting image-based instances with 0 GB disk flavors and have been okay with negative disk_available_ least. Those requests that used to go through would become rejected.