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

asked 2012-06-15 03:09:49 -0600

Vincent gravatar image

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.

edit retag flag offensive close merge delete

6 answers

Sort by ยป oldest newest most voted

answered 2012-06-22 16:54:08 -0600

dtroyer gravatar image

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

edit flag offensive delete link more

answered 2012-06-28 14:07:42 -0600

marco-consonni gravatar image

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?

edit flag offensive delete link more

answered 2012-06-28 16:19:20 -0600

marco-consonni gravatar image


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

edit flag offensive delete link more

answered 2012-06-29 08:03:00 -0600

marco-consonni gravatar image

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.

edit flag offensive delete link more

answered 2012-07-25 15:21:07 -0600

marco-consonni gravatar image

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

OS_BIN_ROOT=/opt/stack/ OS_LOG_ROOT=/var/log/openstack OS_CFG_ROOT=/etc/




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}'

edit flag offensive delete link more

answered 2012-09-23 06:09:56 -0600

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?

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2012-06-15 03:09:49 -0600

Seen: 2,245 times

Last updated: Sep 23 '12