Bug 1435205

Summary: split-stack: tripleoclient fails rewriting resource_registry from j2 rendered environment
Product: Red Hat OpenStack Reporter: James Slagle <jslagle>
Component: python-tripleoclientAssignee: James Slagle <jslagle>
Status: CLOSED ERRATA QA Contact: Gurenko Alex <agurenko>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 11.0 (Ocata)CC: emacchi, hbrock, jcoufal, jschluet, jslagle, mburns, rhel-osp-director-maint
Target Milestone: betaKeywords: Triaged
Target Release: 11.0 (Ocata)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-tripleoclient-6.1.0-4.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-17 20:12:32 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:

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