← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1858787] [NEW] nova-scheduler does not use image_metadata when resizing instances

 

Public bug reported:

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

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1858787

Title:
  nova-scheduler does not use image_metadata when resizing instances

Status in OpenStack Compute (nova):
  New

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1858787/+subscriptions


Follow ups