Restarting a service in Openstack installed using Devstack
Rejoin stack screen as
./rejoin-stack.sh
and move to the specified service page using ctrl+a+", then type the number of the screen you need to go.
Hit 9 and then ctrl+C. The service would be stopped now. Re-run the following devstack command to start the service: (e.g for nova-network) cd /opt/stack/nova && /usr/bin/nova-network --config /etc/nova/nova.conf || echo "n-net failed to start" | tee "/opt/stack/stack/n-net.failure"
Hit Ctrl+d to detach from the stack screen.
To run screen command
screen -r
Now, you will be in screen window and you can see the list of Openstack services; Like "q-svc", "horizon", "key-access" in the bottom of the screen; The current active screen will be marked with * like "horizon*"
To move to specific Openstack service press
"Ctrl + a" and "0-9"
Example: "Ctrl + a" 5
to jump to actual service; You can also move to next or previous screen using the below commands
"Ctrl + a" and n --- > for next
"Ctrl + a" and p --- > for previous
Now to stop and start the service; Go the respective screen window and press
"Ctrl + c"
To stop the service; This will now show the bash screen in the respective screen window; and to start the service, press UP arrow mark to see the last executed command in the screen window and press enter to start the same.
Life is easier with screen to start and stop the Openstack services configured to run with Devstack.