Bug 1106850

Summary: Heat ec2 auth misconfigured via packstack
Product: Red Hat OpenStack Reporter: Steven Hardy <shardy>
Component: openstack-puppet-modulesAssignee: RHOS Maint <rhos-maint>
Status: CLOSED DUPLICATE QA Contact: Ami Jeain <ajeain>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 5.0 (RHEL 7)CC: mmagr, yeylon
Target Milestone: ---   
Target Release: 5.0 (RHEL 7)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-10 12:44:06 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:

Description Steven Hardy 2014-06-09 17:47:04 UTC
Description of problem:
There is a misconfiguration of heat.conf when heat is installed via packstack:

[ec2authtoken]
auth_uri=http://127.0.0.1:5000/v2.0/ec2tokens

This is incorrect, and leads to this error when trying to authenticate with ec2 credentials (affects the heat-api-cfn and heat-api-cloudwatch services):

2014-06-09 13:34:04.367 924 INFO heat.api.aws.ec2token [-] Checking AWS credentials..
2014-06-09 13:34:04.369 924 INFO heat.api.aws.ec2token [-] AWS credentials found, checking against keystone.
2014-06-09 13:34:04.370 924 INFO heat.api.aws.ec2token [-] Authenticating with http://127.0.0.1:5000/v2.0/ec2tokens/ec2tokens
2014-06-09 13:34:04.393 924 INFO urllib3.connectionpool [-] Starting new HTTP connection (1): 127.0.0.1
2014-06-09 13:34:04.397 924 INFO heat.api.aws.ec2token [-] AWS authentication failure.

This means things like waitcondition notifications via AWS::CloudFormation::WaitConditionHandle and OS::Heat::UpdateWaitConditionHandle won't work.

Version-Release number of selected component (if applicable):
openstack-puppet-modules-2014.1-14.2.el7ost.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install heat via packstack, enabling CONFIG_HEAT_CFN_INSTALL
2. Try to launch a template containing a waitcondition
3. Observe failure and the error above in the logs

Additional info:

This happens because the heat ec2token middleware already appends the "ec2tokens" path to the auth_uri.

It's actually not necessary to set anything at all in the 
ec2authtoken section of heat.conf with recent versions of heat, as we can use the auth_uri from keystone_authtoken instead.

I've posted a patch making heat tolerant of the URL including the "ec2tokens" path suffix:

https://review.openstack.org/#/c/98827/

However a possibly preferable solution is just to update the puppet manifest so it doesn't set auth_uri in the ec2tokens section at all.

Comment 2 Martin Magr 2014-06-10 12:44:06 UTC

*** This bug has been marked as a duplicate of bug 1106394 ***