Is there a script simply to start or restart all the services?

Asked by Vincent Hou

Each time we run the script, the databases will be recreated, all the instances and volumes will be removed... It appears that everything gets reset.
I think it is a common demand that we simply restart all the services with a script, keeping all the current database data, instances, volumes, etc. However, I haven't found any script in devstack about it.
It has been a while, since devstack started developing. Is any there any concern that prevents us fulfilling this demand?
If I stop all the services started by, is it possible for me simply to start or restart all the services without deleting the data, instances, volumes, etc?
Thank you in advance.

Question information

English Edit question
devstack Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Dean Troyer (dtroyer) said :

There is a blueprint for this but it hasn't been claimed by anyone yet.

Revision history for this message
Marco CONSONNI (marco-consonni) said :

According to the comment you find here, script is what you're looking for.

Actually I tested it but it seems to have problems with nova-volume.

BTW I found out that when you reboot the machine (I'm running a single node deployment) all the OpenSteck services are NOT automatically restarted.

I tried to find out the reason whey nova-volume does not restart but I cannot find the log.

Does anyone know where it is?

Revision history for this message
Marco CONSONNI (marco-consonni) said :


I'm back with the answer to ... my question :)

Daemons log messages go to stdout, by default and devstack uses "screens" for displaying them onto different logical screens (see

I'm not very familiar with screens and, to be honest, I prefer to have all the messages logged onto a suitable file I can look at with the old "tail -f" technique.

Fortunately this is possible by indicating in localrc file that you want to have a behavior like that.
You just need to define SCREEN_LOGDIR and voila` (

The point is that we need to re-install openstack by calling

Revision history for this message
Marco CONSONNI (marco-consonni) said :

Hello again.

I looked into and it seems to me that it doesn't implement what the comment claims.
Actually it doesn't restart the daemons, it just rejoins the screen to the daemon.

Revision history for this message
Marco CONSONNI (marco-consonni) said :

At the end I wrote a couple of scripts myself.

I noticed that mysql and rabbitmq are started as services when the node boots: you don't need to boot 'em yourself.

These are the scripts (hope they help):

---- START ----

#!/usr/bin/env bash

# Define Directories




# Start Glance

${OS_BIN_GLANCE}/glance-registry --config-file=${OS_CFG_GLANCE}/glance-registry.conf --log-file=${OS_LOG_GLANCE}/glance-registry.log > ${OS_LOG_GLANCE}/glance-registry.out 2>&1 &
${OS_BIN_GLANCE}/glance-api --config-file=${OS_CFG_GLANCE}/glance-api.conf --log-file=${OS_LOG_GLANCE}/glance-api.log > ${OS_LOG_GLANCE}/glance-api.out 2>&1 &

# Start Keystone
${OS_BIN_KEYSTONE}/keystone-all --config-file ${OS_CFG_KEYSTONE}/keystone.conf --log-config ${OS_CFG_KEYSTONE}/logging.conf -d --debug --log-file=${OS_LOG_KEYSTONE}/keystone-all.log > ${OS_LOG_KEYSTONE}/keystone-all.out 2>&1 &

# For some mysterious reason we need to call this command before starting nova-volume
# Not doing this results in a nova-volume failure
sudo losetup -f --show /opt/stack/data/stack-volumes-backing-file

# Not sure the following is always required, anyway it is for launching instances with keys (qemu)
sudo modprobe nbd

# Start Nova
${OS_BIN_NOVA}/nova-api --log-file=${OS_LOG_NOVA}/nova-api.log > ${OS_LOG_NOVA}/nova-api.out 2>&1 &
sg libvirtd ${OS_BIN_NOVA}/nova-compute --log-file=${OS_LOG_NOVA}/nova-compute.log > ${OS_LOG_NOVA}/nova-compute.out 2>&1 &
${OS_BIN_NOVA}/nova-cert --log-file=${OS_LOG_NOVA}/nova-cert.log > ${OS_LOG_NOVA}/nova-cert.out 2>&1 &
${OS_BIN_NOVA}/nova-network --log-file=${OS_LOG_NOVA}/nova-network.log > ${OS_LOG_NOVA}/nova-network.out 2>&1 &
${OS_BIN_NOVA}/nova-scheduler --log-file=${OS_LOG_NOVA}/nova-scheduler.log > ${OS_LOG_NOVA}/nova-scheduler.out 2>&1 &
${OS_BIN_ROOT}/noVNC/utils/nova-novncproxy --config-file ${OS_CFG_NOVA}/nova.conf --web ${OS_BIN_ROOT}/noVNC --log-file=${OS_LOG_NOVA}/nova-novncproxy.log > ${OS_LOG_NOVA}/nova-novncproxy.out 2>&1 &
${OS_BIN_NOVA}/nova-xvpvncproxy --config-file ${OS_CFG_NOVA}/nova.conf --log-file=${OS_LOG_NOVA}/nova-xvpvncproxy.log > ${OS_LOG_NOVA}/nova-xvpvncproxy.out 2>&1 &
${OS_BIN_NOVA}/nova-consoleauth --log-file=${OS_LOG_NOVA}/nova-consoleauth.log > ${OS_LOG_NOVA}/nova-consoleauth.out 2>&1 &
${OS_BIN_NOVA}/nova-objectstore --log-file=${OS_LOG_NOVA}/nova-objectstore.log > ${OS_LOG_NOVA}/nova-objectstore.out 2>&1 &
${OS_BIN_NOVA}/nova-volume --log-file=${OS_LOG_NOVA}/nova-volume.log > ${OS_LOG_NOVA}/nova-volume.out 2>&1 &

--- STOP ---

#!/usr/bin/env bash

kill -9 `ps aux | grep -v grep | grep glance | awk '{print $2}'`
kill -9 `ps aux | grep -v grep | grep keystone | awk '{print $2}'`
kill -9 `ps aux | grep -v grep | grep -v dnsmasq | grep nova- | awk '{print $2}'`

Revision history for this message
Mukul Jain (mukul-j) said :

I am facing this same exact issue.

No resolution yet to this problem? Why do not we put in the above script in the code.

Some suggestions: why not use glance-control script to start all service in one command?

Can you help with this problem?

Provide an answer of your own, or ask Vincent Hou for more information if necessary.

To post a message you must log in.