报错
[root@controller ~]# glance image-list
Expecting to find domain in project. The server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error. (HTTP 400) (Request-ID: req-7daf2981-f576-485e-8d8c-e924980d28bd)
less /var/log/glance/api.log
less /var/log/keystone/keystone.log
两份日志文件没有获取到目标信息
解决方案
# RC 文件配置异常, 正确示例如下
export OS_USERNAME=admin
export OS_PASSWORD=ADMIN_PASS
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_AUTH_URL=http://controller:5000/v3
export OS_IDENTITY_API_VERSION=3
export OS_AUTH_TYPE=password
注意大小写、字段名、接口版本