When I try to create an image, I encounter a problem – The resource could not be found. (HTTP 404)
I do the following steps
edit the /etc/glance/glance-api.conf
[database]
connection = mysql+pymysql://glance:glance@localhost/glance
[DEFAULT]
rabbit_password = openstack
rabbit_userid = openstack
rabbit_host = localhost
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = openstack
memcached_servers = controller:11211
[paste_deploy]
flavor = keystone
[glance_store]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
Edit the /etc/glance/glance-registry.conf
[database]
connection = mysql+pymysql://glance:glance@localhost/glance
[keystone_authtoken]
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = openstack
memcached_servers = controller:11211
[paste_deploy]
flavor = keystone
sync DB
root@controller:~# su -s /bin/sh -c "glance-manage db_sync" glance
And while create image get eror
root@controller:~# openstack image create "cirros-0.4.0-x86_64" --file /tmp/cirros-0.4.0-x86_64-disk.img --disk-format qcow2 --container-format bare --public
(http://controller:35357/v2/schemas/image): The resource could not be found. (HTTP 404)
root@controller:~#
openstack --version
openstack 3.12.2
glance-api --version
15.0.2
2
Answers
Im edit my .rc and it works
The problem is, that you use the wrong port.
35357
is the port of keystone, butopenstack image create
should trigger the port of glance, which is by default9292
. I think you have not configured the correct ports for the openstack endpoints. These should have been created by theopenstack endpoint create
command.