rebuild instance will delete instance's image_base_image_ref

Bug #1683620 reported by Chaolei Li
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
In Progress
Undecided
Chaolei Li

Bug Description

When i rebuild an instance with a base image that has no property of base_image_ref, i find that the instance's system_metadada image_base_image_ref will be deleted not updated.
Here is the system_metadata of an instance:
$ MariaDB [nova]> select * from instance_system_metadata where instance_uuid = "f885595b-7b3d-4b5d-a91d-5c894473c9ad";
+---------------------+------------+------------+--------+--------------------------------------+---------------------------+--------------------------------------+---------+
| created_at | updated_at | deleted_at | id | instance_uuid | key | value | deleted |
+---------------------+------------+------------+--------+--------------------------------------+---------------------------+--------------------------------------+---------+
| 2017-04-17 10:16:07 | NULL | NULL | 111215 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | image_disk_format | qcow2 | 0 |
| 2017-04-17 10:16:07 | NULL | NULL | 111216 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | image_container_format | bare | 0 |
| 2017-04-17 10:16:07 | NULL | NULL | 111217 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | image_min_ram | 0 | 0 |
| 2017-04-17 10:16:07 | NULL | NULL | 111218 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | image_min_disk | 20 | 0 |
| 2017-04-17 10:16:07 | NULL | NULL | 111219 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | image_base_image_ref | ef9258de-4faa-41d4-809f-8f9a990cb3e2 | 0 |
| 2017-04-17 10:16:07 | NULL | NULL | 111220 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | image_hw_qemu_guest_agent | yes | 0 |
+---------------------+------------+------------+--------+--------------------------------------+---------------------------+--------------------------------------+---------+
Now we rebuild this instance choosing a base image.
$ nova rebuild f885595b-7b3d-4b5d-a91d-5c894473c9ad 7ceb073b-6d37-4e0d-91af-ee911e29fc81
$ MariaDB [nova]> select * from instance_system_metadata where instance_uuid = "f885595b-7b3d-4b5d-a91d-5c894473c9ad";
+---------------------+---------------------+---------------------+--------+--------------------------------------+---------------------------+--------------------------------------+---------+
| created_at | updated_at | deleted_at | id | instance_uuid | key | value | deleted |
+---------------------+---------------------+---------------------+--------+--------------------------------------+---------------------------+--------------------------------------+---------+
| 2017-04-17 10:16:07 | NULL | NULL | 111215 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | image_disk_format | qcow2 | 0 |
| 2017-04-17 10:16:07 | NULL | NULL | 111216 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | image_container_format | bare | 0 |
| 2017-04-17 10:16:07 | 2017-04-18 06:47:38 | NULL | 111217 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | image_min_ram | 0 | 0 |
| 2017-04-17 10:16:07 | 2017-04-18 06:47:38 | NULL | 111218 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | image_min_disk | 20 | 0 |
| 2017-04-17 10:16:07 | 2017-04-18 06:47:38 | 2017-04-18 06:47:38 | 111219 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | image_base_image_ref | ef9258de-4faa-41d4-809f-8f9a990cb3e2 | 111219 |
| 2017-04-17 10:16:07 | NULL | NULL | 111220 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | image_hw_qemu_guest_agent | yes | 0 |
| 2017-04-18 06:47:42 | NULL | NULL | 111463 | f885595b-7b3d-4b5d-a91d-5c894473c9ad | clean_attempts | 1 | 0 |
+---------------------+---------------------+---------------------+--------+--------------------------------------+---------------------------+--------------------------------------
we can see that the image_min_ram and image_min_disk are updated but the image_base_image_ref is deleted.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/457514

Changed in nova:
assignee: nobody → LiChaoLei (lichaolei)
status: New → In Progress
Revision history for this message
Alex Xu (xuhj) wrote :

i'm curious why we need 'image_base_image_ref' in the system_metadata, i didn't found it is very useful.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Chaolei Li (<email address hidden>) on branch: master
Review: https://review.openstack.org/457514

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.