How to restart a specific openstack-service installed using devstack?
When ./stack.sh completes, openstack is ostensibly running.
as your stack user, you can then issue this command:
screen -dr
this should open up a screen session with windows for each of the services. the services are running from those screen terminal sessions or ptys.
you can simply kill the process and restart it from those ptys.
of course standard logical order of operations apply. if mysql is dead, nova-api won't start up very well. same goes for keystone being off. so, pay attention to dependencies.
if you are unsure of how to execute the services in the terminals, first do a ps auxww | grep service
or something to that affect. That should provide some insight on how to run the binaries again.
Good luck.
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.
When ./stack.sh completes, openstack is ostensibly running.
as your stack user, you can then issue this command:
screen -dr
this should open up a screen session with windows for each of the services. the services are running from those screen terminal sessions or ptys.
you can simply kill the process and restart it from those ptys.
of course standard logical order of operations apply. if mysql is dead, nova-api won't start up very well. same goes for keystone being off. so, pay attention to dependencies.
if you are unsure of how to execute the services in the terminals, first do a ps auxww | grep service
or something to that affect. That should provide some insight on how to run the binaries again.
Good luck.
rejoin-stack.sh was remove according this git commit, you need to do screen -c /path/to/devstack_install/stack-screenrc
Run this command as root (for example: to start keystone service)
$ systemctl start [email protected]
You can use restart
, stop
, status
, etc. in place of start
as your need.
you can use wildcard as well. Like as below.
$ systemctl start devstack@*
=> it will start all devstack services.
Things has changed in new version devstack.
By default DevStack is run with all the services as systemd unit files. Systemd is now the default init system for nearly every Linux distro, and systemd encodes and solves many of the problems related to poorly running processes.
Assuming the unit n-cpu to make the examples more clear.
Enable a unit (allows it to be started):
sudo systemctl enable [email protected]
For more information, visit https://docs.openstack.org/devstack/latest/systemd.html
you can use systemctl start devstack@*
to restart every devstack service
© 2022 - 2024 — McMap. All rights reserved.