← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1340159] Re: Resize to zero disk flavor is not allowed

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => juno-3

-- 
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):
  Fix Released

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


References