我在控制器节点中的docker上安装了openstack magnum(ocata版本),因为我已经在主机上安装了newton,而newton二进制文件未正确安装,但是现在当我尝试运行magnum-service list命令时,输出为:< / p>
ERROR: 'NoneType' object has no attribute 'replace' (HTTP 500) (Request-ID: req-c5c279c2-9bc1-4672-90d3-410107880a4e)
magnum --debug服务列表:
DEBUG (extension:180) found extension EntryPoint.parse('token_endpoint = openstackclient.api.auth_plugin:TokenEndpoint')
DEBUG (extension:180) found extension EntryPoint.parse('v2token = keystoneauth1.loading._plugins.identity.v2:Token')
DEBUG (extension:180) found extension EntryPoint.parse('v3oauth1 = keystoneauth1.extras.oauth1._loading:V3OAuth1')
DEBUG (extension:180) found extension EntryPoint.parse('admin_token = keystoneauth1.loading._plugins.admin_token:AdminToken')
DEBUG (extension:180) found extension EntryPoint.parse('v3oidcauthcode = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAuthorizationCode')
DEBUG (extension:180) found extension EntryPoint.parse('v2password = keystoneauth1.loading._plugins.identity.v2:Password')
DEBUG (extension:180) found extension EntryPoint.parse('v3samlpassword = keystoneauth1.extras._saml2._loading:Saml2Password')
DEBUG (extension:180) found extension EntryPoint.parse('v3password = keystoneauth1.loading._plugins.identity.v3:Password')
DEBUG (extension:180) found extension EntryPoint.parse('v3oidcaccesstoken = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectAccessToken')
DEBUG (extension:180) found extension EntryPoint.parse('v3oidcpassword = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectPassword')
DEBUG (extension:180) found extension EntryPoint.parse('v3kerberos = keystoneauth1.extras.kerberos._loading:Kerberos')
DEBUG (extension:180) found extension EntryPoint.parse('token = keystoneauth1.loading._plugins.identity.generic:Token')
DEBUG (extension:180) found extension EntryPoint.parse('v3oidcclientcredentials = keystoneauth1.loading._plugins.identity.v3:OpenIDConnectClientCredentials')
DEBUG (extension:180) found extension EntryPoint.parse('v3tokenlessauth = keystoneauth1.loading._plugins.identity.v3:TokenlessAuth')
DEBUG (extension:180) found extension EntryPoint.parse('v3token = keystoneauth1.loading._plugins.identity.v3:Token')
DEBUG (extension:180) found extension EntryPoint.parse('v3totp = keystoneauth1.loading._plugins.identity.v3:TOTP')
DEBUG (extension:180) found extension EntryPoint.parse('password = keystoneauth1.loading._plugins.identity.generic:Password')
DEBUG (extension:180) found extension EntryPoint.parse('v3fedkerb = keystoneauth1.extras.kerberos._loading:MappedKerberos')
DEBUG (extension:180) found extension EntryPoint.parse('aodh-noauth = aodhclient.noauth:AodhNoAuthLoader')
DEBUG (session:337) REQ: curl -g -i -X GET http://controller:35357/v3 -H "Accept: application/json" -H "User-Agent: magnum keystoneauth1/2.12.1 python-requests/2.10.0 CPython/2.7.12"
INFO (connectionpool:213) Starting new HTTP connection (1): controller
DEBUG (connectionpool:395) "GET /v3 HTTP/1.1" 200 250
DEBUG (session:366) RESP: [200] Date: Mon, 24 Sep 2018 06:56:28 GMT Server: Apache/2.4.18 (Ubuntu) Vary: X-Auth-Token X-Distribution: Ubuntu x-openstack-request-id: req-58453c24-09de-44e2-a2c5-b37a99e4e310 Content-Length: 250 Content-Type: application/json
RESP BODY: {"version": {"status": "stable", "updated": "2016-10-06T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.7", "links": [{"href": "http://controller:35357/v3/", "rel": "self"}]}}
DEBUG (base:165) Making authentication request to http://controller:35357/v3/auth/tokens
DEBUG (connectionpool:395) "POST /v3/auth/tokens HTTP/1.1" 201 6941
DEBUG (base:170) {"token": {"is_domain": false, "methods": ["password"], "roles": [{"id": "8ef21622b17946e5b1a18957131f648a", "name": "admin"}, {"id": "502cd9efebb04bd3827640b146723e93", "name": "user"}], "expires_at": "2018-09-24T07:56:28.000000Z", "project": {"domain": {"id": "default", "name": "Default"}, "id": "7f5b52b3f61a4f71a00fc3f6c6d9232c", "name": "admin"}, "catalog": [{"endpoints": [{"url": "http://controller:9696", "interface": "admin", "region": "Tehran", "region_id": "Tehran", "id": "2b096a1f466240578bd176ac3d0afaf6"}, {"url": "http://controller:9696", "interface": "internal", "region": "Tehran", "region_id": "Tehran", "id": "d26d991f09664b539a81bcfe4d2db213"}, {"url": "http://controller:9696", "interface": "public", "region": "Tehran", "region_id": "Tehran", "id": "d5fe08da089543c19a3c4fe11eb3d05b"}], "type": "network", "id": "1ac84ac88f684c20a6a62c75a4090f18", "name": "neutron"}, {"endpoints": [{"url": "http://controller:9292", "interface": "internal", "region": "Tehran", "region_id": "Tehran", "id": "8c13fb4c3ac54d1aa2c5697c1e17f838"}, {"url": "http://controller:9292", "interface": "public", "region": "Tehran", "region_id": "Tehran", "id": "b940e0047549462e9772f8cd1262d605"}, {"url": "http://controller:9292", "interface": "admin", "region": "Tehran", "region_id": "Tehran", "id": "ec0db283a74a4127b459d1d182f92749"}], "type": "image", "id": "218a33dc6be14a738d24d5d5d9e4ee8a", "name": "glance"}, {"endpoints": [{"url": "http://controller:8004/v1/7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "internal", "region": "Tehran", "region_id": "Tehran", "id": "6faf56074d164ef597736f45951d6ffd"}, {"url": "http://controller:8004/v1/7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "public", "region": "Tehran", "region_id": "Tehran", "id": "b91e7ed746c44ee3ae506372ff37caab"}, {"url": "http://controller:8004/v1/7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "admin", "region": "Tehran", "region_id": "Tehran", "id": "ea71e861cf0740d48ffa1e3b52f19208"}], "type": "orchestration", "id": "2a3cc821104347f8a50400d2baaff43d", "name": "heat"}, {"endpoints": [{"url": "http://controller:8777", "interface": "internal", "region": "Tehran", "region_id": "Tehran", "id": "96ce47ce1afe4c66aba00e1703ed0eb0"}, {"url": "http://controller:8777", "interface": "public", "region": "Tehran", "region_id": "Tehran", "id": "bc53b46ed0134a169a0b4a0e9e721046"}, {"url": "http://controller:8777", "interface": "admin", "region": "Tehran", "region_id": "Tehran", "id": "c6cfb1d3e2d14d8e9856ddf1e3f4832a"}], "type": "metering", "id": "3bab377c64c5438090d82d32ac404872", "name": "ceilometer"}, {"endpoints": [{"url": "http://controller:5000/v3/", "interface": "public", "region": "Tehran", "region_id": "Tehran", "id": "30203075b93d44b88d40a4d3431fb447"}, {"url": "http://controller:35357/v3/", "interface": "internal", "region": "Tehran", "region_id": "Tehran", "id": "fd67bc46db2049539f36afd36f1e79e2"}, {"url": "http://controller:35357/v3/", "interface": "admin", "region": "Tehran", "region_id": "Tehran", "id": "fecf5cafcae54d04a76f236e8bb9c3d6"}], "type": "identity", "id": "69c3e22db5ca4925a470c8dbf3ca78a1", "name": "keystone"}, {"endpoints": [{"url": "http://controller:8774/v2.1/7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "public", "region": "Tehran", "region_id": "Tehran", "id": "07a0ce9b8c524340af077317008da39b"}, {"url": "http://controller:8774/v2.1/7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "admin", "region": "Tehran", "region_id": "Tehran", "id": "1a04d3e1a5734cba846dfd93c32665e0"}, {"url": "http://controller:8774/v2.1/7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "internal", "region": "Tehran", "region_id": "Tehran", "id": "4fc391d188794fa0b28f6d14e636deae"}], "type": "compute", "id": "a606e06af40f4faa9ca3b18b3eeafb51", "name": "nova"}, {"endpoints": [{"url": "http://controller:8080/v1/AUTH_7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "internal", "region": "Tehran", "region_id": "Tehran", "id": "2ab7e3b493c1465dad6c5b485b02ceb5"}, {"url": "http://controller:8080/v1/AUTH_7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "public", "region": "Tehran", "region_id": "Tehran", "id": "78f3fd8aa58e411595581a8d8768bd7c"}, {"url": "http://controller:8080/v1", "interface": "admin", "region": "Tehran", "region_id": "Tehran", "id": "e8e2dd4e3c434379bc44d4f784c6d0de"}], "type": "object-store", "id": "aa3a3ddfa0024966a574b27ec2af06d7", "name": "swift"}, {"endpoints": [{"url": "http://controller:8776/v1/7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "internal", "region": "Tehran", "region_id": "Tehran", "id": "6291788f2d0d407a95295e040df06674"}, {"url": "http://controller:8776/v1/7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "public", "region": "Tehran", "region_id": "Tehran", "id": "97195ab376c34550b37d8da4fa2b172a"}, {"url": "http://controller:8776/v1/7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "admin", "region": "Tehran", "region_id": "Tehran", "id": "dc88538325e246a3a3906c9a25e8948c"}], "type": "volume", "id": "be28bf09d9ef44f48d9badfe133ed97f", "name": "cinder"}, {"endpoints": [{"url": "http://controller:8776/v2/7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "admin", "region": "Tehran", "region_id": "Tehran", "id": "757361dea28c4b8787c6c40301313482"}, {"url": "http://controller:8776/v2/7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "public", "region": "Tehran", "region_id": "Tehran", "id": "b3475927386e4859aed918173b4f5dce"}, {"url": "http://controller:8776/v2/7f5b52b3f61a4f71a00fc3f6c6d9232c", "interface": "internal", "region": "Tehran", "region_id": "Tehran", "id": "db0b1c2a81c64a46a043ab48f8d666c2"}], "type": "volumev2", "id": "e14b62f9ab7146779883fc0c31f4e696", "name": "cinderv2"}, {"endpoints": [{"url": "http://controller:8000/v1", "interface": "admin", "region": "Tehran", "region_id": "Tehran", "id": "2629cb834728483480a7af73f9870645"}, {"url": "http://controller:8000/v1", "interface": "internal", "region": "Tehran", "region_id": "Tehran", "id": "5102fdb2b836407ea1bc5e7878a0f041"}, {"url": "http://controller:8000/v1", "interface": "public", "region": "Tehran", "region_id": "Tehran", "id": "7db9e6882c874546a0e0750f27998da9"}], "type": "cloudformation", "id": "f40a43a7c7094922b2336eb6fb2bbf2c", "name": "heat-cfn"}, {"endpoints": [{"url": "http://controller:9511/v1", "interface": "internal", "region": "Tehran", "region_id": "Tehran", "id": "0b1528bbe71d4b95848c93ba3246abcc"}, {"url": "http://controller:9511/v1", "interface": "admin", "region": "Tehran", "region_id": "Tehran", "id": "9b72490da74b44058d1f10290163ff34"}, {"url": "http://controller:9511/v1", "interface": "public", "region": "Tehran", "region_id": "Tehran", "id": "d131ce5383964b91990cf4989de08c35"}], "type": "container-infra", "id": "fbb700c7298741faaf9c8d3a60810908", "name": "magnum"}], "user": {"domain": {"id": "default", "name": "Default"}, "id": "0f48db6ef8ee4d0c86ffe747579fe78c", "name": "admin"}, "audit_ids": ["bhw-Dp3wTHqad34x4JVd1w"], "issued_at": "2018-09-24T06:56:28.000000Z"}}
DEBUG (session:337) REQ: curl -g -i -X GET http://controller:9511/v1/mservices -H "OpenStack-API-Version: container-infra latest" -H "X-Auth-Token: {SHA1}6fdfd1c001c639c7476888a9fdd9d72ecfc2c7ae" -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: None"
INFO (connectionpool:213) Starting new HTTP connection (1): controller
DEBUG (connectionpool:395) "GET /v1/mservices HTTP/1.1" 500 193
DEBUG (session:366) RESP: [500] OpenStack-API-Minimum-Version: container-infra 1.1 OpenStack-API-Maximum-Version: container-infra 1.6 OpenStack-API-Version: container-infra 1.6 vary: OpenStack-API-Version Content-Type: application/json Content-Length: 193 x-openstack-request-id: req-0a9e24cb-9c08-4620-96e4-1e844fac98bd Server: Werkzeug/0.14.1 Python/2.7.12 Date: Mon, 24 Sep 2018 06:56:29 GMT
RESP BODY: {"errors": [{"status": 500, "code": "server", "links": [], "title": "'NoneType' object has no attribute 'replace'", "detail": "'NoneType' object has no attribute 'replace'", "request_id": ""}]}
DEBUG (shell:694) 'NoneType' object has no attribute 'replace' (HTTP 500) (Request-ID: req-0a9e24cb-9c08-4620-96e4-1e844fac98bd)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/magnumclient/shell.py", line 691, in main
OpenStackMagnumShell().main(map(encodeutils.safe_decode, sys.argv[1:]))
File "/usr/lib/python2.7/dist-packages/magnumclient/shell.py", line 633, in main
args.func(self.cs, args)
File "/usr/lib/python2.7/dist-packages/magnumclient/v1/mservices_shell.py", line 22, in do_service_list
mservices = cs.mservices.list()
File "/usr/lib/python2.7/dist-packages/magnumclient/v1/mservices.py", line 68, in list
return self._list(self._path(path), "mservices")
File "/usr/lib/python2.7/dist-packages/magnumclient/common/base.py", line 121, in _list
resp, body = self.api.json_request('GET', url)
File "/usr/lib/python2.7/dist-packages/magnumclient/common/httpclient.py", line 366, in json_request
resp = self._http_request(url, method, **kwargs)
File "/usr/lib/python2.7/dist-packages/magnumclient/common/httpclient.py", line 350, in _http_request
error_json.get('debuginfo'), method, url)
InternalServerError: 'NoneType' object has no attribute 'replace' (HTTP 500) (Request-ID: req-0a9e24cb-9c08-4620-96e4-1e844fac98bd)
ERROR: 'NoneType' object has no attribute 'replace' (HTTP 500) (Request-ID: req-0a9e24cb-9c08-4620-96e4-1e844fac98bd)
现在magnum-api日志是:
Sep 24 14:21:37 C32 keystone-wsgi-admin[26838]: 2018-09-24 14:21:37.107 26838 INFO keystone.common.wsgi [req-6dca8e34-ab31-4b84-b403-8a6972886ce4
Sep 24 14:21:37 C32 magnum-api[17373]: 2018-09-24 14:21:37.329 11738 ERROR wsme.api [req-e1c16795-4ebe-4960-92ac-ca81513e2e2f - - - - -] Server-si
Sep 24 14:21:37 C32 magnum-api[17373]: Traceback (most recent call last):
Sep 24 14:21:37 C32 magnum-api[17373]: File "/var/lib/magnum/env/local/lib/python2.7/site-packages/wsmeext/pecan.py", line 85, in callfunction
Sep 24 14:21:37 C32 magnum-api[17373]: result = f(self, *args, **kwargs)
Sep 24 14:21:37 C32 magnum-api[17373]: File "<decorator-gen-28>", line 2, in get_all
Sep 24 14:21:37 C32 magnum-api[17373]: File "/var/lib/magnum/env/local/lib/python2.7/site-packages/magnum/common/policy.py", line 130, in wrappe
Sep 24 14:21:37 C32 magnum-api[17373]: exc=exception.PolicyNotAuthorized, action=action)
Sep 24 14:21:37 C32 magnum-api[17373]: File "/var/lib/magnum/env/local/lib/python2.7/site-packages/magnum/common/policy.py", line 97, in enforce
Sep 24 14:21:37 C32 magnum-api[17373]: add_policy_attributes(target)
Sep 24 14:21:37 C32 magnum-api[17373]: File "/var/lib/magnum/env/local/lib/python2.7/site-packages/magnum/common/policy.py", line 106, in add_po
Sep 24 14:21:37 C32 magnum-api[17373]: trustee_domain_id = admin_osc.keystone().trustee_domain_id
Sep 24 14:21:37 C32 magnum-api[17373]: File "/var/lib/magnum/env/local/lib/python2.7/site-packages/magnum/common/keystone.py", line 182, in trus
Sep 24 14:21:37 C32 magnum-api[17373]: access = self.domain_admin_auth.get_access(
Sep 24 14:21:37 C32 magnum-api[17373]: File "/var/lib/magnum/env/local/lib/python2.7/site-packages/magnum/common/keystone.py", line 148, in doma
Sep 24 14:21:37 C32 magnum-api[17373]: auth_url=self.auth_url,
Sep 24 14:21:37 C32 magnum-api[17373]: File "/var/lib/magnum/env/local/lib/python2.7/site-packages/magnum/common/keystone.py", line 49, in auth_
Sep 24 14:21:37 C32 magnum-api[17373]: return CONF[ksconf.CFG_LEGACY_GROUP].auth_uri.replace('v2.0', 'v3')
Sep 24 14:21:37 C32 magnum-api[17373]: AttributeError: 'NoneType' object has no attribute 'replace'
答案 0 :(得分:0)
看起来您在大酒瓶配置的 <div className="container">
<img className="vertical-align:right" src="../images/back-
stroke2.jpg" alt="swimmer"></img>
<span className="">Works.</span>
</div>
部分中缺少auth_uri
。
您可以使用Kolla作为参考。 https://github.com/openstack/kolla-ansible/blob/stable/ocata/ansible/roles/magnum/templates/magnum.conf.j2#L56
答案 1 :(得分:0)
此问题应通过稳定/多岩石的分支来解决,请参阅:
只需更新您的可拉树可存储库
git pull origin stable/rocky
并再次(重新)部署大酒瓶:
kolla-ansible -i inventory deploy -t magnum
答案 2 :(得分:0)
如果您的配置文件中也有www_authenticate_uri
,则可能是这样的:
www_authenticate_uri=http://localhost:5000
我更改了网址,并在末尾添加了v3。
www_authenticate_uri=http://localhost:5000/v3
这解决了我的问题。希望它也能解决您的问题!