nova-scheduler does not use image_metadata when resizing instances

Bug #1858787 reported by Akira KAMIO
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

Description
===========
We found that nova-scheduler does not use image_metadata when resizing instances.

Steps to reproduce
==================
We have several type of hosts using aggregate.

TypeA:
- aggregate metadata
 - image_host_type=A

TypeB:
- aggregate metadata
 - image_host_type=B

And we set image_metadata to use aggregation host.

$ glance image-show da8a7cfd-f30c-465a-a34d-8ffc8b845f03
+------------------+----------------------------------------------------------------------------------+
| Property | Value |
+------------------+----------------------------------------------------------------------------------+
| checksum | aad97895eef66157e6f28baddcff0851 |
| container_format | bare |
| created_at | 2019-08-06T10:34:41Z |
| disk_format | qcow2 |
| id | da8a7cfd-f30c-465a-a34d-8ffc8b845f03 |
| host_type | A |
~~~

Looks good when creating VM.
But, does not work when resizing VM.

$ nova show 5c56d203-4991-49ad-b956-0da6bf83902e

+--------------------------------------+--------------------------------------------------------------+
| Property | Value |
+--------------------------------------+--------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | AZ_A |
| OS-EXT-SRV-ATTR:host | type-a-7044.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| OS-EXT-SRV-ATTR:hypervisor_hostname | type-a-7044.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| OS-EXT-SRV-ATTR:instance_name | instance-0001b0bd |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2019-08-26T00:51:48.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2019-08-26T00:51:28Z |
| flavor | m1.small (dfe0448b-6761-4c27-bb04-af1484701d7e) |
| hostId | 163e1b25a943504d14a669e46ed86fd861d63b567c2cc551df9eefcf |
| id | 5c56d203-4991-49ad-b956-0da6bf83902e |
~~~

$ nova resize 5c56d203-4991-49ad-b956-0da6bf83902e m1.medium
$ nova show 5c56d203-4991-49ad-b956-0da6bf83902e
+--------------------------------------+--------------------------------------------------------------+
| Property | Value |
+--------------------------------------+--------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | AZ_A |
| OS-EXT-SRV-ATTR:host | type-b-7002.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| OS-EXT-SRV-ATTR:hypervisor_hostname | type-b-7002.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
| OS-EXT-SRV-ATTR:instance_name | instance-0001b0bd |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2019-08-26T01:12:52.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | True |
| created | 2019-08-26T00:51:28Z |
| flavor | m1.medium (0911497d-2ae0-42a8-8ad3-5bc4a7eb0ec1) |
| hostId | 9b5388ea10622a3c0d9bb99eb998cb529e43517282d38f5bd93417be |
| id | 5c56d203-4991-49ad-b956-0da6bf83902e |
~~~

Expected result
===============
After resizing the VM, it will be booted on the specified host

Actual result
=============
Image metadata ignored and scheduled VM boots

Environment
===========
1. Exact version of OpenStack you are running.
* Community OpenStack Rocky

2. Which hypervisor did you use?
* CentOS 7

3. Which networking type did you use?
* Neutron ML2 Driver

Revision history for this message
Sylvain Bauza (sylvain-bauza) wrote :

Could you please give us sanitized (and ideally at a DEBUG level) n-sch and n-conductor logs so we could see why it looks it doesn't run for you ?

Putting the state to Incomplete, please put back to New once you reply.

Changed in nova:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Compute (nova) because there has been no activity for 60 days.]

Changed in nova:
status: Incomplete → Expired
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.