Openstack Magnum创建堆栈超时

时间:2017-02-17 12:49:58

标签: containers openstack docker-swarm openstack-heat

关注this guide我尝试使用Magnum在Openstack中启动一个实例,但是在尝试创建资源swarm_masters时,创建时间超过1小时:

Create Failed: CREATE aborted (Task create from ResourceGroup "swarm_masters" Stack "swarm-cluster-2-7tozdskjwnji" [020c2f42-2fea-4c5b-8307-7aa3c4ef9d2c] Timed out)

热机日志没有任何线索:

CREATE: TemplateResource "0" [467388d8-5f61-4a95-8e2d-cf9ed6862a13] Stack "swarm-cluster-2-7tozdskjwnji-swarm_masters-ogdsyvluvmfn" [cb8cbfe1-56f1-4032-b3fb-97300ff00609]
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource Traceback (most recent call last):
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource   File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 753, in _action_recorder
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource     yield
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource   File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 855, in _do_action
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource     yield self.action_handler_task(action, args=handler_args)
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource   File "/usr/lib/python2.7/dist-packages/heat/engine/scheduler.py", line 353, in wrapper
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource     step = next(subtask)
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource   File "/usr/lib/python2.7/dist-packages/heat/engine/resource.py", line 806, in action_handler_task
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource     done = check(handler_data)
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource   File "/usr/lib/python2.7/dist-packages/heat/engine/resources/stack_resource.py", line 354, in check_create_complete
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource     return self._check_status_complete(self.CREATE)
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource   File "/usr/lib/python2.7/dist-packages/heat/engine/resources/stack_resource.py", line 404, in _check_status_complete
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource     action=action)
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource ResourceFailure: resources[0]: Stack CREATE cancelled
    2017-02-17 13:33:56.699 2990 ERROR heat.engine.resource
    2017-02-17 13:33:57.076 2990 INFO heat.engine.stack [req-ac71f5a7-4b1d-4711-92a2-6b2512e0e48e 61b9e7f80bff4798a297753735f9e791 3e0c9fb4a3174d3ea3c2826986d68103 - - -] Stack CREATE FAILED (swarm-cluster-2-7tozdskjwnji-swarm_masters-ogdsyvluvmfn): Resource CREATE failed: resources[0]: Stack CREATE cancelled
    2017-02-17 13:33:57.091 2990 WARNING heat.engine.stack [req-ac71f5a7-4b1d-4711-92a2-6b2512e0e48e 61b9e7f80bff4798a297753735f9e791 3e0c9fb4a3174d3ea3c2826986d68103 - - -] Failed to set state of stack swarm-cluster-2-7tozdskjwnji-swarm_masters-ogdsyvluvmfn with traversal ID 3110b85a-1c09-441d-b98a-5f31b31f11b9, to CREATE_FAILED

而且马格南指挥更少......

2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall [-] Fixed interval looping call 'magnum.conductor.handlers.cluster_conductor.HeatPoller.poll_and_check' failed
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall Traceback (most recent call last):
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall   File "/usr/lib/python2.7/dist-packages/oslo_service/loopingcall.py", line 136, in _run_loop
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall     result = func(*self.args, **self.kw)
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall   File "/usr/lib/python2.7/dist-packages/magnum/conductor/handlers/cluster_conductor.py", line 294, in poll_and_check
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall     stack = self.openstack_client.heat().stacks.get(self.cluster.stack_id)
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall   File "/usr/lib/python2.7/dist-packages/heatclient/v1/stacks.py", line 274, in get
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall     resp = self.client.get('/stacks/%s' % stack_id, **kwargs)
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall   File "/usr/lib/python2.7/dist-packages/heatclient/common/http.py", line 287, in get
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall     return self.client_request("GET", url, **kwargs)
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall   File "/usr/lib/python2.7/dist-packages/heatclient/common/http.py", line 280, in client_request
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall     resp, body = self.json_request(method, url, **kwargs)
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall   File "/usr/lib/python2.7/dist-packages/heatclient/common/http.py", line 269, in json_request
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall     resp = self._http_request(url, method, **kwargs)
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall   File "/usr/lib/python2.7/dist-packages/heatclient/common/http.py", line 230, in _http_request
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall     % resp.content)
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall HTTPUnauthorized: ERROR: Authentication failed: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
2017-02-17 13:33:49.170 5958 ERROR oslo.service.loopingcall

提前致谢。

1 个答案:

答案 0 :(得分:1)

解决了它。 问题是热配置文件中的heat_waitcondition_server_url属性。按照安装指南,它会告诉您将其设置为

heat_waitcondition_server_url = http://controller:8000/v1/waitcondition

问题在于VM必须达到的网址才能告诉加热完成加载。将其替换为机器的主机名+域或其公共IP,它将起作用(最终!)。

heat_waitcondition_server_url = http://controller.mydomain.com:8000/v1/waitcondition

以防我编辑所有端点以指向controller.mydomain.com并编辑主机文件

10.0.0.11    controller controller.mydomain.com