Bug 1656878 - merge-new-params-nic-config-script should gracefully exit if role not defined
Summary: merge-new-params-nic-config-script should gracefully exit if role not defined
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 15.0 (Stein)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: Upstream M3
: 15.0 (Stein)
Assignee: Harald Jensås
QA Contact: Alistair Tonner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-06 15:21 UTC by Bob Fournier
Modified: 2019-09-26 10:47 UTC (History)
3 users (show)

Fixed In Version: openstack-tripleo-heat-templates-10.5.1-0.20190506170359.f08bfef.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-21 11:19:23 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1812530 0 None None None 2019-01-20 03:21:05 UTC
OpenStack gerrit 631950 0 None None None 2019-01-20 03:21:05 UTC
Red Hat Product Errata RHEA-2019:2811 0 None None None 2019-09-21 11:19:49 UTC

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


Note You need to log in before you can comment on or make changes to this bug.