Bug 1956775 - Cannot create instance with --hint force_hosts tag to a dedicated compute host after undercloud upgrade
Summary: Cannot create instance with --hint force_hosts tag to a dedicated compute hos...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-nova
Version: 16.1 (Train)
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: OSP DFG:Compute
QA Contact: OSP DFG:Compute
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-04 11:50 UTC by rbsshasha
Modified: 2023-03-21 19:42 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-11 08:55:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-3608 0 None None None 2022-08-23 10:35:24 UTC

Description rbsshasha 2021-05-04 11:50:15 UTC

Comment 1 rbsshasha 2021-05-04 11:56:48 UTC
Steps to Reproduce:

(overcloud) [stack@manager templates]$ openstack server create --flavor 0663f6ca-c43f-4ade-b974-9facdb944e79 --image c138cdc4-2da6-4741-8e40-508850f686c4 --network=940450ed-2b25-4e43-aca5-3aa1455e692e --hint force_hosts=overcloud-computesriov-1.localdomain --config-drive True --user-data /home/stack/user_data.txt Test_VM202

Instance not created on compute1
(overcloud) [stack@manager templates]$ openstack server list --host overcloud-computesriov-1.localdomain                                 
+--------------------------------------+--------------------+--------+-------------------------------------+--------------+--------+
| ID                                   | Name               | Status | Networks                            | Image        | Flavor |
+--------------------------------------+--------------------+--------+-------------------------------------+--------------+--------+
| 970bb0a3-f64e-4531-ad3e-9dccd6f8412d | Test_VM101         | ACTIVE | external=192.168.21.173             | Centos_image | medium |
| 8d0a961b-5afc-4907-be9e-0b9f312decaf | new_test_comp1_vm1 | ACTIVE | private=10.10.10.136                | Centos_image | small  |
| 67b53dda-3c05-4f72-9a35-d41208c7e53f | Test_VM22          | ACTIVE | external=192.168.21.10              | Centos_image | medium |
| 2bf88a05-49ef-49af-a284-1c3f9ce79e95 | Test_VM12          | ACTIVE | private=10.10.10.148                | Centos_image | medium |
| 64137d32-0c5c-48c8-94de-9feb13d995ed | test_vm2           | ACTIVE | private=10.10.10.38, 192.168.21.135 | Centos_image | small  |
+--------------------------------------+--------------------+--------+-------------------------------------+--------------+--------+

(overcloud) [stack@manager templates]$ openstack server list --host overcloud-computesriov-0.localdomain
+--------------------------------------+--------------------+--------+-------------------------------------+--------------+--------+
| ID                                   | Name               | Status | Networks                            | Image        | Flavor |
+--------------------------------------+--------------------+--------+-------------------------------------+--------------+--------+
| 53568a42-c977-4de5-94ce-a269066f315a | Test_VM202         | ACTIVE | external=192.168.21.45              | Centos_image | medium | <<--instnace created on compute0

I tried to create instance to a dedicated compute host with other tags also in openstack server create command but unable to do so.

(overcloud) [stack@manager templates]$ openstack server create --flavor small  --image Centos_image  --network private --hypervisor-hostname overcloud-computesriov-1.localdomain  --config-drive True --user-data /home/stack/user_data.txt test1_vm_comp2  --wait
Specifying --hypervisor-hostname is not supported for --os-compute-api-version less than 2.74

(overcloud) [stack@manager templates]$ openstack server create --flavor small  --image Centos_image  --network private --host overcloud-computesriov-1.localdomain  --config-drive True --user-data /home/stack/user_data.txt test1_vm_comp2  --wait
Specifying --host is not supported for --os-compute-api-version less than 2.74

Comment 2 rbsshasha 2021-05-04 12:02:28 UTC
However we can launch instance to a dedicated compute host with --availability-zone nova:host tag.
(overcloud) [stack@manager templates]$ openstack server create --flavor 0663f6ca-c43f-4ade-b974-9facdb944e79 --image c138cdc4-2da6-4741-8e40-508850f686c4 --network=940450ed-2b25-4e43-aca5-3aa1455e692e --availability-zone nova:overcloud-computesriov-1.localdomain --config-drive True --user-data /home/stack/user_data.txt Test_VM101
+-------------------------------------+-----------------------------------------------------+
| Field                               | Value                                               |
+-------------------------------------+-----------------------------------------------------+
| OS-DCF:diskConfig                   | MANUAL                                              |
| OS-EXT-AZ:availability_zone         | nova                                                |
| OS-EXT-SRV-ATTR:host                | None                                                |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None                                                |
| OS-EXT-SRV-ATTR:instance_name       |                                                     |
| OS-EXT-STS:power_state              | NOSTATE                                             |
| OS-EXT-STS:task_state               | scheduling                                          |
| OS-EXT-STS:vm_state                 | building                                            |
| OS-SRV-USG:launched_at              | None                                                |
| OS-SRV-USG:terminated_at            | None                                                |
| accessIPv4                          |                                                     |
| accessIPv6                          |                                                     |
| addresses                           |                                                     |
| adminPass                           | A8ft9AtxEcSn                                        |
| config_drive                        | True                                                |
| created                             | 2021-04-27T10:10:58Z                                |
| flavor                              | medium (0663f6ca-c43f-4ade-b974-9facdb944e79)       |
| hostId                              |                                                     |
| id                                  | 970bb0a3-f64e-4531-ad3e-9dccd6f8412d                |
| image                               | Centos_image (c138cdc4-2da6-4741-8e40-508850f686c4) |
| key_name                            | None                                                |
| name                                | Test_VM101                                          |
| progress                            | 0                                                   |
| project_id                          | d2a96750d6394a53bc3ae7f89835e550                    |
| properties                          |                                                     |
| security_groups                     | name='default'                                      |
| status                              | BUILD                                               |
| updated                             | 2021-04-27T10:10:58Z                                |
| user_id                             | c0e3a43b64f2473ebfd2db61dd34d714                    |
| volumes_attached                    |                                                     |
+-------------------------------------+-----------------------------------------------------+

(overcloud) [stack@manager templates]$ openstack server list --host overcloud-computesriov-1.localdomain
+--------------------------------------+--------------------+--------+-------------------------------------+--------------+--------+
| ID                                   | Name               | Status | Networks                            | Image        | Flavor |
+--------------------------------------+--------------------+--------+-------------------------------------+--------------+--------+
| 970bb0a3-f64e-4531-ad3e-9dccd6f8412d | Test_VM101         | ACTIVE | external=192.168.21.173             | Centos_image | medium | <<-- Instamce successfully launched on compute1
| 8d0a961b-5afc-4907-be9e-0b9f312decaf | new_test_comp1_vm1 | ACTIVE | private=10.10.10.136                | Centos_image | small  |
| 8a1792a1-89a1-4241-b407-2b3374b778aa | Test_VM_52         | ACTIVE | external=192.168.21.30              | Centos_image | small  |
| 67b53dda-3c05-4f72-9a35-d41208c7e53f | Test_VM22          | ACTIVE | external=192.168.21.10              | Centos_image | medium |
| 2bf88a05-49ef-49af-a284-1c3f9ce79e95 | Test_VM12          | ACTIVE | private=10.10.10.148                | Centos_image | medium |
| 64137d32-0c5c-48c8-94de-9feb13d995ed | test_vm2           | ACTIVE | private=10.10.10.38, 192.168.21.135 | Centos_image | small  |
+--------------------------------------+--------------------+--------+-------------------------------------+--------------+--------+

Instances created successfully after controller node upgradation with --host option while instance creation:

(overcloud) [stack@manager ~]$ openstack server create --flavor small  --image Centos_image  --network private --host overcloud-computesriov-0.localdomain  --config-drive True --user-data /home/stack/user_data.txt cont_up_vm2  --wait

| Field                               | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| OS-EXT-SRV-ATTR:host                | overcloud-computesriov-0.localdomain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:hostname            | cont-up-vm2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| OS-EXT-SRV-ATTR:hypervisor_hostname | overcloud-computesriov-0.localdomain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:instance_name       | instance-00000056                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| OS-EXT-STS:vm_state                 | active                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| OS-SRV-USG:launched_at              | 2021-04-29T09:59:19.000000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| OS-SRV-USG:terminated_at            | None                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| addresses                           | private=10.10.10.92                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| id                                  | 56761b71-7a38-49c0-8ceb-ab567418f3d3                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| image                               | Centos_image (c138cdc4-2da6-4741-8e40-508850f686c4)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
Instances created successfully after controller node upgradation with --hypervisor-hostname option while instance creation:

(overcloud) [stack@manager ~]$ openstack server create --flavor small  --image Centos_image  --network private --hypervisor-hostname overcloud-computesriov-0.localdomain  --config-drive True --user-data /home/stack/user_data.txt cont_up_vm4  --wait

+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| Field                               | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| OS-DCF:diskConfig                   | MANUAL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| OS-EXT-SRV-ATTR:host                | overcloud-computesriov-0.localdomain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:hostname            | cont-up-vm4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| OS-EXT-SRV-ATTR:hypervisor_hostname | overcloud-computesriov-0.localdomain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:instance_name       | instance-00000062                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| OS-EXT-STS:power_state              | Running                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| OS-EXT-STS:vm_state                 | active                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| OS-SRV-USG:launched_at              | 2021-04-29T10:08:39.000000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| addresses                           | private=10.10.10.15                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| name                                | cont_up_vm4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
Instances created successfully after controller node upgradation with --availability-zone option in instance creation command:

(overcloud) [stack@manager ~]$ openstack server create --flavor small  --image Centos_image  --network private --availability-zone nova:overcloud-computesriov-0.localdomain  --config-drive True --user-data /home/stack/user_data.txt cont_up_vm5  --wait                 
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| Field                               | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| OS-DCF:diskConfig                   | MANUAL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| OS-EXT-AZ:availability_zone         | nova                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:host                | overcloud-computesriov-0.localdomain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:hostname            | cont-up-vm5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| OS-EXT-SRV-ATTR:hypervisor_hostname | overcloud-computesriov-0.localdomain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:instance_name       | instance-00000068                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| OS-EXT-STS:power_state              | Running                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| OS-EXT-STS:task_state               | None                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-STS:vm_state                 | active                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| OS-SRV-USG:launched_at              | 2021-04-29T10:18:41.000000

Comment 3 rbsshasha 2021-05-04 12:03:17 UTC
But I cannot force instance to launch to a specific compute host with --hint force_hosts tag after undercloud and controller node upgradation,vms are spawing to default compute host, below is the output for the same:

(overcloud) [stack@manager ~]$ openstack server create --flavor small  --image Centos_image  --network private --hint force_hosts=overcloud-computesriov-0.localdomain  --config-drive True --user-data /home/stack/user_data.txt cont_up_vm7  --wait
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| Field                               | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| OS-EXT-AZ:availability_zone         | nova                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:host                | overcloud-computesriov-1.localdomain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | overcloud-computesriov-1.localdomain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:instance_name       | instance-00000071                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| OS-EXT-STS:power_state              | Running                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| addresses                           | private=10.10.10.139                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| created                             | 2021-04-29T10:24:18Z                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| flavor                              | disk='100', ephemeral='0', , original_name='small', ram='2048', swap='0', vcpus='1'                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| image                               | Centos_image (c138cdc4-2da6-4741-8e40-508850f686c4)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| name                                | cont_up_vm7                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

(overcloud) [stack@manager ~]$ openstack server create --flavor small  --image Centos_image  --network private --hint force_hosts=overcloud-computesriov-1.localdomain  --config-drive True --user-data /home/stack/user_data.txt cont_up_vm8  --wait

+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| Field                               | Value                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
+-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| OS-EXT-AZ:availability_zone         | nova                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:host                | overcloud-computesriov-1.localdomain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | overcloud-computesriov-1.localdomain                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| OS-EXT-STS:power_state              | Running                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| flavor                              | disk='100', ephemeral='0', , original_name='small', ram='2048', swap='0', vcpus='1'                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| host_status                         | UP                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| id                                  | 8d42d1e0-00a6-4d4d-b59c-0605bd1216c7                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| image                               | Centos_image (c138cdc4-2da6-4741-8e40-508850f686c4)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| key_name                            | None                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
As we can see from output that vm cont_up_vm7 is created to overcloud-computesriov-1.localdomain even if we specified --host force_hosts=overcloud-computesriov-0.localdomain.

Actual results:
Unable to spawn instances to a dedicated compute host after undercloud upgrade.

Expected results:
Instances should be created to a dedicated compute node with --hint force_hosts option after undercloud upgradation.

Additional info:
I am doing rhosp 13 to 16.1 Fast forward upgrade and referring below link for the upgradation:

https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/16.1/html-single/framework_for_upgrades_13_to_16.1/index

Comment 4 Lee Yarwood 2021-05-10 10:03:01 UTC
(In reply to rbsshasha from comment #3)
> But I cannot force instance to launch to a specific compute host with --hint
> force_hosts tag after undercloud and controller node upgradation,vms are
> spawing to default compute host, below is the output for the same:
> 
> (overcloud) [stack@manager ~]$ openstack server create --flavor small 
> --image Centos_image  --network private --hint
> force_hosts=overcloud-computesriov-0.localdomain  --config-drive True
> --user-data /home/stack/user_data.txt cont_up_vm7  --wait

Can you confirm which compute API microversion you are using after the upgrade to 16.1, I assume it's 2.latest as is the default set by overcloudrc?

$ echo $OS_COMPUTE_API_VERSION

The upgrade to 16.1 (train) moves 2.latest to 2.79 that includes the following changes in 2.74:

https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#id67

You should be able to use --host with 2.latest or 2.74:

$ openstack server create [..] --host overcloud-computesriov-0.localdomain [..]

Or you can use an older microversion to use the older behaviour:

$ openstack server create --os-compute-api-version 2.73 [..] --hint force_hosts=overcloud-computesriov-0.localdomain  [..]

Hope this helps.

Comment 5 rbsshasha 2021-05-11 08:55:12 UTC
Hi Lee Yarwood,
Thank you so much for your valuable information, yes after upgrade compute api version is 2.latest. Below is the output for the same:
(overcloud) [stack@manager templates]$ echo $OS_COMPUTE_API_VERSION
2.latest

Your info works for me, thanks again for looking into this issue and for your precious time.


Note You need to log in before you can comment on or make changes to this bug.