Bug 1456909

Summary: overcloud heat metadata endpoints are incorrectly set to localhost
Product: Red Hat OpenStack Reporter: Zane Bitter <zbitter>
Component: openstack-heatAssignee: Zane Bitter <zbitter>
Status: CLOSED ERRATA QA Contact: Amit Ugol <augol>
Severity: medium Docs Contact:
Priority: high    
Version: 11.0 (Ocata)CC: augol, dgurtner, gkadam, mburns, mlopes, rhel-osp-director-maint, rrasouli, sbaker, shardy, srevivo, zbitter
Target Milestone: z1Keywords: Triaged, ZStream
Target Release: 11.0 (Ocata)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-heat-8.0.0-9.el7ost Doc Type: Bug Fix
Doc Text:
Cause: In the heat-dist.conf file, the endpoint URLs for the various metadata services were explicitly set to localhost. Consequence: Resources that use metadata to communicate with deployed servers (such as WaitConditions and SoftwareDeployments) wouldn't work unless the URLs were explicitly overridden in the local config file, even though Heat has the capability to determine these automatically via the Keystone catalog. Fix: The URLs are now left unset in the heat-dist.conf file. Result: Heat will automatically determine the correct URLs from the Keystone catalog unless the local config file explicitly overrides them.
Story Points: ---
Clone Of: 1452677 Environment:
Last Closed: 2017-07-19 17:04:31 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:
Embargoed:
Bug Depends On: 1452677    
Bug Blocks:    

Description Zane Bitter 2017-05-30 16:23:46 UTC
+++ This bug was initially created as a clone of Bug #1452677 +++

Description of problem:

heat metadata urls are set to 127.0.0.1 in the defaults in /usr/share/heat/heat-dist.conf:
heat_metadata_server_url = http://127.0.0.1:8000
heat_waitcondition_server_url = http://127.0.0.1:8000/v1/waitcondition
heat_watch_server_url =http://127.0.0.1:8003

Recently there was a BZ around those values being set to 127.0.0.1 via Puppet #1395139 this has been fixed by removing those defaults from the heat-puppet modules. And now those values are no longer defined in /etc/heat/heat.conf.

This means that they fall back to the values from /usr/share/heat/heat-dist.conf from the openstack-heat-commons package, which still have those values set to 127.0.0.1.

A complete fix of the problem would require to remove those values from /usr/share/heat/heat-dist.conf as well, and then Heat would finally fall back to the values provided by Keystone.
Alternatively it should be explicitely set to the correct heat_cfn endpoint.

Version-Release number of selected component (if applicable):
puppet-heat-9.5.0-1.el7ost.noarch
openstack-heat-api-cfn-7.0.2-1.el7ost.noarch
python-heat-agent-0-0.11.1e6015dgit.el7ost.noarch
openstack-heat-api-7.0.2-1.el7ost.noarch
python-heat-agent-puppet-0-0.11.1e6015dgit.el7ost.noarch
python-heatclient-1.5.0-1.el7ost.noarch
openstack-heat-api-cloudwatch-7.0.2-1.el7ost.noarch
openstack-heat-common-7.0.2-1.el7ost.noarch
openstack-heat-engine-7.0.2-1.el7ost.noarch
heat-cfntools-1.3.0-2.el7ost.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install OSP10
2. Launch a Heat stack containing with a Nova instance and using a SoftwareDeployment and SOFTWARE_CONFIG
3. Check that /var/lib/heat-cfntools/cfn-init-data

Actual results:
"metadata_url" is set to 127.0.0.1

Expected results:
"metadata_url" is set to the Public heat_cfn endpoint.

Comment 4 Ronnie Rasouli 2017-07-19 11:29:19 UTC
heat_metadata_server_url = http://192.168.24.1:8000

Comment 6 errata-xmlrpc 2017-07-19 17:04:31 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/RHBA-2017:1779