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

4 answers

Sort by ยป oldest newest most voted

answered 2019-12-18 09:11:07 -0500

Awais Shah gravatar image

install Openstack through Microstack. Devstack is not meant to work after restart. Microstack can be simply installed and removed through snap in ubuntu.

edit flag offensive delete link more

answered 2019-09-16 01:25:48 -0500

I also run Devstack on VMs on my laptop often. When I'm not working on it, I'm just saving VM state (I use vagrant so it's "vagrant suspend"). Then after e.g. laptop reboot, I still can do "vagrant resume" and I have my devstack still working.

edit flag offensive delete link more

answered 2019-09-13 10:21:14 -0500

AndyW gravatar image

Have devstack running on laptop, but try not to power it down to avoid unstack/stack etc , have a Dell XPS15 9560 running Ubuntu18.04 (devstack on Ubuntu16.04 VM) and in Suspend mode the laptop can last up to a week. In that case on resuming power your devstack installation is fine, except sometimes I find (devstack rocky installed) that beam.smp on the VM running devstack is >100% and CLI or Horizon is very slow. Restarting rabbit* solves this.

edit flag offensive delete link more

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


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

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


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

Seen: 797 times

Last updated: Dec 18 '19