Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2103907

Summary: Node names do not match with the host names
Product: Red Hat OpenStack Reporter: Rodolfo Alonso <ralonsoh>
Component: openstack-ironicAssignee: Steve Baker <sbaker>
Status: CLOSED DUPLICATE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17.0 (Wallaby)CC: jkreger, sbaker
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-26 22:44:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Comment 4 Steve Baker 2022-07-07 20:48:41 UTC
I'm assuming the yaml you're passing to the overcloud node provision command looks like this:

- name: Controller
  count: 3
- name: Compute
  count: 2

The nodes will be assigned based on allocation criteria which doesn't take into account node names that exactly match hostnames.

To confirm this could you paste the output for all of these:
baremetal node list
baremetal allocation list
metalsmith list

I agree this situation is confusing so I proposed this fix a few weeks ago:

https://review.opendev.org/c/openstack/ironic/+/845856

This would need to be backported to wallaby, which may not be acceptable to upstream, so worst case the fix will be targeted at 18.0.

You can have predictable placement by mapping names to hostnames in the yaml as per the documentation[1]:

- name: Controller
  count: 3
  instances:
  - hostname: controller-0
    name: controller-0
  - hostname: controller-1
    name: controller-1
  - hostname: controller-2
    name: controller-2
- name: Compute
  count: 2
  instances:
  - hostname: compute-0
    name: compute-0
  - hostname: compute-1
    name: compute-1

I think people are hitting this a lot in testing because this is how infrared names nodes, but I do wonder how often customers will choose a node naming scheme which exactly matches the overcloud hostname. I'm sure it will happen sometimes but generally nodes will have names including hardware type, position in rack, etc.

[1] https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/provisioning/baremetal_provision.html#baremetal-provision-configuration

Comment 5 Rodolfo Alonso 2022-07-08 08:18:23 UTC
Hello Steve:

This is the baremetal deployment yaml file: https://paste.opendev.org/show/bZ7QYMguqwphkZ6mRD4t/. That's right, we don't assign the name of the resources, just the number.

The "metalsmith list" command was reported in the description: https://paste.opendev.org/show/bqbKX2PoxnF0xUwlcpwh/

I don't have the "baremetal" binary installed in the system.

Regards.

Comment 6 Steve Baker 2022-07-26 22:44:28 UTC
Lets track the fix in bug #2110729

*** This bug has been marked as a duplicate of bug 2110729 ***