nova-status upgrade check 报错403解决办法

我在安装openstack stein版本时,nova组件安装完成,验证环节遇到一个403报错

[[email protected] ~]# nova-status upgrade check
错误:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/nova/cmd/status.py", line 515, in main
ret = fn(*fn_args, **fn_kwargs)
File "/usr/lib/python2.7/site-packages/oslo_upgradecheck/upgradecheck.py", line 99, in check
result = func(self)
File "/usr/lib/python2.7/site-packages/nova/cmd/status.py", line 160, in _check_placement
versions = self._placement_get("/")
File "/usr/lib/python2.7/site-packages/nova/cmd/status.py", line 150, in _placement_get
return client.get(path, raise_exc=True).json()
File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 375, in get
return self.request(url, 'GET', **kwargs)
File "/usr/lib/python2.7/site-packages/keystoneauth1/adapter.py", line 237, in request
return self.session.request(url, method, **kwargs)
File "/usr/lib/python2.7/site-packages/keystoneauth1/session.py", line 890, in request
raise exceptions.from_response(resp, method, url)
Forbidden: Forbidden (HTTP 403)

这个报错困扰我很久,查询具体的日志,一个是placement的日志

[[email protected] ~]# tail -f /var/log/placement/placement-api.log 
AH01630: client denied by server configuration: /usr/bin/placement-api
AH01630: client denied by server configuration: /usr/bin/placement-api
AH01630: client denied by server configuration: /usr/bin/placement-api
AH01630: client denied by server configuration: /usr/bin/placement-api
AH01630: client denied by server configuration: /usr/bin/placement-api
AH01630: client denied by server configuration: /usr/bin/placement-api
AH01630: client denied by server configuration: /usr/bin/placement-api
AH01630: client denied by server configuration: /usr/bin/placement-api
AH01630: client denied by server configuration: /usr/bin/placement-api
AH01630: client denied by server configuration: /usr/bin/placement-api
AH01630: client denied by server configuration: /usr/bin/placement-api
AH01630: client denied by server configuration: /usr/bin/placement-api

nova的日志毫无头绪,只有placement的日志能看出是权限问题

执行placement 检查时是正常的

[[email protected] ~]# placement-status upgrade check
+----------------------------------+
| Upgrade Check Results |
+----------------------------------+
| Check: Missing Root Provider IDs |
| Result: Success |
| Details: None |
+----------------------------------+
| Check: Incomplete Consumers |
| Result: Success |
| Details: None |
+----------------------------------+

就是检查nova的时候出问题,然后搜索半天,获得信息是这是个BUG,然后果然是apache的目录权限问题,按这个小哥的方法成功解决问题

[[email protected] ~(keystone)]# vi /etc/httpd/conf.d/00-nova-placement-api.conf
# add near line 15
<Directory /usr/bin>
Require all granted
</Directory>
</VirtualHost>

执行nova检查也成功了

[[email protected] ~]# nova-status upgrade check
+--------------------------------+
| Upgrade Check Results |
+--------------------------------+
| Check: Cells v2 |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Placement API |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Ironic Flavor Migration |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Request Spec Migration |
| Result: Success |
| Details: None |
+--------------------------------+
| Check: Console Auths |
| Result: Success |
| Details: None |
+--------------------------------+

小哥的链接如下:

https://www.server-world.info/en/note?os=CentOS_7&p=openstack_stein&f=8

此条目发表在OpenStack分类目录,贴了标签。将固定链接加入收藏夹。

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注