尝试创建映像时遇到问题-找不到资源。(HTTP 404)
我执行以下步骤编辑/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/
编辑/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
同步数据库根目录@控制器:~# su -s /bin/sh -c“glance-管理数据库同步”glance
而当创造形象时却出错了
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条答案
按热度按时间w6lpcovy1#
问题是,你使用了错误的端口。
35357
是keystone的端口,但是openstack image create
应该触发port of glance,默认情况下是9292
。我认为你没有为openstack端点配置正确的端口。这些端口应该是由openstack endpoint create
命令创建的。m2xkgtsf2#
我编辑我的.rc和它的工作