using stack_user_domain_name in heat.conf will fail stack creation.

Bug #1389977 reported by Ethan Lynn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
In Progress
Undecided
Ethan Lynn

Bug Description

When set stack_user_domain_name instead of stack_user_domain_id in heat.conf
heat stack-create will fail with below error message.
2014-11-02 23:13:11.052 16389 DEBUG urllib3.connectionpool [-] "POST /v3/projects HTTP/1.1" 500 154 _make_request /usr/lib/python2.6/site-packages/urllib3/connectionpool.py:357
2014-11-02 23:13:11.053 16389 DEBUG keystoneclient.session [-] RESP: _http_log_response /usr/lib/python2.6/site-packages/keystoneclient/session.py:190
2014-11-02 23:13:11.054 16389 DEBUG keystoneclient.session [-] Request returned failure status: 500 request /usr/lib/python2.6/site-packages/keystoneclient/session.py:353
2014-11-02 23:13:11.064 16389 DEBUG heat.engine.stack_lock [-] Engine 3ef82723-a769-4021-a39c-35dae9d7550b released lock on stack 5821bd20-4ba1-40bf-a3b5-a60a59582d40 release /usr/lib/python2.6/site-packages/heat/engine/stack_lock.py:122
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/eventlet/hubs/hub.py", line 455, in fire_timers
    timer()
  File "/usr/lib/python2.6/site-packages/eventlet/hubs/timer.py", line 58, in __call__
    cb(*args, **kw)
  File "/usr/lib/python2.6/site-packages/eventlet/greenthread.py", line 212, in main
    result = function(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/heat/engine/service.py", line 612, in _stack_create
    stack.create_stack_user_project_id()
  File "/usr/lib/python2.6/site-packages/heat/engine/stack.py", line 1074, in create_stack_user_project_id
    'keystone').create_stack_domain_project(self.id)
  File "/usr/lib/python2.6/site-packages/heat/common/heat_keystoneclient.py", line 490, in create_stack_domain_project
    description=desc)
  File "/usr/lib/python2.6/site-packages/keystoneclient/utils.py", line 318, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/keystoneclient/v3/projects.py", line 63, in create
    **kwargs)
  File "/usr/lib/python2.6/site-packages/keystoneclient/base.py", line 72, in func
    return f(*args, **new_kwargs)
  File "/usr/lib/python2.6/site-packages/keystoneclient/base.py", line 328, in create
    self.key)
  File "/usr/lib/python2.6/site-packages/keystoneclient/base.py", line 151, in _create
    return self._post(url, body, response_key, return_raw, **kwargs)
  File "/usr/lib/python2.6/site-packages/keystoneclient/base.py", line 165, in _post
    resp, body = self.client.post(url, body=body, **kwargs)
  File "/usr/lib/python2.6/site-packages/keystoneclient/httpclient.py", line 635, in post
    return self._cs_request(url, 'POST', **kwargs)
  File "/usr/lib/python2.6/site-packages/keystoneclient/httpclient.py", line 621, in _cs_request
    return self.request(url, method, **kwargs)
  File "/usr/lib/python2.6/site-packages/keystoneclient/httpclient.py", line 596, in request
    resp = super(HTTPClient, self).request(url, method, **kwargs)
  File "/usr/lib/python2.6/site-packages/keystoneclient/baseclient.py", line 21, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/lib/python2.6/site-packages/keystoneclient/utils.py", line 318, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/keystoneclient/session.py", line 354, in request
    raise exceptions.from_response(resp, method, url)
InternalServerError: KS-A0361AB An unexpected error prevented the server from fulfilling your request. (HTTP 500)

It fails at here:
https://github.com/openstack/heat/blob/master/heat/common/heat_keystoneclient.py#L490-L493
        domain_project = self.domain_admin_client.projects.create(
            name=project_name,
            domain=self.stack_domain,
            description=desc)

self.stack_domain is domain name, not domain id.
It seems keystone can't accept domain name in porjects.create()

I think we should get domain_id from domain name before create domain project or user.

Ethan Lynn (ethanlynn)
Changed in heat:
assignee: nobody → Ethan Lynn (ethanlynn)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to heat (master)

Fix proposed to branch: master
Review: https://review.openstack.org/132955

Changed in heat:
status: New → In Progress
Revision history for this message
Ethan Lynn (ethanlynn) wrote :

As chef deployer cookbook in community only sets stack_user_domain_name in heat.conf, heat will not work after deploy.
https://github.com/stackforge/cookbook-openstack-orchestration/blob/master/templates/default/heat.conf.erb#L125-L129

This patch is badly needed.

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.