Bug 1435205 - split-stack: tripleoclient fails rewriting resource_registry from j2 rendered environment
Summary: split-stack: tripleoclient fails rewriting resource_registry from j2 rendered...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-tripleoclient
Version: 11.0 (Ocata)
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: 11.0 (Ocata)
Assignee: James Slagle
QA Contact: Gurenko Alex
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-23 11:50 UTC by James Slagle
Modified: 2017-05-17 20:12 UTC (History)
7 users (show)

Fixed In Version: python-tripleoclient-6.1.0-4.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-17 20:12:32 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1245 normal SHIPPED_LIVE Red Hat OpenStack Platform 11.0 Bug Fix and Enhancement Advisory 2017-05-17 23:01:50 UTC
OpenStack gerrit 443131 None None None 2017-03-23 11:51:28 UTC
Launchpad 1671096 None None None 2017-03-23 11:50:51 UTC

Description James Slagle 2017-03-23 11:50:24 UTC
If you specify a rendered environment file name that comes from a j2 template with -e on the command line like so:

openstack overcloud deploy ... -e /path/to/some/environment/my-environment.yaml ...

where /path/to/some/environment/my-environment.yaml comes from /path/to/some/environment/my-environment.j2.yaml, if there is any exception loading the rendered environment you hit this exception block:

https://github.com/openstack/python-tripleoclient/blob/master/tripleoclient/v1/overcloud_deploy.py#L143

where tripleoclient will attempt to rewrite file paths from their absolution location to the new tmp dir location that has been downloaded from swift.

However, this fails with an error with a "No such file or directory" error triggered by this line:

https://github.com/openstack/python-tripleoclient/blob/master/tripleoclient/v1/overcloud_deploy.py#L143

which is:
 with open(abs_env_path, 'r') as f:

since the the abs_env_path doesn't exist as it was rendered from a template.

In this case, I think we just need to use env_path in that line.

Comment 1 Emilien Macchi 2017-03-27 16:01:37 UTC
Moving to post; patches have been merged in master and backported in stable/ocata upstream. Now waiting for a new downstream build that would include the fix.

Comment 3 Gurenko Alex 2017-04-24 06:20:26 UTC
Verified on build 2017-04-20.2

[stack@undercloud-0 ~]$ rpm -q python-tripleoclient
python-tripleoclient-6.1.0-6.el7ost.noarch

Comment 4 errata-xmlrpc 2017-05-17 20:12:32 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-2017:1245


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