Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1568554 - When using relative paths in heat templates, if the folder is moved to a new one and stack updated, it fails finding the file in the previous path
Summary: When using relative paths in heat templates, if the folder is moved to a new ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: 10.0 (Newton)
Assignee: Rabi Mishra
QA Contact: Ronnie Rasouli
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-17 18:35 UTC by David Hill
Modified: 2018-12-04 03:37 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-04 03:37:21 UTC
Target Upstream Version:


Attachments (Terms of Use)
Templates used to reproduce this issue. (1.20 KB, application/x-gzip)
2018-04-17 18:37 UTC, David Hill
no flags Details


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 562727 0 None None None 2018-04-23 05:03:28 UTC

Description David Hill 2018-04-17 18:35:57 UTC
Description of problem:
When using relative paths in heat templates, if the folder is moved to a new one and stack updated, it fails finding the file in the previous path

Example:

1) $ cd /root/rh_autoscale_example
2) $ openstack stack create -t template.yaml -e environment.yaml example
3) Wait until success
4) $ mv /root/rh_autoscale_example /root/rh_autoscale_example_moved
5) $ openstack stack update -t template.yaml -e environment.yaml example
6) Update fails

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. 
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 David Hill 2018-04-17 18:36:41 UTC
It might be affecting only the scale up groups:

| stack_status_reason   | Resource UPDATE failed: resources.scaleup_group: Could                                                                                                                        |
|                       | not fetch remote template                                                                                                                                                     |
|                       | "file:///home/stack/templates/cirros.yaml": Invalid URL                                                                                                                       |
|                       | scheme file                                                                                                                                                                   |

Comment 2 David Hill 2018-04-17 18:37:58 UTC
Created attachment 1423215 [details]
Templates used to reproduce this issue.

Comment 3 David Hill 2018-04-17 18:38:56 UTC
This appears to be a problem when using ansible which create a temporary folder when deploying openshift with ansible-shift.

Comment 4 David Hill 2018-04-17 18:43:04 UTC
In the following example:


resources:
  scaleup_group:
    type: OS::Heat::AutoScalingGroup
    properties:
      cooldown: 300
      desired_capacity: 2
      max_size: 3
      min_size: 2
      resource:
        type: cirros.yaml
        properties:
          metadata: {"metering.server_group": {get_param: "OS::stack_id"}}


will be imported as "file:///home/stack/templates/cirros.yaml" in the internal heat representation of the stack.   If we try to update that heat stack from another host and another path , let's say /home/another_user/templates/cirros.yaml, updating the stack will fail with:

| stack_status_reason   | Resource UPDATE failed: resources.scaleup_group: Could                                                                                                                        |
|                       | not fetch remote template                                                                                                                                                     |
|                       | "file:///home/stack/templates/cirros.yaml": Invalid URL                                                                                                                       |
|                       | scheme file      

It looks like the path is not updated even though the path changed.

Comment 16 Alex Schultz 2018-12-04 03:37:21 UTC
This has been addressed in the current release of Heat. The workaround should be used for older versions if possible.


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