Migration to nova-less fails - deployed node 7c7faadb-6ca0-407a-8473-edae5af9f885 has a matching name

Bug #1928487 reported by Harald Jensås
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Harald Jensås

Bug Description

Overcloud deployed with nova enabled.

(undercloud) [centos@undercloud ~]$ openstack server list
+--------------------------------------+-------------------------+--------+------------------------+----------------+---------+
| ID | Name | Status | Networks | Image | Flavor |
+--------------------------------------+-------------------------+--------+------------------------+----------------+---------+
| ff458527-44f6-4d89-b88a-4e233d25d48e | overcloud-controller-2 | ACTIVE | ctlplane=192.168.25.19 | overcloud-full | control |
| 7ea12da4-d60d-4697-b110-e51a8554446f | overcloud-controller-1 | ACTIVE | ctlplane=192.168.25.11 | overcloud-full | control |
| a9078fb1-9cae-4ab7-950a-6c91e3a0d361 | overcloud-controller-0 | ACTIVE | ctlplane=192.168.25.22 | overcloud-full | control |
| b6baa118-18cb-4787-a94b-593447edb7c3 | overcloud-novacompute-0 | ACTIVE | ctlplane=192.168.26.21 | overcloud-full | compute |
+--------------------------------------+-------------------------+--------+------------------------+----------------+---------+

(undercloud) [centos@undercloud ~]$ openstack baremetal node list
+--------------------------------------+-------------------------+--------------------------------------+-------------+--------------------+-------------+
| UUID | Name | Instance UUID | Power State | Provisioning State | Maintenance |
+--------------------------------------+-------------------------+--------------------------------------+-------------+--------------------+-------------+
| 7c7faadb-6ca0-407a-8473-edae5af9f885 | baremetal-26438-leaf1-0 | a9078fb1-9cae-4ab7-950a-6c91e3a0d361 | power on | active | False |
| 8bf203e1-1ec2-4fee-a403-6fc43bce6644 | baremetal-26438-leaf1-1 | ff458527-44f6-4d89-b88a-4e233d25d48e | power on | active | False |
| ebb1b522-ea9c-4b70-a9d0-85b491136fb2 | baremetal-26438-leaf1-2 | 7ea12da4-d60d-4697-b110-e51a8554446f | power on | active | False |
| b9da411f-2446-48ba-a112-ecfd4aa28abb | baremetal-26438-leaf2-0 | b6baa118-18cb-4787-a94b-593447edb7c3 | power on | active | False |
+--------------------------------------+-------------------------+--------------------------------------+-------------+--------------------+-------------+

## Extract provisioned nodes with command
openstack overcloud node extract provisioned --stack overcloud -o baremetal_deployment.yaml --roles-file homelab/labs/classic-ipv4-routed/overcloud/my_roles_data.yaml

## Attempt to provision nodes

(undercloud) [centos@undercloud ~]$ openstack overcloud node provision --stack overcloud --network-config --output overcloud-baremetal-deployed.yaml baremetal_deployment.yaml [35/1925]

PLAY [Overcloud Node Provision] ************************************************
2021-05-14 16:04:35.246750 | fa163eee-cfb0-e8f6-98ee-000000000008 | SKIPPED | fail | localhost
2021-05-14 16:04:35.250981 | fa163eee-cfb0-e8f6-98ee-000000000008 | TIMING | fail | localhost | 0:00:00.417545 | 0.13s
2021-05-14 16:04:35.416156 | fa163eee-cfb0-e8f6-98ee-000000000009 | SKIPPED | fail | localhost
2021-05-14 16:04:35.418698 | fa163eee-cfb0-e8f6-98ee-000000000009 | TIMING | fail | localhost | 0:00:00.585261 | 0.14s
2021-05-14 16:04:35.510232 | fa163eee-cfb0-e8f6-98ee-00000000000a | SKIPPED | fail | localhost
2021-05-14 16:04:35.513988 | fa163eee-cfb0-e8f6-98ee-00000000000a | TIMING | fail | localhost | 0:00:00.680537 | 0.08s
2021-05-14 16:04:35.532762 | fa163eee-cfb0-e8f6-98ee-00000000000c | TASK | stat overcloud-full.raw
2021-05-14 16:04:36.553375 | fa163eee-cfb0-e8f6-98ee-00000000000c | OK | stat overcloud-full.raw | localhost
2021-05-14 16:04:36.556698 | fa163eee-cfb0-e8f6-98ee-00000000000c | TIMING | stat overcloud-full.raw | localhost | 0:00:01.723192 | 1.02s
2021-05-14 16:04:36.574115 | fa163eee-cfb0-e8f6-98ee-00000000000d | TASK | stat overcloud-full.initrd
2021-05-14 16:04:37.080402 | fa163eee-cfb0-e8f6-98ee-00000000000d | OK | stat overcloud-full.initrd | localhost
2021-05-14 16:04:37.083400 | fa163eee-cfb0-e8f6-98ee-00000000000d | TIMING | stat overcloud-full.initrd | localhost | 0:00:02.249967 | 0.51s
2021-05-14 16:04:37.097522 | fa163eee-cfb0-e8f6-98ee-00000000000e | TASK | Set file based default image
2021-05-14 16:04:37.195306 | fa163eee-cfb0-e8f6-98ee-00000000000e | SKIPPED | Set file based default image | localhost
2021-05-14 16:04:37.199270 | fa163eee-cfb0-e8f6-98ee-00000000000e | TIMING | Set file based default image | localhost | 0:00:02.365807 | 0.10s
2021-05-14 16:04:37.212839 | fa163eee-cfb0-e8f6-98ee-00000000000f | TASK | Set whole-disk file based default image
2021-05-14 16:04:37.283816 | fa163eee-cfb0-e8f6-98ee-00000000000f | SKIPPED | Set whole-disk file based default image | localhost
2021-05-14 16:04:37.286477 | fa163eee-cfb0-e8f6-98ee-00000000000f | TIMING | Set whole-disk file based default image | localhost | 0:00:02.453015 | 0.07s
2021-05-14 16:04:37.299007 | fa163eee-cfb0-e8f6-98ee-000000000010 | TASK | Set glance based default image
2021-05-14 16:04:37.386309 | fa163eee-cfb0-e8f6-98ee-000000000010 | OK | Set glance based default image | localhost
2021-05-14 16:04:37.389163 | fa163eee-cfb0-e8f6-98ee-000000000010 | TIMING | Set glance based default image | localhost | 0:00:02.555726 | 0.09s
2021-05-14 16:04:37.401391 | fa163eee-cfb0-e8f6-98ee-000000000012 | TASK | Expand roles
2021-05-14 16:04:40.870907 | fa163eee-cfb0-e8f6-98ee-000000000012 | CHANGED | Expand roles | localhost
2021-05-14 16:04:40.881323 | fa163eee-cfb0-e8f6-98ee-000000000012 | TIMING | Expand roles | localhost | 0:00:06.047883 | 3.48s
2021-05-14 16:04:40.910892 | fa163eee-cfb0-e8f6-98ee-000000000013 | TASK | Find existing instances
2021-05-14 16:04:45.780886 | fa163eee-cfb0-e8f6-98ee-000000000013 | FATAL | Find existing instances | localhost | error={"changed": false, "msg": "Requested hostname overcloud-controller-0
 was not found, but the deployed node 7c7faadb-6ca0-407a-8473-edae5af9f885 has a matching name. Refusing to proceed to avoid confusing results. Please either rename the node or use a different
hostname"}
2021-05-14 16:04:45.792168 | fa163eee-cfb0-e8f6-98ee-000000000013 | TIMING | Find existing instances | localhost | 0:00:10.958628 | 4.88s

(undercloud) [centos@undercloud ~]$ openstack baremetal allocation list
<EMPTY>

## No allocations

(undercloud) [centos@undercloud ~]$ metalsmith list
+--------------------------------------+-------------------------+-----------------+-------------------------+--------+------------------------+
| UUID | Node Name | Allocation UUID | Hostname | State | IP Addresses |
+--------------------------------------+-------------------------+-----------------+-------------------------+--------+------------------------+
| 7c7faadb-6ca0-407a-8473-edae5af9f885 | baremetal-26438-leaf1-0 | | baremetal-26438-leaf1-0 | ACTIVE | ctlplane=192.168.25.22 |
| 8bf203e1-1ec2-4fee-a403-6fc43bce6644 | baremetal-26438-leaf1-1 | | baremetal-26438-leaf1-1 | ACTIVE | ctlplane=192.168.25.19 |
| ebb1b522-ea9c-4b70-a9d0-85b491136fb2 | baremetal-26438-leaf1-2 | | baremetal-26438-leaf1-2 | ACTIVE | ctlplane=192.168.25.11 |
| b9da411f-2446-48ba-a112-ecfd4aa28abb | baremetal-26438-leaf2-0 | | baremetal-26438-leaf2-0 | ACTIVE | ctlplane=192.168.26.21 |
+--------------------------------------+-------------------------+-----------------+-------------------------+--------+------------------------+

https://opendev.org/openstack/tripleo-ansible/src/branch/master/tripleo_ansible/ansible_plugins/module_utils/baremetal_deploy.py#L454-L461

description: updated
Revision history for this message
Harald Jensås (harald-jensas) wrote :
Download full text (5.7 KiB)

Workaround is to manually create allocations in ironic.

(undercloud) [centos@undercloud ~]$ openstack baremetal allocation create --node 7c7faadb-6ca0-407a-8473-edae5af9f885 --name overcloud-controller-0
+-----------------+--------------------------------------+
| Field | Value |
+-----------------+--------------------------------------+
| candidate_nodes | [] |
| created_at | 2021-05-14T16:35:47+00:00 |
| extra | {} |
| last_error | None |
| name | overcloud-controller-0 |
| node_uuid | 7c7faadb-6ca0-407a-8473-edae5af9f885 |
| owner | None |
| resource_class | baremetal |
| state | active |
| traits | [] |
| updated_at | 2021-05-14T16:35:47+00:00 |
| uuid | a9078fb1-9cae-4ab7-950a-6c91e3a0d361 |
+-----------------+--------------------------------------+
(undercloud) [centos@undercloud ~]$ openstack baremetal allocation create --node ebb1b522-ea9c-4b70-a9d0-85b491136fb2 --name overcloud-controller-1
+-----------------+--------------------------------------+
| Field | Value |
+-----------------+--------------------------------------+
| candidate_nodes | [] |
| created_at | 2021-05-14T16:36:20+00:00 |
| extra | {} |
| last_error | None |
| name | overcloud-controller-1 |
| node_uuid | ebb1b522-ea9c-4b70-a9d0-85b491136fb2 |
| owner | None |
| resource_class | baremetal |
| state | active |
| traits | [] |
| updated_at | 2021-05-14T16:36:20+00:00 |
| uuid | 7ea12da4-d60d-4697-b110-e51a8554446f |
+-----------------+--------------------------------------+
(undercloud) [centos@undercloud ~]$ openstack baremetal allocation create --node 8bf203e1-1ec2-4fee-a403-6fc43bce6644 --name overcloud-controller-2
+-----------------+--------------------------------------+
| Field | Value |
+-----------------+--------------------------------------+
| candidate_nodes | [] |
| created_at | 2021-05-14T16:36:51+00:00 |
| extra | {} |
| last_error | None |
| name | overcloud-controller-2 |
| node_uuid | 8bf203e1-1ec2-4fee-a403-6fc43bce6644 |
| owner | None |
| resource_class | baremetal |
| state | active |
| traits | [] |
| updated_at | 2021-05-14T16:36:51+00:...

Read more...

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (master)
Changed in tripleo:
status: Triaged → In Progress
tags: added: wallaby-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (master)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/791721
Committed: https://opendev.org/openstack/tripleo-ansible/commit/a8e4ccfac38e485f1ab6ad39bc4ff67303a1faad
Submitter: "Zuul (22348)"
Branch: master

commit a8e4ccfac38e485f1ab6ad39bc4ff67303a1faad
Author: Harald Jensås <email address hidden>
Date: Mon May 17 12:39:52 2021 +0200

    Create allocation if hostname matches display_name

    To facilitate migration from nova to nova-less
    deployment create an allocation when the display_name
    in the ironic nodes instance_info matches the instance
    name associated with the baremetal node matches the
    hostname provided in the baremtal deployment YAML
    definition.

    Also add a safeguard to not allow creating allocations
    with duplicate names.

    Closes-Bug: #1928487
    Change-Id: I743201875381e41b41c15569e0b41045651ac9e0

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/793181

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ansible 4.0.0

This issue was fixed in the openstack/tripleo-ansible 4.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/793181
Committed: https://opendev.org/openstack/tripleo-ansible/commit/10e2c8341d890b41566797a74c56597fd2e90826
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 10e2c8341d890b41566797a74c56597fd2e90826
Author: Harald Jensås <email address hidden>
Date: Mon May 17 12:39:52 2021 +0200

    Create allocation if hostname matches display_name

    To facilitate migration from nova to nova-less
    deployment create an allocation when the display_name
    in the ironic nodes instance_info matches the instance
    name associated with the baremetal node matches the
    hostname provided in the baremtal deployment YAML
    definition.

    Also add a safeguard to not allow creating allocations
    with duplicate names.

    Closes-Bug: #1928487
    Change-Id: I743201875381e41b41c15569e0b41045651ac9e0
    (cherry picked from commit a8e4ccfac38e485f1ab6ad39bc4ff67303a1faad)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ansible 3.2.0

This issue was fixed in the openstack/tripleo-ansible 3.2.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.