Anteriormente, recebia a seguinte mensagem de erro: -
root@controller:/home/XXXXXX# glance image-create --name "cirros-0.3.3-x86_64" - -file /tmp/images/cirros-0.3.3-x86_64-disk.img --disk-format qcow2 --container-format bare --is-public True --progress
[=============================>] 100%
Request returned failure status.
Invalid OpenStack Identity credentials.
Problema resolvido alterando o seguinte em glance-api.conf
& glance-registry.conf
:
[keystone_authtoken]
auth_uri = __http://controller:5000/v2.0
identity_uri = __http://controller:35357
admin_tenant_name = service
admin_user = XXXXXX
admin_password = XXXXXX
Para isso:
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = XXXXXX
admin_password = XXXXXX
auth_uri = __http://controller:5000
VALIDAÇÃO:
root@controller:/home/XXXXXX# nano /etc/glance/glance-api.conf
root@controller:/home/XXXXXX# nano /etc/glance/glance-registry.conf
root@controller:/home/XXXXXX# service glance-registry restart
glance-registry stop/waiting
glance-registry start/running, process 7550
root@controller:/home/XXXXXX# service glance-api restart
glance-api stop/waiting
glance-api start/running, process 7563
root@controller:/home/XXXXXX#
root@controller:/home/XXXXXX# source admin-openrc.sh
root@controller:/home/XXXXXX# glance image-create --name "cirros-0.3.3-x86_64" --file /tmp/images/cirros-0.3.3-x86_64-disk.img --disk-format qcow2 --container-format bare --is-public True --progress
[=============================>] 100%
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | 51b8afbd2b6d36d7012280e9ede51e7e |
| container_format | bare |
| created_at | 2015-06-08T18:14:12 |
| deleted | False |
| deleted_at | None |
| disk_format | qcow2 |
| id | 9a8b12c9-f0d6-43a4-a23a-f4cc67fe89f1 |
| is_public | True |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-0.3.3-x86_64 |
| owner | c3eab5d97c514aa4aec53ba1dc5aae40 |
| protected | False |
| size | 955802 |
| status | active |
| updated_at | 2015-06-08T18:14:12 |
| virtual_size | None |
+------------------+--------------------------------------+
root@controller:/home/XXXXXX# glance image-list
+--------------------------------------+---------------------+-------------+------------------+--------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+---------------------+-------------+------------------+--------+--------+
| 9a8b12c9-f0d6-43a4-a23a-f4cc67fe89f1 | cirros-0.3.3-x86_64 | qcow2 | bare | 955802 | active |
+--------------------------------------+---------------------+-------------+------------------+--------+--------+