tripleo client heat templates processor might substitute wrong values for rewritten paths

Bug #1752272 reported by Bogdan Dobrelya
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Bogdan Dobrelya

Bug Description

When --templates (tht_root) is /tmp/foo and new_tht_root, which is rewritten by the templates processor utility, is like /twd/templates, then env_paths like:

* /tmp/foo/bar.yaml
* /tmp/foo/environments/fooenv.yaml

rewritten OK as:

* /twd/templates/bar.yaml
* /twd/templates/environments/fooenv.yaml

and env_paths like:

* /tmp/foo42/donottouchthis.yaml

rewritten wrong (they should be retained as is):

* /twd/templates42/donottouchthis.yaml

Changed in tripleo:
importance: Undecided → Medium
milestone: none → queens-rc1
assignee: nobody → Bogdan Dobrelya (bogdando)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-tripleoclient (master)

Change abandoned by Bogdan Dobrelya (<email address hidden>) on branch: master
Review: https://review.openstack.org/548935
Reason: submitted with wrong changeid

Changed in tripleo:
milestone: queens-rc1 → rocky-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/542875
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=0b3b55288b85cdf158b90c895dd4c17937d81f3c
Submitter: Zuul
Branch: master

commit 0b3b55288b85cdf158b90c895dd4c17937d81f3c
Author: Bogdan Dobrelya <email address hidden>
Date: Fri Feb 9 15:56:13 2018 +0100

    Prepare t-h-t for undercloud in a work dir

    The issue here is that the undercloud heat installer
    default uses template in /usr/share and renders the
    result of the process-templates.py in place.

    Process templates in a temporary work dir created
    from the source --templates dir under the --output-dir.
    Delete generated templates and temp files after the
    undercloud deployment done or failed, when --cleanup
    is specified.
    Ensure the --output-dir exists for all of the cases.

    The --output-dir and --cleanup may be passed
    either as the 'undercloud deploy' CLI args, or via
    the undercloud.conf file, as 'output_dir' and 'cleanup'.
    The latter way only works for 'undercloud install --use-heat'.

    Also, share process_multiple_environments in utils lib.
    Reuse the shared process_multiple_environments for
    undercloud and overcloud heat installers and add unit tests.

    Additionally, fix the shared process_multiple_environments
    redirect/rewrite: only redirect and rewrite paths, if fully
    matched.

    Closes-Bug: #1752272
    Closes-Bug: #1749683
    Change-Id: Ib0c2e3ffd81742441400d27857afae457d71a424
    Signed-off-by: Bogdan Dobrelya <email address hidden>

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 10.0.0

This issue was fixed in the openstack/python-tripleoclient 10.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.