Restoring OpenStack Services After the Physical Machine Is Restarted
Symptom
Functions are abnormal after the physical machine is restarted.
Key Process and Cause Analysis
Some services are not restored after the physical machine is restarted. Run the following command on the controller node to check the statuses of main services:
- Import environment variables.
source ~/.admin-openrc
- Check the status of the memcached service. If "active (running)" is returned, the status is normal. If "failed" is returned, the status is abnormal. If the status is abnormal, restore the service by referring to 1.
systemctl status memcached.service
Figure 1 Normal memcached service
Figure 2 Abnormal memcached service
- Check the status of the Nova service. "up" indicates that the status is normal, and "down" indicates that the status is abnormal.
openstack compute service list
Figure 3 Nova service status
- Check the status of the Cinder service. "up" indicates that the status is normal, and "down" indicates that the status is abnormal.
openstack volume service list
Figure 4 Cinder service status
- Check the Neutron service status. If Alive is : - ) and State is UP, the service is normal. Otherwise, the service is abnormal.
openstack network agent list
Figure 5 Neutron service status
Conclusion and Solution
After checking the services statuses, perform the following steps to restore the abnormal service:
- Run the following command on the controller node to restore the memcached service:
systemctl restart memcached.service
- Restore the Nova service.
- Run the following command on the controller node:
systemctl restart openstack-nova-api.service openstack-nova-scheduler.service openstack-nova-conductor.service openstack-nova-novncproxy.service
- Run the following command on the compute node:
systemctl restart libvirtd.service openstack-nova-compute.service
- Run the following command on the controller node:
- Restore the Cinder service.
- Run the following command on the controller node:
systemctl restart openstack-cinder-api.service openstack-cinder-scheduler.service
- Run the following command on the compute node:
systemctl start rpcbind.service nfs-server.service tgtd.service iscsid.service openstack-cinder-volume.service openstack-cinder-backup.service
- Run the following command on the controller node:
- Restore the Neutron service.
- Run the following command on the controller node:
systemctl restart neutron-server.service neutron-openvswitch-agent.service neutron-metadata-agent.service neutron-dhcp-agent.service neutron-l3-agent.service neutron-metering-agent.service
- Run the following command on the compute node:
systemctl restart neutron-openvswitch-agent.service neutron-metadata-agent.service neutron-dhcp-agent.service neutron-l3-agent.service
- Run the following command on the controller node:
Parent topic: OpenStack