Could not find domain when launching a stack with a LoadBalancer

Bug #1349532 reported by Moe Oslan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Expired
Medium
Unassigned

Bug Description

I use devstack (commit 662567c8dea4e0ed583a730dfa4c92151013ea32) and I want to create a stack with the following template (minimal working example to reproduce the bug):

{
    "AWSTemplateFormatVersion": "2010-09-09",
    "Resources": {
        "LoadBalancer" : {
          "Type" : "AWS::ElasticLoadBalancing::LoadBalancer",
          "Properties" : {
            "AvailabilityZones" : { "Fn::GetAZs" : "" },
            "Instances" : [],
            "Listeners" : [ {
              "LoadBalancerPort" : "80",
              "InstancePort" : "80",
              "Protocol" : "HTTP"
            } ]
          }
        }
    }
}

When I submit this stack, the stack is not created (status: CREATE_FAILED). Instead, heat engine shows the following error message:

2014-07-28 20:33:45.895 ERROR heat.engine.resource [-] CREATE : WaitConditionHandle "WaitHandle" Stack "st1-LoadBalancer-ssrpupmnzbia" [a31dd16f-f823-48e3-9758-204a2f38e770]
2014-07-28 20:33:45.895 TRACE heat.engine.resource Traceback (most recent call last):
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 379, in _do_action
2014-07-28 20:33:45.895 TRACE heat.engine.resource handle())
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resources/wait_condition.py", line 41, in handle_create
2014-07-28 20:33:45.895 TRACE heat.engine.resource super(WaitConditionHandle, self).handle_create()
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/signal_responder.py", line 41, in handle_create
2014-07-28 20:33:45.895 TRACE heat.engine.resource super(SignalResponder, self).handle_create()
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/stack_user.py", line 34, in handle_create
2014-07-28 20:33:45.895 TRACE heat.engine.resource self._create_user()
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/stack_user.py", line 40, in _create_user
2014-07-28 20:33:45.895 TRACE heat.engine.resource self.stack.id)
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/heat/heat/common/heat_keystoneclient.py", line 395, in create_stack_domain_proje
ct
2014-07-28 20:33:45.895 TRACE heat.engine.resource domain_project = self.domain_admin_client.projects.create(
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/heat/heat/common/heat_keystoneclient.py", line 135, in domain_admin_client
2014-07-28 20:33:45.895 TRACE heat.engine.resource if c.authenticate(domain_id=self.stack_domain_id):
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/python-keystoneclient/keystoneclient/utils.py", line 324, in inner
2014-07-28 20:33:45.895 TRACE heat.engine.resource return func(*args, **kwargs)
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/python-keystoneclient/keystoneclient/httpclient.py", line 392, in authenticate
2014-07-28 20:33:45.895 TRACE heat.engine.resource resp = self.get_raw_token_from_identity_service(**kwargs)
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/python-keystoneclient/keystoneclient/v3/client.py", line 179, in get_raw_token_f
rom_identity_service
2014-07-28 20:33:45.895 TRACE heat.engine.resource return a.get_auth_ref(self.session)
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/python-keystoneclient/keystoneclient/auth/identity/v3.py", line 108, in get_auth
_ref
2014-07-28 20:33:45.895 TRACE heat.engine.resource authenticated=False)
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/python-keystoneclient/keystoneclient/session.py", line 333, in post
2014-07-28 20:33:45.895 TRACE heat.engine.resource return self.request(url, 'POST', **kwargs)
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/python-keystoneclient/keystoneclient/utils.py", line 324, in inner
2014-07-28 20:33:45.895 TRACE heat.engine.resource return func(*args, **kwargs)
2014-07-28 20:33:45.895 TRACE heat.engine.resource File "/opt/stack/python-keystoneclient/keystoneclient/session.py", line 274, in request
2014-07-28 20:33:45.895 TRACE heat.engine.resource raise exceptions.from_response(resp, method, url)
2014-07-28 20:33:45.895 TRACE heat.engine.resource Unauthorized: Could not find domain, 7e0856d912bd45f09e8bb7af6562b54f. (Disable debug mode to suppress these details.) (HTTP 401)
2014-07-28 20:33:45.895 TRACE heat.engine.resource

[...]
2014-07-28 20:33:45.988 ERROR heat.engine.resource [-] CREATE : LoadBalancer "LoadBalancer" [a31dd16f-f823-48e3-9758-204a2f38e770] Stack "st1" [66b6ac3e-c440-45fc-b320-e13f0ff30805]
2014-07-28 20:33:45.988 TRACE heat.engine.resource Traceback (most recent call last):
2014-07-28 20:33:45.988 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/resource.py", line 382, in _do_action
2014-07-28 20:33:45.988 TRACE heat.engine.resource while not check(handle_data):
2014-07-28 20:33:45.988 TRACE heat.engine.resource File "/opt/stack/heat/heat/engine/stack_resource.py", line 191, in check_create_complete
2014-07-28 20:33:45.988 TRACE heat.engine.resource raise exception.Error(self._nested.status_reason)
2014-07-28 20:33:45.988 TRACE heat.engine.resource Error: Resource CREATE failed: Unauthorized: Could not find domain, 7e0856d912bd45f09e8bb7af6562b54f. (Disable debug mode to suppress these details.) (HTTP 401)
2014-07-28 20:33:45.988 TRACE heat.engine.resource

Revision history for this message
Steve Baker (steve-stevebaker) wrote : Re: [Bug 1349532] [NEW] Could not find domain when launching a stack with a LoadBalancer

As a matter of interest, is there a reason you can't use this resource?

http://docs.openstack.org/developer/heat/template_guide/openstack.html#OS::Neutron::LoadBalancer

Revision history for this message
Moe Oslan (moe-i) wrote :

@Steve Baker No, there is no particular reason to use the AWS::ElasticLoadBalancing::LoadBalancer resource. Launching a Neutron LoadBalancer works as expected.

Angus Salkeld (asalkeld)
Changed in heat:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Miguel Alejandro Cantu (miguel-cantu) wrote :

I'm running heat-api and heat-engine on three seperate nodes and load balancing between the three with haproxy.
I see a similar error when I try to create a stack.

2014-09-03 15:09:34.392 9462 TRACE heat.engine.resource authenticated=False, log=False)
2014-09-03 15:09:34.392 9462 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py", line 398, in post
2014-09-03 15:09:34.392 9462 TRACE heat.engine.resource return self.request(url, 'POST', **kwargs)
2014-09-03 15:09:34.392 9462 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/keystoneclient/utils.py", line 318, in inner
2014-09-03 15:09:34.392 9462 TRACE heat.engine.resource return func(*args, **kwargs)
2014-09-03 15:09:34.392 9462 TRACE heat.engine.resource File "/usr/local/lib/python2.7/dist-packages/keystoneclient/session.py", line 339, in request
2014-09-03 15:09:34.392 9462 TRACE heat.engine.resource raise exceptions.from_response(resp, method, url)
2014-09-03 15:09:34.392 9462 TRACE heat.engine.resource Unauthorized: Could not find domain, fb9ffee2191244c58add30b5f7a30b8d. (HTTP 401)
2014-09-03 15:09:34.392 9462 TRACE heat.engine.resource
2014-09-03 15:09:34.859 9462 WARNING heat.engine.service [-] Stack create failed, status FAILED

Song Li (lisong-cruise)
Changed in heat:
assignee: nobody → Song Li (lisong-cruise)
Song Li (lisong-cruise)
Changed in heat:
assignee: Song Li (lisong-cruise) → nobody
Changed in heat:
assignee: nobody → Kairat Kushaev (kkushaev)
Revision history for this message
Kairat Kushaev (kkushaev) wrote :

Hello guys,
I tried to reproduce the bug with the latest devstack and heat updates and i didn't succeed with it.
The stack of stack becomes STACK_COMPLETE.
IMO, it seems that the issue has been fixed with one of previous patches.
Could you please tell me if the issue is still actual?
Can you reproduce it now with the latest updates?

Changed in heat:
status: Triaged → Incomplete
Changed in heat:
assignee: Kairat Kushaev (kkushaev) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for heat because there has been no activity for 60 days.]

Changed in heat:
status: Incomplete → Expired
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.