Hide Forgot
Created attachment 1221651 [details] Failure message showing inconsistency Description of problem: using the openstack cli : ack@undercloud ~]$ openstack stack create wordpress -f yaml -t http://10.3.9.250/templates/heat_3a.yaml id: d9f06d32-e459-489e-844a-7de00fb9bfd9 stack_name: wordpress description: Template that installs a wordpress server and supporting MySQL database running on separate servers creation_time: '2016-11-17T21:17:57Z' updated_time: null stack_status: CREATE_IN_PROGRESS stack_status_reason: Stack CREATE started [stack@undercloud ~]$ heat stack-list WARNING (shell) "heat stack-list" is deprecated, please use "openstack stack list" instead +--------------------------------------+------------+--------------------+----------------------+--------------+ | id | stack_name | stack_status | creation_time | updated_time | +--------------------------------------+------------+--------------------+----------------------+--------------+ | d9f06d32-e459-489e-844a-7de00fb9bfd9 | wordpress | CREATE_IN_PROGRESS | 2016-11-17T21:17:57Z | None | +--------------------------------------+------------+--------------------+----------------------+--------------+ [stack@undercloud ~]$ heat stack-list WARNING (shell) "heat stack-list" is deprecated, please use "openstack stack list" instead +--------------------------------------+------------+--------------------+----------------------+--------------+ | id | stack_name | stack_status | creation_time | updated_time | +--------------------------------------+------------+--------------------+----------------------+--------------+ | d9f06d32-e459-489e-844a-7de00fb9bfd9 | wordpress | CREATE_IN_PROGRESS | 2016-11-17T21:17:57Z | None | +--------------------------------------+------------+--------------------+----------------------+--------------+ [stack@undercloud ~]$ heat stack-list WARNING (shell) "heat stack-list" is deprecated, please use "openstack stack list" instead +--------------------------------------+------------+--------------------+----------------------+--------------+ | id | stack_name | stack_status | creation_time | updated_time | +--------------------------------------+------------+--------------------+----------------------+--------------+ | d9f06d32-e459-489e-844a-7de00fb9bfd9 | wordpress | CREATE_IN_PROGRESS | 2016-11-17T21:17:57Z | None | +--------------------------------------+------------+--------------------+----------------------+--------------+ [stack@undercloud ~]$ heat stack-list WARNING (shell) "heat stack-list" is deprecated, please use "openstack stack list" instead +--------------------------------------+------------+--------------------+----------------------+--------------+ | id | stack_name | stack_status | creation_time | updated_time | +--------------------------------------+------------+--------------------+----------------------+--------------+ | d9f06d32-e459-489e-844a-7de00fb9bfd9 | wordpress | CREATE_IN_PROGRESS | 2016-11-17T21:17:57Z | None | +--------------------------------------+------------+--------------------+----------------------+--------------+ [stack@undercloud ~]$ openstack stack create wordpress -f yaml -t http://10.3.9.250/templates/heat_3a.yaml ^C [stack@undercloud ~]$ heat stack-list WARNING (shell) "heat stack-list" is deprecated, please use "openstack stack list" instead +--------------------------------------+------------+-----------------+----------------------+--------------+ | id | stack_name | stack_status | creation_time | updated_time | +--------------------------------------+------------+-----------------+----------------------+--------------+ | d9f06d32-e459-489e-844a-7de00fb9bfd9 | wordpress | CREATE_COMPLETE | 2016-11-17T21:17:57Z | None | +--------------------------------------+------------+-----------------+----------------------+--------------+ this launches successfully for the exact same file: fails. Interesting to note the difference in the 2 though.. I expected them to behave identically. Images attached for how horizon fails !! However using the Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. http://10.3.9.250/templates/heat_3a.yaml is the template used 2. this points to 3. Actual results: Expected results: Concostency between cli and horizon dashboard Additional info:
This is really a Horizon bug but I can't find a BZ component for that at the moment, so assigning to python-heatclient for now. I think the Right Thing here would be to treat relative paths as relative to the template. I'm not sure why it isn't doing that.
There is a problem with the way I passed the environment in the original bug post. I misunderstood this to be the overcloudrc file but its not !! For now a good workaround is to do this : use resource_registry. Example of a commandline and files using resource regstry is the following CLI: openstack stack create wordpress -f yaml -t http://10.3.9.250/templates/heat_app.yaml -e http://10.3.9.250/templates/env.yaml the contents of the heat_app template is this: heat_template_version: 2013-05-23 description: Template that installs a wordpress server and supporting MySQL database running on separate servers parameters: image: type: string label: Image name or ID description: Image to be used for server. Please use an Ubuntu based image. default: trusty-server-cloudimg-amd64 flavor: type: string label: Flavor description: Type of instance (flavor) to be used on the compute instance. default: m1.small key: type: string label: Key name description: Name of key-pair to be installed on the compute instance. default: stack private_network: type: string label: Private network name or ID description: Network to attach server to. default: test resources: mysql: # type: lib/mysql.yaml type: Lib::MSG::MySQL properties: image: { get_param: image } flavor: { get_param: flavor } key: { get_param: key } private_network: { get_param: private_network } database_name: wordpress database_user: wordpress_user wordpress: # type: lib/wordpress.yaml type: Lib::MSG::Wordpress properties: image: { get_param: image } flavor: { get_param: flavor } key: { get_param: key } private_network: { get_param: private_network } mysql_server: { get_attr: [mysql, ip] } database_name: wordpress database_user: wordpress_user database_password: { get_attr: [mysql, database_password] } and the env file is this: resource_registry: Lib::MSG::MySQL: http://10.3.9.250/templates/lib/mysql.yaml Lib::MSG::Wordpress: http://10.3.9.250/templates/lib/wordpress.yaml With this method the same templates can be used for CLI or via the dashboard; Image attached with the dashboard: <workaround.jpg>
The original issue still stands about inconsistency between the CLI and the dashboard. but this is just a workaround half the way since the env.yaml doesn't have the option to come from a "url" but only direct or file. So if this is a BUG or an RFE * Relative paths of the files should be handled consistently * the environment file should have an option of being a url as well.
Created attachment 1221657 [details] workaround image with the env used correctly
I opened the attached bug against Horizon.
I found an older bug for this issue: https://bugs.launchpad.net/horizon/+bug/1467781
I verified that get_file is handled correctly as per lp#1512564, but I can't verify this works with the original user templates, because the user didn't attach them, and the addresses mentioned in the bug report don't work.
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:3462