[ops] [nova] How to change/remove a property from an instance ?

Massimo Sgaravatto massimo.sgaravatto at gmail.com
Wed Jul 24 15:19:15 UTC 2019


In my OpenStack Rocky cloud I have some instances that were created (before
updating to Rocky) using images with the property hypervisor_type='qemu'.

Since in my compute nodes  [libvirt]/virt_type is "kvm", after having
updated to Rocky I had to change these images removing that property of
changing its value (qemu --> kvm): this is discussed in the thread:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/thread.html#7842

Now I am not able to migrate anymore the instances that were created using
those images (ImagePropertiesFilter filters out all compute nodes) before
fixing the property.

As suggested by Matt I tried to play with the  instance_system_metadata
table of the nova database.

I first tried to change the value of that property (qemu --> kvm) [*]
I also tried to remove the property [**] but the nova migrate keeps
failing. In the request I keep seeing that

Instance contains properties ImageMetaProps...img_hv_type='qemu'

What else needs to be modified?

Thanks, Massimo

[*]
mysql> select * from instance_system_metadata where
instance_uuid='57dcdc2f-ef30-4512-beff-128c1621c5c6';
+---------------------+------------+------------+---------+--------------------------------------+------------------------+--------------------------------------+---------+
| created_at          | updated_at | deleted_at | id      | instance_uuid
                     | key                    | value
         | deleted |
+---------------------+------------+------------+---------+--------------------------------------+------------------------+--------------------------------------+---------+
| 2017-05-15 12:32:57 | NULL       | NULL       | 9868217 |
57dcdc2f-ef30-4512-beff-128c1621c5c6 | image_hypervisor_type  | kvm
                         |       0 |
| 2017-05-15 12:32:57 | NULL       | NULL       | 9868220 |
57dcdc2f-ef30-4512-beff-128c1621c5c6 | image_disk_format      | qcow2
                         |       0 |
| 2017-05-15 12:32:57 | NULL       | NULL       | 9868223 |
57dcdc2f-ef30-4512-beff-128c1621c5c6 | image_container_format | bare
                          |       0 |
| 2017-05-15 12:32:57 | NULL       | NULL       | 9868226 |
57dcdc2f-ef30-4512-beff-128c1621c5c6 | image_min_ram          | 512
                         |       0 |
| 2017-05-15 12:32:57 | NULL       | NULL       | 9868229 |
57dcdc2f-ef30-4512-beff-128c1621c5c6 | image_min_disk         | 20
                          |       0 |
| 2017-05-15 12:32:57 | NULL       | NULL       | 9868232 |
57dcdc2f-ef30-4512-beff-128c1621c5c6 | image_base_image_ref   |
c2d3e37c-b14f-4472-9bc2-d75f26ab900d |       0 |
+---------------------+------------+------------+---------+--------------------------------------+------------------------+--------------------------------------+---------+


[**]
mysql> delete from instance_system_metadata where id='9868217';
Query OK, 1 row affected (0.01 sec)

mysql> select * from instance_system_metadata where
instance_uuid='57dcdc2f-ef30-4512-beff-128c1621c5c6';
+---------------------+------------+------------+---------+--------------------------------------+------------------------+--------------------------------------+---------+
| created_at          | updated_at | deleted_at | id      | instance_uuid
                     | key                    | value
         | deleted |
+---------------------+------------+------------+---------+--------------------------------------+------------------------+--------------------------------------+---------+
| 2017-05-15 12:32:57 | NULL       | NULL       | 9868220 |
57dcdc2f-ef30-4512-beff-128c1621c5c6 | image_disk_format      | qcow2
                         |       0 |
| 2017-05-15 12:32:57 | NULL       | NULL       | 9868223 |
57dcdc2f-ef30-4512-beff-128c1621c5c6 | image_container_format | bare
                          |       0 |
| 2017-05-15 12:32:57 | NULL       | NULL       | 9868226 |
57dcdc2f-ef30-4512-beff-128c1621c5c6 | image_min_ram          | 512
                         |       0 |
| 2017-05-15 12:32:57 | NULL       | NULL       | 9868229 |
57dcdc2f-ef30-4512-beff-128c1621c5c6 | image_min_disk         | 20
                          |       0 |
| 2017-05-15 12:32:57 | NULL       | NULL       | 9868232 |
57dcdc2f-ef30-4512-beff-128c1621c5c6 | image_base_image_ref   |
c2d3e37c-b14f-4472-9bc2-d75f26ab900d |       0 |
+---------------------+------------+------------+---------+--------------------------------------+------------------------+--------------------------------------+---------+
5 rows in set (0.00 sec)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20190724/f6ba71db/attachment.html>


More information about the openstack-discuss mailing list