Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Heat Fails on Image Authorization

Followed http://docs.openstack.org/icehouse/install-guide/install/apt/content/heat-install.html to depoly a simple image, and am getting the following error:

root@node10:~# heat --debug stack-create -f /home/ubuntu/test-stack.yml -P "ImageID=cirros-0.3.1-x86_64-disk.img;NetID=$NET_ID" testStack
DEBUG (session:234) REQ: curl -i -X POST http://10.0.0.62:5000/v2.0/tokens -H "Content-Type: application/json" -H "User-Agent: python-keystoneclient" -d '{"auth": {"passwordCredentials": {"username": "admin", "password": "openstack"}, "tenantId": "9b508c0ebfb144b596034b3c99cbfcad"}}'
INFO (connectionpool:258) Starting new HTTP connection (1): 10.0.0.62
DEBUG (connectionpool:375) Setting read timeout to None
DEBUG (connectionpool:415) "POST /v2.0/tokens HTTP/1.1" 200 3676
DEBUG (session:274) RESP: [200] CaseInsensitiveDict({'date': 'Tue, 08 Jul 2014 22:31:21 GMT', 'vary': 'X-Auth-Token', 'content-length': '3676', 'content-type': 'application/json', 'x-distribution': 'Ubuntu'})
RESP BODY: {"access": {"token": {"issued_at": "2014-07-08T22:31:21.155454", "expires": "2014-07-08T23:31:21Z", "id": "5235217bcafc417dbc74e750d1b8aa62", "tenant": {"description": "Created by Juju", "enabled": true, "id": "9b508c0ebfb144b596034b3c99cbfcad", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://10.0.0.53:8774/v2/9b508c0ebfb144b596034b3c99cbfcad", "region": "RegionOne", "internalURL": "http://10.0.0.53:8774/v2/9b508c0ebfb144b596034b3c99cbfcad", "id": "16794d1a35194cab82cee44285cdf382", "publicURL": "http://10.0.0.53:8774/v2/9b508c0ebfb144b596034b3c99cbfcad"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://10.0.0.53:9696", "region": "RegionOne", "internalURL": "http://10.0.0.53:9696", "id": "4b5237b6daa3482d87d8586caeb8dac9", "publicURL": "http://10.0.0.53:9696"}], "endpoints_links": [], "type": "network", "name": "quantum"}, {"endpoints": [{"adminURL": "http://10.0.0.53:3333", "region": "RegionOne", "internalURL": "http://10.0.0.53:3333", "id": "1833145c4ed6487e87373687d72a6207", "publicURL": "http://10.0.0.53:3333"}], "endpoints_links": [], "type": "s3", "name": "s3"}, {"endpoints": [{"adminURL": "http://10.0.0.55:9292", "region": "RegionOne", "internalURL": "http://10.0.0.55:9292", "id": "3fdd1dde86b64954a90cbedf91200c63", "publicURL": "http://10.0.0.55:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://10.0.0.69:8777", "region": "RegionOne", "internalURL": "http://10.0.0.69:8777", "id": "a6b1579d2d8b43118b8d83f7f116c580", "publicURL": "http://10.0.0.69:8777"}], "endpoints_links": [], "type": "metering", "name": "ceilometer"}, {"endpoints": [{"adminURL": "http://10.0.0.69:8000/v1", "region": "RegionOne", "internalURL": "http://10.0.0.69:8000/v1", "id": "59dcb91c1f994ff28be83cec510ad7cd", "publicURL": "http://10.0.0.69:8000/v1"}], "endpoints_links": [], "type": "cloudformation", "name": "heat-cfn"}, {"endpoints": [{"adminURL": "http://10.0.0.59:8776/v1/9b508c0ebfb144b596034b3c99cbfcad", "region": "RegionOne", "internalURL": "http://10.0.0.59:8776/v1/9b508c0ebfb144b596034b3c99cbfcad", "id": "096f3523101249d79a4c737346034efe", "publicURL": "http://10.0.0.59:8776/v1/9b508c0ebfb144b596034b3c99cbfcad"}], "endpoints_links": [], "type": "volume", "name": "cinder"}, {"endpoints": [{"adminURL": "http://10.0.0.53:8773/services/Cloud", "region": "RegionOne", "internalURL": "http://10.0.0.53:8773/services/Cloud", "id": "92177eef108d493e95b302c5d35f5f8d", "publicURL": "http://10.0.0.53:8773/services/Cloud"}], "endpoints_links": [], "type": "ec2", "name": "ec2"}, {"endpoints": [{"adminURL": "http://10.0.0.69:8004/v1/9b508c0ebfb144b596034b3c99cbfcad", "region": "RegionOne", "internalURL": "http://10.0.0.69:8004/v1/9b508c0ebfb144b596034b3c99cbfcad", "id": "57f0aaaa7f1b43b9893ac2e6389747d9", "publicURL": "http://10.0.0.69:8004/v1/9b508c0ebfb144b596034b3c99cbfcad"}], "endpoints_links": [], "type": "orchestration", "name": "heat"}, {"endpoints": [{"adminURL": "http://10.0.0.62:35357/v2.0", "region": "RegionOne", "internalURL": "http://10.0.0.62:5000/v2.0", "id": "ba6e37fa10f045a880868427645008d1", "publicURL": "http://10.0.0.62:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "b4dce00c13174361a580f09d40edc0f6", "roles": [{"name": "KeystoneServiceAdmin"}, {"name": "_member_"}, {"name": "Admin"}, {"name": "KeystoneAdmin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["56042e893e8f43a4a7332b35fd05e748", "9fe2ff9ee4384b1894a90878d3e92bab", "3af81c6f211c4f06a19261d2e9fc0cf7", "8a57acea2e3949c8bd29305bf05c066d"]}}}

DEBUG (iso8601:184) Parsed 2014-07-08T23:31:21Z into {'tz_sign': None, 'second_fraction': None, 'hour': u'23', 'daydash': u'08', 'tz_hour': None, 'month': None, 'timezone': u'Z', 'second': u'21', 'tz_minute': None, 'year': u'2014', 'separator': u'T', 'monthdash': u'07', 'day': None, 'minute': u'31'} with default timezone <iso8601.iso8601.Utc object at 0x7fdd92466190>
DEBUG (iso8601:140) Got u'2014' for 'year' with default None
DEBUG (iso8601:140) Got u'07' for 'monthdash' with default 1
DEBUG (iso8601:140) Got 7 for 'month' with default 7
DEBUG (iso8601:140) Got u'08' for 'daydash' with default 1
DEBUG (iso8601:140) Got 8 for 'day' with default 8
DEBUG (iso8601:140) Got u'23' for 'hour' with default None
DEBUG (iso8601:140) Got u'31' for 'minute' with default None
DEBUG (iso8601:140) Got u'21' for 'second' with default None
curl -i -X POST -H 'X-Auth-User: admin' -H 'X-Auth-Token: 5235217bcafc417dbc74e750d1b8aa62' -H 'X-Auth-Key: openstack' -H 'Accept: application/json' -H 'User-Agent: python-heatclient' -H 'Content-Type: application/json' -d '{"files": {}, "disable_rollback": true, "parameters": {"NetID": "4c4d7574-ff7d-463c-98f9-efeacbc83f2d", "ImageID": "cirros-0.3.1-x86_64-disk.img"}, "stack_name": "testStack", "environment": {}, "template": {"outputs": {"server1_private_ip": {"description": "IP address of the server in the private network", "value": {"get_attr": ["server1", "first_address"]}}}, "heat_template_version": "2013-05-23", "description": "Test Template", "parameters": {"ImageID": {"type": "string", "description": "Image use to boot a server"}, "NetID": {"type": "string", "description": "Network ID for the server"}}, "resources": {"server1": {"type": "OS::Nova::Server", "properties": {"image": {"get_param": "ImageID"}, "name": "Test server", "flavor": "m1.tiny", "networks": [{"network": {"get_param": "NetID"}}]}}}}, "timeout_mins": 60}' http://10.0.0.69:8004/v1/9b508c0ebfb144b596034b3c99cbfcad/stacks
DEBUG (http:108) curl -i -X POST -H 'X-Auth-User: admin' -H 'X-Auth-Token: 5235217bcafc417dbc74e750d1b8aa62' -H 'X-Auth-Key: openstack' -H 'Accept: application/json' -H 'User-Agent: python-heatclient' -H 'Content-Type: application/json' -d '{"files": {}, "disable_rollback": true, "parameters": {"NetID": "4c4d7574-ff7d-463c-98f9-efeacbc83f2d", "ImageID": "cirros-0.3.1-x86_64-disk.img"}, "stack_name": "testStack", "environment": {}, "template": {"outputs": {"server1_private_ip": {"description": "IP address of the server in the private network", "value": {"get_attr": ["server1", "first_address"]}}}, "heat_template_version": "2013-05-23", "description": "Test Template", "parameters": {"ImageID": {"type": "string", "description": "Image use to boot a server"}, "NetID": {"type": "string", "description": "Network ID for the server"}}, "resources": {"server1": {"type": "OS::Nova::Server", "properties": {"image": {"get_param": "ImageID"}, "name": "Test server", "flavor": "m1.tiny", "networks": [{"network": {"get_param": "NetID"}}]}}}}, "timeout_mins": 60}' http://10.0.0.69:8004/v1/9b508c0ebfb144b596034b3c99cbfcad/stacks
INFO (connectionpool:258) Starting new HTTP connection (1): 10.0.0.69
DEBUG (connectionpool:375) Setting read timeout to None
DEBUG (connectionpool:415) "POST /v1/9b508c0ebfb144b596034b3c99cbfcad/stacks HTTP/1.1" 400 328

HTTP/1.1 400 Bad Request
date: Tue, 08 Jul 2014 22:31:21 GMT
content-length: 328
content-type: application/json; charset=UTF-8

{"explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400, "error": {"message": "Property error : server1: image Authorization failed: The resource could not be found. (HTTP 404)", "traceback": null, "type": "StackValidationFailed"}, "title": "Bad Request"}

DEBUG (http:121) 
HTTP/1.1 400 Bad Request
date: Tue, 08 Jul 2014 22:31:21 GMT
content-length: 328
content-type: application/json; charset=UTF-8

{"explanation": "The server could not comply with the request since it is either malformed or otherwise incorrect.", "code": 400, "error": {"message": "Property error : server1: image Authorization failed: The resource could not be found. (HTTP 404)", "traceback": null, "type": "StackValidationFailed"}, "title": "Bad Request"}

Traceback (most recent call last):
  File "/usr/bin/heat", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.7/dist-packages/heatclient/shell.py", line 429, in main
    HeatShell().main(args)
  File "/usr/lib/python2.7/dist-packages/heatclient/shell.py", line 385, in main
    args.func(client, args)
  File "/usr/lib/python2.7/dist-packages/heatclient/v1/shell.py", line 91, in do_stack_create
    hc.stacks.create(**fields)
  File "/usr/lib/python2.7/dist-packages/heatclient/v1/stacks.py", line 109, in create
    data=kwargs, headers=headers)
  File "/usr/lib/python2.7/dist-packages/heatclient/common/http.py", line 223, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/heatclient/common/http.py", line 188, in _http_request
    raise exc.from_response(resp)
heatclient.exc.HTTPBadRequest: ERROR: Property error : server1: image Authorization failed: The resource could not be found. (HTTP 404)

Here is my heat.conf file:

[DEFAULT]
use_syslog = False
debug = False
verbose = False
log_dir = /var/log/heat
instance_user=ec2-user
instance_driver=heat.engine.nova
plugin_dirs=/usr/lib64/heat,/usr/lib/heat
environment_dir=/etc/heat/environment.d
deferred_auth_method=password
host=heat
auth_encryption_key=None

# < Icehouse db config
sql_connection = mysql://heat:kyLDIqTnwm786LSp@10.0.0.58/heat
rabbit_userid = heat
rabbit_virtual_host = openstack
rabbit_password = Z6XkxfZXVqPYNxXRNFTdtWMtYhX5ZP6RsKBp4L2bJ9Vq4t6k6PHpnMwkxpLd64y5
rabbit_host = 10.0.0.60
[keystone_authtoken]
auth_uri = http://10.0.0.62:5000/
auth_host = 10.0.0.62
auth_port = 35357
auth_protocol = http
admin_tenant_name = services
admin_user = heat-cfn_heat
admin_password = yY3gRPsFLSWcjmfkRqX5JCgXsJ4XfL69mppMsHTgJL5xsH88P3V5JTF2HrFVXtPz
[ec2_authtoken]
auth_uri = http://10.0.0.62:5000/v2.0
keystone_ec2_uri = http://10.0.0.62:5000/v2.0/ec2tokens

[database]
connection = mysql://heat:kyLDIqTnwm786LSp@10.0.0.58/heat
[paste_deploy]
api_paste_config=/etc/heat/api-paste.ini

[heat_api]
bind_port=8004

[heat_api_cfn]
bind_port=8000

And this is the relevant portions of keystone catalog:

Service: orchestration
+-------------+-----------------------------------------------------------+
|   Property  |                           Value                           |
+-------------+-----------------------------------------------------------+
|   adminURL  | http://10.0.0.69:8004/v1/9b508c0ebfb144b596034b3c99cbfcad |
|      id     |              57f0aaaa7f1b43b9893ac2e6389747d9             |
| internalURL | http://10.0.0.69:8004/v1/9b508c0ebfb144b596034b3c99cbfcad |
|  publicURL  | http://10.0.0.69:8004/v1/9b508c0ebfb144b596034b3c99cbfcad |
|    region   |                         RegionOne                         |
+-------------+-----------------------------------------------------------+
Service: identity
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
|   adminURL  |   http://10.0.0.62:35357/v2.0    |
|      id     | ba6e37fa10f045a880868427645008d1 |
| internalURL |    http://10.0.0.62:5000/v2.0    |
|  publicURL  |    http://10.0.0.62:5000/v2.0    |
|    region   |            RegionOne             |
+-------------+----------------------------------+

I've looked at a similar posting, https://ask.openstack.org/en/question/16085/error-authorization-failed-the-resource-could-not-be-found-http-404/; however, suggested solutions don't seem to be applicable here. Any and all suggestions are welcome.