Cannot specify host in availability zone

Mauricio Tavares raubvogel at gmail.com
Thu Feb 4 14:35:08 UTC 2021


On Thu, Feb 4, 2021 at 3:05 AM Paul Browne <pfb29 at cam.ac.uk> wrote:
>
> Hi Mauricio,
>
> What happens if instead of the node name you use the node UUID, as returned from;
>
> openstack hypervisor list
>
      I must be doing something wrong, as my output to openstack
hypervisor list does not spit out the UUID:

+----+---------------------------+-----------------+-----------+-------+
| ID | Hypervisor Hostname       | Hypervisor Type | Host IP   | State |
+----+---------------------------+-----------------+-----------+-------+
|  1 | compute02.example.com     | QEMU            | 10.1.1.12 | up    |
|  2 | compute03.example.com     | QEMU            | 10.1.1.13 | up    |
|  3 | compute01.example.com     | QEMU            | 10.1.1.11 | up    |
+----+---------------------------+-----------------+-----------+-------+

I guess this install was set up to list the FQDN as the 'Hypervisor
Hostname' instead of UUID. Then I tried

openstack hypervisor show compute01.example.com

So I then tried nova hypervisor-list and got
064097ce-af32-45f0-9f5b-7b21434f3cbf as the ID associated with
compute01.example.com; I take that is the UUID. However, when I tried
it

openstack server create \
--image default_centos_8 \
--flavor m1.small \
--key-name raubkey \
--availability-zone nova:064097ce-af32-45f0-9f5b-7b21434f3cbf \
--nic net-id=LONG_BORING-ID \
raub-netest

I got

| fault                               | {'code': 500, 'created':
'2021-02-04T14:29:09Z', 'message': 'No valid host was found. No such
host - host: 064097ce-af32-45f0-9f5b-7b21434f3cbf node: None ',
'details': [...]



> ?
>
> On Wed, 3 Feb 2021, 17:46 Mauricio Tavares, <raubvogel at gmail.com> wrote:
>>
>> Easy peasy question: According to
>> https://docs.openstack.org/nova/rocky/admin/availability-zones.html, I
>> can specify the host I want to use by following the format
>>
>>  --availability-zone ZONE:HOST
>>
>> So, let's get the hostnames for the compute nodes.
>>
>> [raub at test-hn ~(keystone_admin)]$ openstack compute service list
>> --service nova-compute
>> +----+--------------+-----------------------+------+---------+-------+----------------------------+
>> | ID | Binary       | Host                  | Zone | Status  | State |
>> Updated At                 |
>> +----+--------------+-----------------------+------+---------+-------+----------------------------+
>> | 11 | nova-compute | compute02.example.com | nova | enabled | up    |
>> 2021-02-03T17:25:53.000000 |
>> | 12 | nova-compute | compute03.example.com | nova | enabled | up    |
>> 2021-02-03T17:25:53.000000 |
>> | 13 | nova-compute | compute01.example.com | nova | enabled | up    |
>> 2021-02-03T17:25:52.000000 |
>> +----+--------------+-----------------------+------+---------+-------+----------------------------+
>> [raub at test-hn ~(keystone_admin)]$
>>
>> I want to use compute01.example.com, which I can resolve to 10.1.1.11.
>> But, when I try to create server with (running as admin):
>>
>> openstack server create \
>> --image default_centos_8 \
>> --flavor m1.small \
>> --key-name raubkey \
>> --availability-zone nova:compute01.example.com \
>> --nic net-id=LONG_BORING-ID \
>> raub-netest
>>
>> I get the error message (from openstack server show raub-netest|grep fault):
>>
>> 'message': 'No valid host was found. No such host - host:
>> compute01.example.com node: None '
>>
>> What am I doing wrong here?
>>



More information about the openstack-discuss mailing list