Ask Your Question
0

Best option for working with DevStack

asked 2019-08-11 11:58:34 -0500

Ben78 gravatar image

I have installed DevStack in a virtual machine on my laptop. I have to turn off my laptop several times a day and consequently, the VM. Whenever I power on the VM, I have to unstack/stack. Otherwise, some part of DevStack fails to work correctly. I wonder how professionals like you are working on OpenStack that they do not have such problem. Any suggestion?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-08-11 17:22:01 -0500

updated 2019-08-12 04:18:33 -0500

Devstack is not meant to be rebooted. It's purpose is to set up a cloud for testing, which will be destroyed when testing is done.

Having said that, on my Devstack the following is missing after a reboot:

  • physical volumes for Cinder. Use losetup to make them come to live.
  • filesystem for Swift. A mount command fixes that.
  • br-ex has no IP address and is down.

The precise commands to revive the system are in the stack.sh log, if you configure debug logging. Find them like this:

grep -e losetup -e mount.*xfs -e ip.*br-ex YOUR-STACK.SH-LOG

EDIT: This is the script I run after a reboot. It may not work unchanged on your Devstack.

sudo losetup -f --show --direct-io=on /opt/stack/data/stack-volumes-default-backing-file
sudo losetup -f --show --direct-io=on /opt/stack/data/stack-volumes-lvmdriver-1-backing-file

sudo mount -t xfs -o loop,noatime,nodiratime,logbufs=8 /opt/stack/data/swift/drives/images/swift.img /opt/stack/data/swift/drives/sdb1

sudo ip addr add 172.24.4.1/24 dev br-ex
sudo ip link set dev br-ex up

echo Restarting Cinder and Swift
sudo systemctl restart devstack@c-* devstack@s-*
edit flag offensive delete link more

Comments

In my case, when I reboot the VM that I have installed DevStack on it, everything works fine except I can not create any new instance any more and all the existing instances are off.

Ben78 gravatar imageBen78 ( 2019-08-11 17:54:36 -0500 )edit

I want to modify some stuff in DevStack which may takes several months. I need to turn off my laptop and reboot the VM running DevStack.

Ben78 gravatar imageBen78 ( 2019-08-11 17:55:38 -0500 )edit

To avoid reboot problems, you could save the state of your running VM instead of shutting it down. You may have to adjust the time each time you restore the VM.

Bernd Bausch gravatar imageBernd Bausch ( 2019-08-11 22:17:27 -0500 )edit

Thanks. I used to save the VM state. But it also makes some problem recently.I guess some service credentials have expiration time which leads to failure when you save the VM and restore later on.

Ben78 gravatar imageBen78 ( 2019-08-13 11:26:43 -0500 )edit

When you shut a VM host down, libvirt (and other hypervisors?) also shuts down the VMs. In production, compute servers only shut down after migrating VMs.

I suppose timeouts are expected when your activities stretch over several months. This has nothing to do with rebooting or save/restore.

Bernd Bausch gravatar imageBernd Bausch ( 2019-08-13 19:39:07 -0500 )edit

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: 2019-08-11 11:58:34 -0500

Seen: 21 times

Last updated: Aug 12