2

我在一个节点中使用 devstack 安装了 openstack。这是我的 local.conf 文件:

[[local|localrc]]

ADMIN_PASSWORD=StrongAdminSecret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

PUBLIC_INTERFACE=enp0s8
HOST_IP=192.168.1.104
FLOATING_RANGE=192.168.1.0/24
PUBLIC_NETWORK_GATEWAY="192.168.1.1"
Q_FLOATING_ALLOCATION_POOL=start=192.168.1.120,end=192.168.1.140
enable_plugin gnocchi https://github.com/openstack/gnocchi master
enable_service gnocchi-api,gnocchi-metricd,gnocchi-grafana
enable_plugin ceilometer https://git.openstack.org/openstack/ceilometer.git
CEILOMETER_BACKEND=gnocchi
enable_service horizon
enable_plugin cloudkitty https://git.openstack.org/openstack/cloudkitty.git master
enable_service ck-api ck-proc
CLOUDKITTY_COLLECTOR=gnocchi

然后尝试从此链接安装 gnocchi 和 ceilometer: https : //dommgifer.gitbook.io/knowledge/openstack/ceilometer-and-gnocchi-install gnocchi 升级是可以的,但是升级 ceilometer 时会出现此错误:keystoneauth1.exceptions.http .Unauthorized:您提出的请求需要身份验证。(HTTP 401)(请求 ID:req-dd1d31cf-f0ae-4c92-a03b-a36b08139b53)

这是我的 ceilometer.conf 文件:

[DEFAULT]
transport_url = rabbit://openstack:StrongAdminSecret@192.168.1.104

[dispatcher_gnocchi]
filter_service_activity = False
archive_policy = high


[service_credentials]
auth_url = http://192.168.1.104/identity/v3
region_name = RegionOne
password = StrongAdminSecret
username = ceilometer
project_name = service
project_domain_id = default
user_domain_id = default
auth_type = password
interface = internalURL

[keystone_authtoken]
memcached_servers = localhost:11211
cafile = /opt/stack/data/ca-bundle.pem
project_domain_name = Default
project_name = service
user_domain_name = Default
password = StrongAdminSecret
username = ceilometer
auth_url = http://192.168.1.104/identity/v3
interface = public
auth_type = password}

这是我的 gnocchi.conf 文件:

[DEFAULT]
transport_url = rabbit://gnocchi:StrongAdminSecret@192.168.1.104

[api]
auth_mode = keystone
middlewares = oslo_middleware.cors.CORS
middlewares = keystonemiddleware.auth_token.AuthProtocol
auth_mode = keystone

[indexer]
url = mysql+pymysql://gnocchi:StrongAdminSecret@192.168.1.104/gnocchi

[keystone_authtoken]
auth_host = http://192.168.1.104/identity/v3
auth_protocol = http
admin_user = admin
admin_password = StrongAdminSecret
admin_tenant_name = admin
auth_url = http://192.168.1.104:identity/v3
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = gnocchi
password = StrongAdminSecret
interface = internalURL
region_name = RegionOne

[storage]
coordination_url = file:///var/lib/gnocchi/locks
file_basepath = /var/lib/gnocchi
driver = file

这是我的 admin-openrc.sh 文件:

export OS_AUTH_URL=http://192.168.1.104/identity   
export OS_AUTH_TYPE=password
export OS_PROJECT_ID=e250116cb5c0461f8c3d0a948fa47c2c
export OS_PROJECT_NAME="admin"
export OS_USER_DOMAIN_NAME="Default"
if [ -z "$OS_USER_DOMAIN_NAME" ]; then unset OS_USER_DOMAIN_NAME; fi
export OS_PROJECT_DOMAIN_ID="default"
if [ -z "$OS_PROJECT_DOMAIN_ID" ]; then unset OS_PROJECT_DOMAIN_ID; fi
unset OS_TENANT_ID
unset OS_TENANT_NAME
export OS_USERNAME="admin"
echo "Please enter your OpenStack Password for project $OS_PROJECT_NAME as user $OS_USERNAME: "
read -sr OS_PASSWORD_INPUT
export OS_PASSWORD="StrongAdminSecret"
export OS_REGION_NAME="RegionOne"
if [ -z "$OS_REGION_NAME" ]; then unset OS_REGION_NAME; fi
export OS_INTERFACE=public
export OS_IDENTITY_API_VERSION=3

我该如何解决这个错误?

4

0 回答 0