metadata change on flavor not migrated into DB after cold migrate
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_
2. Launch instance (ephemeral disk).
3. The meta-data value is set in db=nova, table=instance_
4. Change meta-data quota:disk_
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
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.