metadata change on flavor not migrated into DB after cold migrate

Bug #1791048 reported by Eric Kessels
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Opinion
Undecided
Unassigned

Bug Description

Hi,

When you change the meta-data on a flavor this change is not migrated into the nova table instance_extra. So when you change the flavor and you cold migrate the instance, it still uses the old meta-data spec set during initial creation.

The behaviour creates inconsistancy between flavor meta-data and instance meta-data.

In my opinion it should work the same as when you change meta-data on a volume type that when you migrate or live migrate the meta-data change is reflected to the objects meta-date.

To reproduce:

1. Create flavor with meta-data quota:disk_read_iops_sec value '4455667788' (easy to trace in mysql)
2. Launch instance (ephemeral disk).
3. The meta-data value is set in db=nova, table=instance_extra for the specific instance_uuid
4. Change meta-data quota:disk_read_iops_sec value '4455667788' to '4455667799' on the flavor
5. When you migrate, live-migrate or rebuild, the change does not reflect in the database and also not reflected in the XML on the Hypervisor
6. When you manual update the value in DB (UPDATE instance_extra SET flavor = REPLACE(flavor, '4455667788', '4455667799') WHERE INSTR(flavor, '4455667788') > 0;) when you do a live-migrate the change is not reflected on the xml on the hypervisor, when you migrate the change reflects the xml on the hypervisor

Version: queens
OS: Ubuntu 16.04

Eric

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

Yeah this is working as designed. Cold migration doesn't change the flavor, so if you modify the flavor extra specs that change isn't reflected in the instance when it moves. It's generally better to create a new flavor with the new extra specs rather than modify old ones that existing instances are using, because of cases like this. Then if you had a new flavor you could resize to that new flavor with the new extra specs.

Changed in nova:
status: New → Opinion
Revision history for this message
Eric Kessels (e-kessels) wrote :

Makes sense, would it then not be better in this case to also limit editing of the metadata on the flavor ?

Would changing the flavor behavior be an option to synchronize the behavior how the meta-data works on a volume type ? So when you change meta-data and you do cold- or life migrate that this change is reflected to the instance?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.