practice_glance - meetbill/op_practice_book GitHub Wiki

镜像服务

安装

官方安装手册

FAQ

(1)上传镜像失败,报503

[root@localhost ~]# openstack image create "cirros"   --file cirros-0.3.4-x86_64-disk.img   --disk-format qcow2 --container-format bare   --public
503 Service Unavailable: The server is currently unavailable. Please try again at a later time. (HTTP 503)

日志

[root@localhost ~]# tail /var/log/glance/api.log
2017-07-16 18:55:05.018 21618 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}

经分析是keystone_authtoken处glance的密码设置为了glance连接数据库的密码,此处密码应该是为认证服务中你为 glance 用户设置的密码。

其他

目前使用的v2版glance

V1 : 
glance 分两部分  
     glance-api  :  提供 rest 接口,接收其他组件的请求,发送给glance-registry; 去后端存储设备拉取镜像
     glance-registry  :  连接数据库,并将查询道德镜像的元数据发送给glance-api。
 
V2 :  进行了改进
  glance-api做了所有的工作

故主要是glance-api中需要配置连接数据库连接认证服务,镜像存储目录三大类配置