Bug 1726322 - Swift container fails when the network file doesn't exist in openstack overcloud deploy command
Summary: Swift container fails when the network file doesn't exist in openstack overcl...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-tripleoclient
Version: 13.0 (Queens)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z8
: 13.0 (Queens)
Assignee: Cédric Jeanneret
QA Contact: Sasha Smolyak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-02 15:27 UTC by Cédric Jeanneret
Modified: 2020-02-03 15:51 UTC (History)
4 users (show)

Fixed In Version: python-tripleoclient-9.2.7-10.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-09-03 16:55:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 668940 0 None MERGED Ensure files exist before building/uploading plan 2020-03-02 09:44:10 UTC
Red Hat Bugzilla 1723747 0 high CLOSED Swift container fails when the network file doesn't exist in openstack overcloud deploy command 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2019:2624 0 None None None 2019-09-03 16:55:48 UTC

Description Cédric Jeanneret 2019-07-02 15:27:34 UTC
This bug was initially created as a copy of Bug #1723747

I am copying this bug because: 
We need to backport a patch into Queens


Description of problem:
When running openstack overcloud deploy -n /home/stack/virt/network/network_data_1.yaml and the file network_data_1.yaml doesn't exist, get a big error:

Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 32, in run
    super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 925, in take_action
    self._deploy_tripleo_heat_templates_tmpdir(stack, parsed_args)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 374, in _deploy_tripleo_heat_templates_tmpdir
    new_tht_root, tht_root)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 400, in _deploy_tripleo_heat_templates
    validate_stack=False)
  File "/usr/lib/python3.6/site-packages/tripleoclient/workflows/plan_management.py", line 206, in update_plan_from_templates
    passwords = _load_passwords(swift_client, name)
  File "/usr/lib/python3.6/site-packages/tripleoclient/workflows/plan_management.py", line 293, in _load_passwords
    return plan_env['passwords']
KeyError: 'passwords'

because the command is trying to build a plan and fails, without validating first that the file exists.

Version-Release number of selected component (if applicable):
RHOS_TRUNK-15.0-RHEL-8-20190619.n.1

How reproducible:
100%

Steps to Reproduce:
1. deploy undercloud
2. Try to deploy overcloud with a non-existing network file

Actual results:
Deploy fails because of empty plan

Expected results:
Error explaining that the file doesn't exist

Additional info:

Comment 1 Cédric Jeanneret 2019-07-05 05:30:14 UTC
Downstream review added.

Comment 10 errata-xmlrpc 2019-09-03 16:55:34 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/RHBA-2019:2624


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