Comment 7 for bug 1790204

Revision history for this message
Matt Riedemann (mriedem) wrote :

Another tricky thing to keep in mind is the new flavor is used to update the instance.vcpus and instance.memory_mb values:

https://github.com/openstack/nova/blob/905e25a63d3ba25cfbdf492891ac8864fed609ab/nova/compute/manager.py#L4419

https://github.com/openstack/nova/blob/905e25a63d3ba25cfbdf492891ac8864fed609ab/nova/compute/manager.py#L4472

And those are used when counting quotas:

https://github.com/openstack/nova/blob/905e25a63d3ba25cfbdf492891ac8864fed609ab/nova/objects/instance.py#L1527

I'm not sure that directly affects the allocations really since it's different data in a different database, but reminds me that this might have implications if we start counting quota usage from placement:

https://review.openstack.org/#/c/509042

Although with that proposal we're counting usage from the project_id, not the consumer, so as long as the migration/instance consumer allocations for that project are accurate (max of old/new flavors) we should be OK.