开放堆栈

OpenStack Ansible

尝试使用 Ansible 部署 OpenStack https://docs.openstack.org/project-deploy-guide/openstack-ansible

启动 "setup-openstack.yml" 剧本时,出现以下错误:

FAILED - RETRYING: TASK: os_glance : Ensure glance service (1 retries left). fatal: [infra1_glance_container-0674dd3b]: FAILED! => {"attempts": 5, "changed": false, "failed": true, "module_stderr": "mesg: ttyname failed: Inappropriate ioctl for device\nTraceback (most recent call last):\n File \"/tmp/ansible_ARIvJ_/ansible_module_keystone.py\", line 1458, in \n main()\n File \"/tmp/ansible_ARIvJ_/ansible_module_keystone.py\", line 1452, in main\n km.command_router()\n File \"/tmp/ansible_ARIvJ_/ansible_module_keystone.py\", line 484, in command_router\n facts = action(variables=action_command['variables'])\n File \"/tmp/ansible_ARIvJ_/ansible_module_keystone.py\", line 1029, in ensure_service\n self._authenticate()\n File \"/tmp/ansible_ARIvJ_/ansible_module_keystone.py\", line 606, in _authenticate\n self.keystone = client.Client(**client_args)\n File \"/usr/local/lib/python2.7/dist-packages/keystoneclient/v3/client.py\", line 238, in init\n self.authenticate()\n File \"/usr/local/lib/python2.7/dist-packages/positional/init.py\", line 101, in inner\n return wrapped(*args, **kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/keystoneclient/httpclient.py\", line 581, in authenticate\n resp = self.get_raw_token_from_identity_service(**kwargs)\n File \"/usr/local/lib/python2.7/dist-packages/keystoneclient/v3/client.py\", line 324, in get_raw_token_from_identity_service\n _('Authorization failed: %s') % e)\nkeystoneauth1.exceptions.auth.AuthorizationFailure: Authorization failed: Unable to establish connection to http://192.168.56.11:35357/v3/auth/tokens\n", "module_stdout": "", "msg": "MODULE FAILURE"}

估计跟Keystone有关! 192.168.56.11是部署主机的IP地址。 "curl http://192.168.56.11:35357/v3" 的输出如下:

curl: (52) Empty reply from server

虽然 "curl 192.168.56.79:35357/v3"(Keystone LXC 容器)给出:

{"version": {"status": "stable", "updated": "2017-02-22T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.8", "links": [{"href": "http://192.168.56.79:35357/v3/", "rel": "self"}]}}

关于如何解决问题的任何见解?

原来是token问题(glance试图从keystone获取token)。对于实验性(仅)部署,禁用 SSL 以避免此错误(否则,获取有效证书)。 通过在“/etc/openstack_deploy/user_variables.yml”和[=22=中添加“haproxy_ssl: false”解决了问题]宁“haproxy-install.yml”剧本以考虑修改。然后 运行 你的 "setup-openstack.yml" 剧本!