笔者日前部署openstack-ocata遇到一坑 glance服务无法正常启动
首先就是服务正常使用然后好好的,好好的 突然之间glance就不嫩用了!
查一下是服务没有启动,手动启动一下,发现提示服务重启次数太多,然后就自己挂了
● openstack-glance-api.service - OpenStack Image Service (code-named Glance) API server Loaded: loaded (/usr/lib/systemd/system/openstack-glance-api.service; enabled; vendor preset: disabled) Active: failed (Result: start-limit) since Thu 2017-07-13 15:12:24 CST; 313ms ago Process: 81979 ExecStart=/usr/bin/glance-api (code=exited, status=1/FAILURE) Main PID: 81979 (code=exited, status=1/FAILURE) Jul 13 15:12:24 node01 systemd[1]: Unit openstack-glance-api.service entered failed state. Jul 13 15:12:24 node01 systemd[1]: openstack-glance-api.service failed. Jul 13 15:12:24 node01 systemd[1]: openstack-glance-api.service holdoff time over, scheduling restart. Jul 13 15:12:24 node01 systemd[1]: start request repeated too quickly for openstack-glance-api.service Jul 13 15:12:24 node01 systemd[1]: Failed to start OpenStack Image Service (code-named Glance) API server. Jul 13 15:12:24 node01 systemd[1]: Unit openstack-glance-api.service entered failed state. Jul 13 15:12:24 node01 systemd[1]: openstack-glance-api.service failed. ● openstack-glance-registry.service - OpenStack Image Service (code-named Glance) Registry server Loaded: loaded (/usr/lib/systemd/system/openstack-glance-registry.service; enabled; vendor preset: disabled) Active: failed (Result: start-limit) since Thu 2017-07-13 15:12:24 CST; 319ms ago Process: 81980 ExecStart=/usr/bin/glance-registry (code=exited, status=1/FAILURE) Main PID: 81980 (code=exited, status=1/FAILURE) Jul 13 15:12:24 node01 systemd[1]: Unit openstack-glance-registry.service entered failed state. Jul 13 15:12:24 node01 systemd[1]: openstack-glance-registry.service failed. Jul 13 15:12:24 node01 systemd[1]: openstack-glance-registry.service holdoff time over, scheduling restart. Jul 13 15:12:24 node01 systemd[1]: start request repeated too quickly for openstack-glance-registry.service Jul 13 15:12:24 node01 systemd[1]: Failed to start OpenStack Image Service (code-named Glance) Registry server. Jul 13 15:12:24 node01 systemd[1]: Unit openstack-glance-registry.service entered failed state. Jul 13 15:12:24 node01 systemd[1]: openstack-glance-registry.service failed.
于是
#grep ‘fail‘ /lib/systemd/system/openstack-glance-api.service Restart=on-failure #sed -i ‘/fail/ s/^/#/g‘ /lib/systemd/system/openstack-glance-api.service #systemctl daemon-reload
再次重启服务,报错信息变成
● openstack-glance-api.service - OpenStack Image Service (code-named Glance) API server Loaded: loaded (/usr/lib/systemd/system/openstack-glance-api.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2017-07-13 15:18:42 CST; 10s ago Process: 83673 ExecStart=/usr/bin/glance-api (code=exited, status=1/FAILURE) Main PID: 83673 (code=exited, status=1/FAILURE) Jul 13 15:18:41 node01 systemd[1]: Started OpenStack Image Service (code-named Glance) API server. Jul 13 15:18:41 node01 systemd[1]: Starting OpenStack Image Service (code-named Glance) API server... Jul 13 15:18:42 node01 glance-api[83673]: ERROR: Unable to locate paste config file for glance-api. Jul 13 15:18:42 node01 systemd[1]: openstack-glance-api.service: main process exited, code=exited, status=1/FAILURE Jul 13 15:18:42 node01 systemd[1]: Unit openstack-glance-api.service entered failed state. Jul 13 15:18:42 node01 systemd[1]: openstack-glance-api.service failed. ● openstack-glance-registry.service - OpenStack Image Service (code-named Glance) Registry server Loaded: loaded (/usr/lib/systemd/system/openstack-glance-registry.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Thu 2017-07-13 15:18:42 CST; 10s ago Process: 83674 ExecStart=/usr/bin/glance-registry (code=exited, status=1/FAILURE) Main PID: 83674 (code=exited, status=1/FAILURE) Jul 13 15:18:41 node01 systemd[1]: Started OpenStack Image Service (code-named Glance) Registry server. Jul 13 15:18:41 node01 systemd[1]: Starting OpenStack Image Service (code-named Glance) Registry server... Jul 13 15:18:42 node01 glance-registry[83674]: ERROR: Unable to locate paste config file for glance-registry. Jul 13 15:18:42 node01 systemd[1]: openstack-glance-registry.service: main process exited, code=exited, status=1/FAILURE Jul 13 15:18:42 node01 systemd[1]: Unit openstack-glance-registry.service entered failed state. Jul 13 15:18:42 node01 systemd[1]: openstack-glance-registry.service failed.
发现无法找到paste文件,再次回头来看看glance-api.conf 发现这么一行
#If the paste configuration file is not found, the service will not start. # …………………… # (string value) #config_file = glance-api-paste.ini
那么找找这个文件呢
#rpm -ql openstack-glance|grep glance-api-paste.ini > /dev/null # echo $? 1
于是乎
ln -s/usr/share/glance/glance-api-dist-paste.ini /usr/share/glance/glance-api-paste.ini ln -s/usr/share/glance/glance-registry-dist-paste.ini /usr/share/glance/glance-registry-paste.ini
本文出自 “NB小菜鸟” 博客,请务必保留此出处http://309692348.blog.51cto.com/728319/1947228
原文地址:http://309692348.blog.51cto.com/728319/1947228