初始化keystone变量报错

ITdou 发布于 2018/09/09 19:13
阅读 314
收藏 0

1、创建keystone.auth

#This file contains environmental variables used to access Keystone
# Host address
HOST_IP=10.0.2.16 #The Management Address
# Keystone definitions
KEYSTONE_REGION=RegionOne
ADMIN_PASSWORD=admin_pass
SERVICE_PASSWORD=service_pass
export SERVICE_TOKEN="ADMIN"
export SERVICE_ENDPOINT="http://10.0.2.16:35357/v2.0" 
SERVICE_TENANT_NAME=service

2、执行 keystone.auth 脚本,并验证这些环境变量是否被设置

source keystone.auth
set | grep SERVICE

3、快速检查以查看 Keystone 功能是否正常

keystone discover

结果报错:

/usr/lib/python2.7/dist-packages/keystoneclient/shell.py:64: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
  'python-keystoneclient.', DeprecationWarning)
/usr/lib/python2.7/dist-packages/keystoneclient/httpclient.py:371: DeprecationWarning: Constructing an HTTPClient instance without using a session is deprecated as of the 1.7.0 release and may be removed in the 2.0.0 release.
  'the 2.0.0 release.', DeprecationWarning)
/usr/lib/python2.7/dist-packages/keystoneclient/session.py:140: DeprecationWarning: keystoneclient.session.Session is deprecated as of the 2.1.0 release in favor of keystoneauth1.session.Session. It will be removed in future releases.
  DeprecationWarning)
Keystone found at http://localhost:35357
    - supports version v3.6 (stable) here http://localhost:35357/v3/
ERROR:keystoneclient.generic.client:Failed to check keystone extensions.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/keystoneclient/generic/client.py", line 153, in _check_keystone_extensions
    'application/json'})
  File "/usr/lib/python2.7/dist-packages/keystoneclient/httpclient.py", line 747, in _request
    return self._adapter.request(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 331, in request
    resp = super(LegacyJsonAdapter, self).request(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/adapter.py", line 98, in request
    return self.session.request(url, method, **kwargs)
  File "/usr/lib/python2.7/dist-packages/positional/__init__.py", line 94, in inner
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/keystoneclient/session.py", line 420, in request
    raise exceptions.from_response(resp, method, url)
NotFound: The resource could not be found. (HTTP 404) (Request-ID: req-1d47ee7a-4cda-419b-960d-ea0c9b0327e8)
    - supports version v2.0 (stable) here http://localhost:35357/v2.0/
        - and s3tokens: OpenStack S3 API
        - and OS-REVOKE: OpenStack Revoke API
        - and OS-FEDERATION: OpenStack Federation APIs
        - and OS-KSADM: OpenStack Keystone Admin
        - and OS-SIMPLE-CERT: OpenStack Simple Certificate API
        - and OS-OAUTH1: OpenStack OAUTH1 API
        - and OS-EC2: OpenStack EC2 API

加载中
返回顶部
顶部