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

Bug 2242791

Summary: [OSP17.1] Node provisioning failed with "role_tags' is undefined" for multiple_nics template
Product: Red Hat OpenStack Reporter: Ravi Singh <ravsingh>
Component: tripleo-ansibleAssignee: Harald Jensås <hjensas>
Status: CLOSED ERRATA QA Contact: James E. LaBarre <jlabarre>
Severity: high Docs Contact:
Priority: high    
Version: 17.1 (Wallaby)CC: bshephar, eshames, hjensas, mariel, sbaker
Target Milestone: z2Keywords: Documentation, Triaged
Target Release: 17.1Flags: hjensas: needinfo-
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tripleo-ansible-3.3.1-17.1.20231101230823.4d015bf.el9ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-01-16 14:31:13 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:

Description Ravi Singh 2023-10-09 01:52:56 UTC
Description of problem:

OSP17.1 node provisioning failed with[1] when [2] is used as reference for nic config.

[1]
~~~
2023-10-06 15:18:33.812460 | 52540028-bda5-024d-09ed-000000000228 |     TIMING | tripleo_network_config : Render network_config from template | overcloud-computehci-0 | 0:00:26.721257 | 0.22sAn exception occurred during task execution. To see the full traceback, use -vvv. The error was: ansible.errors.AnsibleUndefinedVariable: 'role_tags' is undefined. 'role_tags' is undefined
2023-10-06 15:18:33.816273 | 52540028-bda5-024d-09ed-000000000228 |      FATAL | Render network_config from template | overcloud-computehci-1 | error={"changed": false, "msg": "AnsibleUndefinedVariable: 'role_tags' is undefined. 'role_tags' is undefined"}
~~~

[2]https://opendev.org/openstack/tripleo-ansible/src/branch/master/tripleo_ansible/roles/tripleo_network_config/templates/ci/multiple_nics.j2#L14

Please note failure is only for the compute role and the same nic config for the controller doesn't throw any failure.

Version-Release number of selected component (if applicable):
17.1

How reproducible:
Everytime

Steps to Reproduce:
1. Node provisioning with "--network config"
2. Provisioning fail if [2] is used.
3.

Actual results:
Node provisioning failed

Expected results:
It should pass.

Additional info:

Comment 2 Brendan Shephard 2023-10-09 04:14:32 UTC
If you wanted to use the node provision process to do the network configuration, you would need to edit the nic-config file to remove variables that aren't provided via the baremetal_deployment.yaml file. 

Those roles_tags would only work if you did the network configuration via the overcloud deploy process.

Comment 5 Harald Jensås 2023-10-11 07:47:39 UTC
I don't think we can actually set that variable when doing network config with the baremtal provisioning workflow.
I've opened an upstream bug[1] and proposed a fix[2].

Until we can deliver that fix, customers will have to workaround the issue by using a custom NIC config template that does not use that variable in it's jinja2.


[1] https://bugs.launchpad.net/tripleo/+bug/2039008
[2] https://review.opendev.org/c/openstack/tripleo-ansible/+/897923

Comment 12 James E. LaBarre 2023-12-04 22:51:29 UTC
Confirmed edits are in place in tripleo-ansible-3.3.1-17.1.20231101230823.4d015bf.el9ost.noarch.rpm from latest compose RHOS-17.1-RHEL-9-20231122.n.1

This compose ran phases 1, 2 & 3 with no errors in the package.

Comment 21 errata-xmlrpc 2024-01-16 14:31:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 17.1.2 bug fix and enhancement advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2024:0209