Comment 1 for bug 779304

Revision history for this message
Ken Pepple (ken-pepple) wrote :

Graham:

Don't take this as "don't do this", but more as "be careful how you handle this" ...

I intentionally left the "U" out the CRUD actions for instance_types/flavors due to the implications for billing and instance=>instance_type foreign key lookups. As instances can be quite long lived (many EC2 instances have been running for 1+ years), maintaining the integrity of the "launched instance_type" to current instance's instance_type mapping is pretty important. While it is a pain (to do the delete --purge and then create), it saves from some potentially tricky logical problems down the road ...

Perhaps as a compromise, could your update look like the "nova-manage instance_type update x1.large xxx xxx ..." and behind the covers it simply marks the current x1.large deleted and creates a new x1.large ? Not sure if this works for flavors (might be unique keys) ... but it would preserve the logic.

You can read more on the original blueprint for the feature (with use cases)
http://wiki.openstack.org/ConfigureInstanceTypesDynamically

or my blog post:
http://ken.pepple.info/openstack/2011/03/03/Configurable-Instance-Types-For-OpenStack-Nova/