Ask Your Question
0

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

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

Vincent gravatar image

Each time we run the stack.sh 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 stack.sh, 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
0

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

dtroyer gravatar image

There is a blueprint for this but it hasn't been claimed by anyone yet. https://blueprints.launchpad.net/devs...

edit flag offensive delete link more
0

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

marco-consonni gravatar image

According to the comment you find here https://github.com/cloudbuilders/devstack (https://github.com/cloudbuilders/devs...) , script rejoin-stack.sh 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
0

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

marco-consonni gravatar image

Hello.

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 http://www.mattcutts.com/blog/a-quick-tutorial-on-screen/ (http://www.mattcutts.com/blog/a-quick...) ).

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` ( http://devstack.org/localrc.html ).

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

edit flag offensive delete link more
0

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

marco-consonni gravatar image

Hello again.

I looked into rejoin-stack.sh 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
0

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

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/

OS_BIN_GLANCE=${OS_BIN_ROOT}glance/bin OS_LOG_GLANCE=${OS_LOG_ROOT} # glance OS_CFG_GLANCE=${OS_CFG_ROOT}glance

OS_BIN_KEYSTONE=${OS_BIN_ROOT}keystone/bin OS_LOG_KEYSTONE=${OS_LOG_ROOT} # keystone OS_CFG_KEYSTONE=${OS_CFG_ROOT}keystone

OS_BIN_NOVA=${OS_BIN_ROOT}nova/bin OS_LOG_NOVA=${OS_LOG_ROOT} # nova OS_CFG_NOVA=${OS_CFG_ROOT}nova

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
0

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 2,001 times

Last updated: Sep 23 '12