disk_available_least become a negative value unexpectedly

Bug #1758278 reported by yangjie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
New
Undecided
Unassigned

Bug Description

The value of disk_available_least become negative unexpectedly, because we allow to boot a image-based vm using a flavor with 0 GB disk size.
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_least inconsistent with flavor-based estimate. It makes user confused sometimes.
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.

Tags: api compute
yangjie (yang.jie)
description: updated
melanie witt (melwitt)
tags: added: api compute
Revision history for this message
melanie witt (melwitt) wrote :

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.

Revision history for this message
yangjie (yang.jie) wrote :

Thanks for your reply. I think booting an image-based server with a 0 GB disk size flavor means we have skipped the disk filter and quota check. If the image virtual size makes the value of disk_available_least negative, the creation of this server should not pass the disk filter. Even we do not change the behavior of nova-api, we should use the actual disk size to schedule compute nodes and claim resource.

Revision history for this message
Jeremy Stanley (fungi) wrote :

This is likely a duplicate of (previously private) bug 1739646.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.