openstack报错解决二

在安装完glance服务之后,配置了两个文件

一个是glance-api.conf,另一个是glance-registry.conf

配置完按步骤启动服务,然后执行如下命令

linux-ffun:~ # glance image-create --name "cirros" \
>   --file cirros-0.3.4-x86_64-disk.img \
>   --disk-format qcow2 --container-format bare \
>   --visibility public --progress
WARNING: The client is falling back to v1 because the accessing to v2 failed. This behavior will be removed in future versions
usage: glance [--version] [-d] [-v] [--get-schema] [--timeout TIMEOUT]
              [--no-ssl-compression] [-f] [--os-image-url OS_IMAGE_URL]
              [--os-image-api-version OS_IMAGE_API_VERSION]
              [--profile HMAC_KEY] [-k] [--os-cert OS_CERT]
              [--cert-file OS_CERT] [--os-key OS_KEY] [--key-file OS_KEY]
              [--os-cacert <ca-certificate-file>] [--ca-file OS_CACERT]
              [--os-username OS_USERNAME] [--os-user-id OS_USER_ID]
              [--os-user-domain-id OS_USER_DOMAIN_ID]
              [--os-user-domain-name OS_USER_DOMAIN_NAME]
              [--os-project-id OS_PROJECT_ID]
              [--os-project-name OS_PROJECT_NAME]
              [--os-project-domain-id OS_PROJECT_DOMAIN_ID]
              [--os-project-domain-name OS_PROJECT_DOMAIN_NAME]
              [--os-password OS_PASSWORD] [--os-tenant-id OS_TENANT_ID]
              [--os-tenant-name OS_TENANT_NAME] [--os-auth-url OS_AUTH_URL]
              [--os-region-name OS_REGION_NAME]
              [--os-auth-token OS_AUTH_TOKEN]
              [--os-service-type OS_SERVICE_TYPE]
              [--os-endpoint-type OS_ENDPOINT_TYPE]
              <subcommand> ...
glance: error: unrecognized arguments: --visibility public

很明显错误原因是: --visibility不被支持了,去掉: --visibility

然后再次执行

linux-ffun:~ # glance image-create --name "cirros"   --file cirros-0.3.4-x86_64-disk.img   --disk-format qcow2 --container-format bare    --progress
WARNING: The client is falling back to v1 because the accessing to v2 failed. This behavior will be removed in future versions
[=============================>] 100%
503 Service Unavailable: The server is currently unavailable. Please try again at a later time. (HTTP 503)

出现503错误,查看 /var/log/glance下的日志记录,说是有一个wigft模块没有加载(具体什么模块记不清了)


再此检查两个配置文件

发现是密码错误,我在安装时按照官网步骤安装,但是在创建数据库后,需要手动设置密码。

在配置环节,我设置的密码是user,因此需要修改配置文件的密码才行。


最终效果

linux-ffun:~ # glance image-create --name "cirros"   --file cirros-0.3.4-x86_64-disk.img   --disk-format qcow2 --container-format bare   --progress
[=============================>] 100%
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | ee1eca47dc88f4879d8a229cc70a07c6     |
| container_format | bare                                 |
| created_at       | 2016-02-02T09:05:19Z                 |
| disk_format      | qcow2                                |
| id               | 74f9a935-682a-4671-bf27-46be9507aea6 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | cirros                               |
| owner            | a5ec9d2f7b114178b74331628b0ba3d5     |
| protected        | False                                |
| size             | 13287936                             |
| status           | active                               |
| tags             | []                                   |
| updated_at       | 2016-02-02T09:05:20Z                 |
| virtual_size     | None                                 |
| visibility       | private                              |
+------------------+--------------------------------------+
linux-ffun:~ #


注意密码是指此处的密码:

[keystone_authtoken]
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = GLANCE_PASS

[paste_deploy]
...
flavor = keystone
将password的密码设置为在数据库创建时给glance用户设置的密码

发布了276 篇原创文章 · 获赞 226 · 访问量 79万+
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 编程工作室 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览