get_file from external environments doesn't work (No connection adapters were found)

Bug #1631426 reported by Jiří Stránský on 2016-10-07
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
High
Jiří Stránský

Bug Description

Additional info at https://bugzilla.redhat.com/show_bug.cgi?id=1380902

This is due to the conceptual problem that when we deploy from Swift rather than locally, so we don't have all the files available. We already have special processing in place because of this, but it dons't go all the way. (Full feature parity to previous state incl. handling of absolute path links in get_file is likely not achievable, especially while keeping the same CLI interface.)

All externally referenced files already get uploaded into Swift as `user-files/<hash(original path)>-<file name>`. << This naming scheme changes file names and relative paths. Our current solution amends resource registry to work well with the new names/paths, but we don't scan and edit heat templates themselves for all { get_file: some_file_name } references.

Workaround
----------

Immediate workaround is to move the ~/templates directory as a subdirectory of what is passed as --templates location. Since we generally recommend to not modify that directory, doing this is not an ideal solution.

Steven Hardy (shardy) wrote :

This is probably quite closely related to the ongoing fixes for bug #1624727 and bug #1625783 - when we have the patches for all three bugs posted it'd be good to look for ways to simplify the tripleoclient logic (even if it means deprecating some of the current interfaces long term), as the multiple workarounds are starting to develop into a bit of a maintenance headache IMO.

Changed in tripleo:
milestone: none → ocata-1

Reviewed: https://review.openstack.org/383813
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=73f30b728656f617db0d8c3f29b0b1bd078b34c9
Submitter: Jenkins
Branch: master

commit 73f30b728656f617db0d8c3f29b0b1bd078b34c9
Author: Jiri Stransky <email address hidden>
Date: Fri Oct 7 18:29:46 2016 +0200

    Fix get_file in out-of-tree templates

    We already have special processing in place for out-of-tree environment
    files and templates, but it didn't handle `get_file` (or `type`)
    links. This commit adds that handling.

    Heatclient automatically uses absolute `file:///` links when processing
    the external environment files and other files referenced from them via
    `get_file` or `type`. Because we upload all our environment files and
    templates to Swift, such links don't work. We need to use relative links
    in `get_file` and `type`.

    Change-Id: I009f75cbc6278a0a2ff75e93e1ed44f2c4893783
    Closes-Bug: #1631426

Changed in tripleo:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/385456
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=2ee369f4fb5997bb289e2cfc1c884909578c127b
Submitter: Jenkins
Branch: stable/newton

commit 2ee369f4fb5997bb289e2cfc1c884909578c127b
Author: Jiri Stransky <email address hidden>
Date: Fri Oct 7 18:29:46 2016 +0200

    Fix get_file in out-of-tree templates

    We already have special processing in place for out-of-tree environment
    files and templates, but it didn't handle `get_file` (or `type`)
    links. This commit adds that handling.

    Heatclient automatically uses absolute `file:///` links when processing
    the external environment files and other files referenced from them via
    `get_file` or `type`. Because we upload all our environment files and
    templates to Swift, such links don't work. We need to use relative links
    in `get_file` and `type`.

    Change-Id: I009f75cbc6278a0a2ff75e93e1ed44f2c4893783
    Closes-Bug: #1631426
    (cherry picked from commit 73f30b728656f617db0d8c3f29b0b1bd078b34c9)

tags: added: in-stable-newton

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

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

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

Other bug subscribers