发起问题

Revision history [back]

galnce image-list User is unauthorized for tenant (HTTP 401)

User f32c665b2db64682856944bc57d3f547 is unauthorized for tenant 9cace4dceeb248cc9a35fc36fb225e60 (HTTP 401)

root@openstack01:~# cat OS_SERVICE.sh export OS_PROJECT_DOMAIN_ID=default export OS_USER_DOMAIN_ID=default export OS_PROJECT_NAME=admin export OS_TENANT_NAME=admin export OS_SERVICE_TOKEN=openstack export OS_SERVICE_ENDPOINT=http://127.0.0.1:35357/v2.0/ export OS_USERNAME=glance export OS_PASSWORD=openstack export OS_AUTH_URL=http://${HOSTNAME}:35357/v2.0/

export OS_USERNAME=glance

export OS_PASSWORD=openstack

root@openstack01:~# keystone endpoint-list WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored). +----------------------------------+-----------+----------------------------+---------------------------------+----------------------------------+----------------------------------+ | id | region | publicurl | internalurl | adminurl | service_id | +----------------------------------+-----------+----------------------------+---------------------------------+----------------------------------+----------------------------------+ | b343c5f10bb6484e8f921e7d22c346ba | regionOne | http://10.0.2.15:5000/v2.0 | http://192.168.56.102:5000/v2.0 | http://192.168.56.102:35357/v2.0 | d04d52b1cd484699a1d1156a4329a8bd | | f00d6daaee4544edac0619612b404107 | regionOne | http://10.0.2.15:5000/v2.0 | http://192.168.56.102:5000/v2.0 | http://192.168.56.102:35357/v2.0 | 04de426bbf8549c7930d75108a3ca57d | +----------------------------------+-----------+----------------------------+---------------------------------+----------------------------------+----------------------------------+ root@openstack01:~# keystone service-list WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored). +----------------------------------+----------+----------+-------------------------+ | id | name | type | description | +----------------------------------+----------+----------+-------------------------+ | d04d52b1cd484699a1d1156a4329a8bd | glance | image | OpenStack Image Service | | 04de426bbf8549c7930d75108a3ca57d | keystone | identity | OpenStack Identity | +----------------------------------+----------+----------+-------------------------+ root@openstack01:~# keystone tenant-list WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored). +----------------------------------+---------+---------+ | id | name | enabled | +----------------------------------+---------+---------+ | 9cace4dceeb248cc9a35fc36fb225e60 | admin | True | | 0ec96c2ffd6c4355bb0135a070ac4e3d | service | True | +----------------------------------+---------+---------+ root@openstack01:~# keystone user-list WARNING: Bypassing authentication using a token & endpoint (authentication credentials are being ignored). +----------------------------------+--------+---------+-------+ | id | name | enabled | email | +----------------------------------+--------+---------+-------+ | 838c6e67d2de46c7b6930dc8b4950a33 | admin | True | | | f32c665b2db64682856944bc57d3f547 | glance | True | | +----------------------------------+--------+---------+-------+ root@openstack01:~# vim OS_SERVICE.sh root@openstack01:~# source OS_SERVICE.sh root@openstack01:~# glance image-list User f32c665b2db64682856944bc57d3f547 is unauthorized for tenant 9cace4dceeb248cc9a35fc36fb225e60 (HTTP 401) root@openstack01:~# glance --debug image-create --name myFirstImage --is-public true --container-format bare --disk-format qcow2 --file cirros-0.3.1-x86_64-disk.img User f32c665b2db64682856944bc57d3f547 is unauthorized for tenant 9cace4dceeb248cc9a35fc36fb225e60 (HTTP 401)