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

Bug 1656878

Summary: merge-new-params-nic-config-script should gracefully exit if role not defined
Product: Red Hat OpenStack Reporter: Bob Fournier <bfournie>
Component: openstack-tripleo-heat-templatesAssignee: Harald Jensås <hjensas>
Status: CLOSED ERRATA QA Contact: Alistair Tonner <atonner>
Severity: low Docs Contact:
Priority: low    
Version: 15.0 (Stein)CC: atonner, hjensas, mburns
Target Milestone: Upstream M3Keywords: Triaged
Target Release: 15.0 (Stein)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-10.5.1-0.20190506170359.f08bfef.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-21 11:19:23 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 Bob Fournier 2018-12-06 15:21:41 UTC
Description of problem:

See also https://bugzilla.redhat.com/show_bug.cgi?id=1653306.

The script fails with a StopIteration error here:

The code[1] that fail in the script is:

    nic_config_name = next((x.get('deprecated_nic_config_name',
                                  OPTS.role_name.lower() + '.yaml') for x in
                            roles_data if x['name'] == OPTS.role_name))

The exception StopIteration[2] indicates that it iterated trought all the roles without finding a match. So whatever the CI job assigns to NIC_ROLE_NAME is not a role name in roles_data.

The script should handle this error case more gracefully and indicate the role is missing instead of generating StopIteration.

Comment 4 Alistair Tonner 2019-07-17 18:39:22 UTC
Ran Yuri's test from https://bugzilla.redhat.com/show_bug.cgi?id=1653306

Comment 6 errata-xmlrpc 2019-09-21 11:19:23 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, 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/RHEA-2019:2811