发起问题
0

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

提问于 2016-09-08 03:10:27 -0500

anonymous user

匿名

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)

edit retag flag offensive close merge delete

Comments

I don't know if your openstack was successfully deployed. You can use devstack to deploy openstack, and run devstack/openrc to configure OS_USERNAME, OS_PASSWORD and OS_PROJECTNAME. Set OS_PROJECT_NAME to override the default project 'demo'. Set OS_USERNAME to override the default user name 'demo'.

uestcjoel 图像uestcjoel ( 2016-10-09 04:20:13 -0500 )edit
0

回答 2016-10-09 04:28:17 -0500

I don't know if your openstack was successful deployd. You can use devstack to deploy openstack. Then run source openrc admin admin to configure a set of credentials. Then run glance image-list. I hope this can help you. Good lucky.

edit flag offensive delete link 更多
0

回答 2016-10-09 21:48:59 -0500

I don't know if your openstack was successfully deployed. You can use devstack to deploy openstack, and run devstack/openrc to configure OS_USERNAME, OS_PASSWORD and OS_PROJECTNAME. Set OS_PROJECT_NAME to override the default project 'demo'. Set OS_USERNAME to override the default user name 'demo'. Set ADMIN_PASSWORD to set the password for 'admin' and 'demo'. You can do this like: source openrc admin admin. Then try to use CLI like:glance image-list to verify that the installation is successful.You can see this: wh@ubuntu:~/devstack$ source openrc admin admin WARNING: setting legacy OS_TENANT_NAME to support cli tools. wh@ubuntu:~/devstack$ glance image-list +--------------------------------------+---------------------------------+ | ID | Name | +--------------------------------------+---------------------------------+ | dff7ce82-5453-427c-98b1-88422bf53e3c | cirros-0.3.4-x86_64-uec | | 38fab68d-e787-45de-b022-10d70a24b2b9 | cirros-0.3.4-x86_64-uec-kernel | | cb2a8ab4-a18c-48cc-817d-08d3caaf6659 | cirros-0.3.4-x86_64-uec-ramdisk | +--------------------------------------+---------------------------------+ wh@ubuntu:~/devstack$ echo OS_USERNAME OS_USERNAME wh@ubuntu:~/devstack$ echo $OS_PASSWORD nomoresecret wh@ubuntu:~/devstack$ echo $OS_USERNAME admin

I hope this can help you. Good lucky!

edit flag offensive delete link 更多

你的回答

Please start posting anonymously - your entry will be published after you log in or create a new account.

开始回答

提问工具

1 follower

统计

已提问: 2016-09-08 03:10:27 -0500

已查看: 623 次

最后更新: Oct 09 '16