搭建openstack环境时,镜像无法上传
新人提问,求各位前辈指点迷津
按照网上的一篇教程搭建openstack,一步步走到安装glance遇到了问题,我试图执行上传镜像的命令
glance image-create --name myFirstImage --is-public true --container-format bare --disk-format qcow2 --location http://download.cirros-cloud.net ... 3.1-x86_64-disk.img
结果报错
raise exception.NotAuthenticated(res.read())
NotAuthenticated: 401 Unauthorized
This server could not verify that you are authorized to access the document you requested. Either you supplied the wrong credentials (e.g., bad password), or your browser does not understand how to supply the credentials required.
Authentication required
(HTTP 500)
我看了一下,大约是权限不对,密码错误。在论坛上浏览了一下帖子,感觉是环境变量的问题。
这是我的环境变量
export OS_TENANT_NAME="admin"
export OS_USERNAME="admin"
export OS_PASSWORD="admin_pass"
export OS_AUTH_URL="http://192.168.1.50:5000/v2.0/"
注册用户时使用的参数是
HOST_IP=10.10.10.51
ADMIN_PASSWORD=${ADMIN_PASSWORD:-admin_pass}
SERVICE_PASSWORD=${SERVICE_PASSWORD:-service_pass}
export SERVICE_TOKEN="ADMIN"
export SERVICE_ENDPOINT="http://${HOST_IP}:35357/v2.0"
SERVICE_TENANT_NAME=${SERVICE_TENANT_NAME:-service}
实在不知道哪里的问题,当我把password从admin_pass改为其他时,会直接提示
Unable to communicate with identity service: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Not Authorized"}}. (HTTP 401)
累感不爱,还望各位大神拨冗解答