[openstack-dev] [nova] Checking before delete flavor?

Alex Xu xuhj at linux.vnet.ibm.com
Mon Jan 27 09:41:49 UTC 2014


On 2014?01?26? 20:05, Rui Chen wrote:
> Hi Stackers:
>
> Some instance operations and flavor are closely connected, for 
> example, resize.
> If I delete the flavor when resize instance, instance will be error. 
> Like this:
>
> 1. run instance with flavor A
> 2. resize instance from flavor A to flavor B
> 3. delete flavor A
> 4. resize-revert instance
> 5. instance state into error

Hi, Rui Chen, In last code, resize-revert will return status code 400 
and with message about flavor not found in this case.
https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/servers.py#L1101
Which version openstack you are running?

Thanks
>
> Which following ways we think is a better? or you have another way?
>
> 1. List instance filter by flavor A, verify that no instance 
> associated with flavor A, then delete flavor A
> 2. Delete flavor A, if instance state into error, reset instance state 
> to active
>
> General how do?
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20140127/bbb8692b/attachment.html>


More information about the OpenStack-dev mailing list