After successful installation of devstack and launching instances,but once reboot machine, need to start all over again and lose all the instances which were launched back then.I tried rejoin-stack but did not worked,How can i get the instances back after reboot ?
-
Same issue here. All docs recommend ./rejoin_stack.sh. But it just doesn't work. And setting it up again is a huge pain. In fact, I have noticed that if you simply unstack and stack again, it will fail with things like "no availability zone found" when launching a vm. – G.A. Apr 22 '14 at 21:40
4 Answers
You might set resume_guests_state_on_host_boot = True
in nova.conf. The file should be located at /etc/nova/nova.conf

- 265
- 1
- 3
- 11
-
This might work, but it seems it won't guarantee networking and other facilities back to the same state as before. So even if VM's start, they might not have a working network – Max Lobur Jul 01 '14 at 16:31
I've found some old discussion http://www.gossamer-threads.com/lists/openstack/dev/8772
AFAIK at the present time OpenStack (Icehouse) still not completely aware about environments inside it, so it can't restore completely after reboot. The instances will be there (virsh domains), but even if you start them manually or using nova flags I'm not sure whether other facilities will handle this correctly (e.g. neutron will correctly configure all L3 rules according to DB records, etc.) Honestly I'm pretty sure they won't...
The answer depends of what you need to achieve:
If you need a template environment (e.g. similar set of instances and networks each time after reboot) you may just script everything. In other words just make a bash script creating everything you need and run it each time after stack.sh. Make sure you're starting with clean environment since OpenStack DB state remains between ./unstack - ./stack.sh or ./rejoin-stack.sh (you might try to just clean DB, or delete it. stack.sh will build it back).
If you need a persistent environment (e.g. you don't want to loose VM's and whole infrastructure state after reboot) I'm not aware how to do this using OpenStack. F.e. neutron agents (they configure iptables, dhcp etc) do not save state and driven by events from Neutron service. They will not restore after reboot, so the network will be dead. I'll be very glad if someone will share a method to do such recovery.
In general I think OpenStack is not focusing on this and will not focus during the nearest release cycles. Common approach is to have multi-node environment where each node is replaceable.
See http://docs.openstack.org/high-availability-guide/content/ch-intro.html for reference

- 5,662
- 22
- 35
devstack is an ephemeral environment. it is not supposed to survive a reboot. this is not a supported behavior.
that being said you might find success in re-initializing the environment by running
./unstack.sh
follower by
./stack.sh
again.
Again, devstack is an ephemeral environment. It's primary purpose for existing is to run gate testing for openstack's CI infrastructure.

- 2,010
- 2
- 20
- 31
-
You don't need to run stack.sh each time, rejoin-stack.sh is enough to start all the services after reboot. Though rejoin-stack.sh is still not an answer to the question – Max Lobur Jul 01 '14 at 16:24
-
2