按照官方手册最小化安装完成后重启httpd服务失败,journalctl -ex查询显示错误信息如下:
Mar 13 12:25:24 controller python2[24903]: File "/usr/share/openstack-dashboard/openstack_dashboard/settings.py", line 29, i
Mar 13 12:25:24 controller python2[24903]: import horizon
Mar 13 12:25:24 controller python2[24903]: ImportError: No module named horizon
Mar 13 12:25:24 controller systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 13 12:25:24 controller systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
Mar 13 12:25:24 controller python2[24903]: File "/usr/share/openstack-dashboard/openstack_dashboard/settings.py", line 29, i
Mar 13 12:25:24 controller python2[24903]: import horizon
Mar 13 12:25:24 controller python2[24903]: ImportError: No module named horizon
Mar 13 12:25:24 controller systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 13 12:25:24 controller systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
应该是python没有找到horizon包。
检查dashboard安装目录,发现确实没有找到horizon包,显然是安装遗漏了horizon,需要自己从官方代码仓里面拷贝过来
操作方法供参考:
$ git clone https://git.openstack.org/openstack/horizon -b stable/train --depth=1
$ cd horizon
$ cp -rf ./horizon /usr/share/openstack-dashboard/
$ systemctl restart httpd
纠正后,此问题消失,如果还不行的话,就要参考另外一位大佬的帖子了:
易陆发现/bbs168x - BBS168xhttp://wwww.yunshb.cn/thread-1846-1-1.html,
官方dashboard安装指导书: