yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #17121
[Bug 1340159] [NEW] Resize to zero disk flavor is not allowed
Public bug reported:
When old flavor's root_gb is not equal 0 and new flavor's root_gb is 0,
the resize() in nova.compute.api will raise CannotResizeDisk.
https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2368
def resize(self, context, instance, flavor_id=None,
if not flavor_id:
LOG.debug("flavor_id is None. Assuming migration.",
instance=instance)
new_instance_type = current_instance_type
else:
new_instance_type = flavors.get_flavor_by_flavor_id(
flavor_id, read_deleted="no")
if (new_instance_type.get('root_gb') == 0 and
current_instance_type.get('root_gb') != 0):
reason = _('Resize to zero disk flavor is not allowed.')
raise exception.CannotResizeDisk(reason=reason)
** Affects: nova
Importance: Undecided
Assignee: Shuangtai Tian (shuangtai-tian)
Status: In Progress
** Changed in: nova
Assignee: (unassigned) => Shuangtai Tian (shuangtai-tian)
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1340159
Title:
Resize to zero disk flavor is not allowed
Status in OpenStack Compute (Nova):
In Progress
Bug description:
When old flavor's root_gb is not equal 0 and new flavor's root_gb is
0, the resize() in nova.compute.api will raise CannotResizeDisk.
https://github.com/openstack/nova/blob/master/nova/compute/api.py#L2368
def resize(self, context, instance, flavor_id=None,
if not flavor_id:
LOG.debug("flavor_id is None. Assuming migration.",
instance=instance)
new_instance_type = current_instance_type
else:
new_instance_type = flavors.get_flavor_by_flavor_id(
flavor_id, read_deleted="no")
if (new_instance_type.get('root_gb') == 0 and
current_instance_type.get('root_gb') != 0):
reason = _('Resize to zero disk flavor is not allowed.')
raise exception.CannotResizeDisk(reason=reason)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1340159/+subscriptions
Follow ups
References