Description of problem: When an environment file with an empty resource_registry section is passed to the overcloud deploy command it errors during check_file_for_enabled_service function and returns a trace back Version-Release number of selected component (if applicable): python-tripleoclient-9.2.7-11 How reproducible: Every time, easily. Steps to Reproduce: 1.Create an environment file with the following content: [stack@undercloud-0 ~]$ cat network-extras.yaml # --------------------------------------------------------------------------- # Custom network extras script # --------------------------------------------------------------------------- resource_registry: # OS::TripleO::NodeExtraConfigPost: extraconfig/post_deploy/default.yaml 2.Include the file in the deploy command with -e 3.Run the overcloud deploy command Actual results: 2019-10-28 20:59:02.431 18217 ERROR osc_lib.shell [ admin] Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 134, in run ret_val = super(OpenStackShell, self).run(argv) File "/usr/lib/python2.7/site-packages/cliff/app.py", line 279, in run result = self.run_subcommand(remainder) File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 169, in run_subcommand ret_value = super(OpenStackShell, self).run_subcommand(argv) File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand result = cmd.run(parsed_args) File "/usr/lib/python2.7/site-packages/tripleoclient/command.py", line 25, in run super(Command, self).run(parsed_args) File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run return super(Command, self).run(parsed_args) File "/usr/lib/python2.7/site-packages/cliff/command.py", line 184, in run return_code = self.take_action(parsed_args) or 0 File "/usr/lib/python2.7/site-packages/tripleoclient/v1/overcloud_update.py", line 77, in take_action parsed_args.environment_files) File "/usr/lib/python2.7/site-packages/tripleoclient/utils.py", line 1059, in check_deprecated_service_is_enabled check_file_for_enabled_service(env_file) File "/usr/lib/python2.7/site-packages/tripleoclient/utils.py", line 1042, in check_file_for_enabled_service service in content["resource_registry"]): TypeError: argument of type 'NoneType' is not iterable Expected results: If we can't handle files like this then we should return an error rather then a trace back. Something like "The following environment file has an empty resource_registry section: %s" Additional info:
This was fixed in train. https://review.opendev.org/#/c/666895/ We can backport it when we have time.
(In reply to Alex Schultz from comment #2) > This was fixed in train. https://review.opendev.org/#/c/666895/ We can > backport it when we have time. Thanks Alex. We'll look into it for you and submit some changes for review.
Looks like you already did it actually: https://review.opendev.org/#/c/692430/ Nice. Thanks, greatly appreciated.
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/RHBA-2020:0760