Merge lp://qastaging/~justin-fathomdb/nova/restart-instance into lp://qastaging/~hudson-openstack/nova/trunk
Status: | Work in progress | ||||
---|---|---|---|---|---|
Proposed branch: | lp://qastaging/~justin-fathomdb/nova/restart-instance | ||||
Merge into: | lp://qastaging/~hudson-openstack/nova/trunk | ||||
Prerequisite: | lp://qastaging/~justin-fathomdb/nova/refresh-instance-states | ||||
Diff against target: |
684 lines (+323/-86) 13 files modified
nova/api/ec2/cloud.py (+7/-1) nova/compute/api.py (+3/-2) nova/compute/manager.py (+11/-11) nova/db/sqlalchemy/migrate_repo/versions/014_add_persistence_mode_to_instance.py (+52/-0) nova/db/sqlalchemy/models.py (+2/-0) nova/tests/db/fakes.py (+9/-1) nova/utils.py (+7/-2) nova/virt/driver.py (+159/-11) nova/virt/fake.py (+0/-15) nova/virt/hyperv.py (+4/-5) nova/virt/libvirt_conn.py (+56/-32) nova/virt/xenapi/vm_utils.py (+7/-0) nova/virt/xenapi_conn.py (+6/-6) |
||||
To merge this branch: | bzr merge lp://qastaging/~justin-fathomdb/nova/restart-instance | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
termie (community) | Needs Fixing | ||
Review via email:
|
This proposal supersedes a proposal from 2011-03-15.
Description of the change
Tighter control of auto-start-on-boot.
Particularly in conjunction with delete-on-shutdown, we want to be sure that a machine that we expect to be persistent isn't deleted just because the host reboots. On the other hand, for EC2-style ephemeral machines, we do want delete-on-shutdown.
Unmerged revisions
- 832. By justinsb
-
More documentation on our persistence modes
- 831. By justinsb
-
Fixed merge problem with names, better message on state change
- 830. By justinsb
-
Merged with trunk
- 829. By justinsb
-
Committing a few cleanups prior to merge with trunk
- 828. By justinsb
-
Better documentation, logging and more use of tombstone function
- 827. By justinsb
-
Documented the _tombstone_instance a bit better
- 826. By justinsb
-
Brought over the docstring from fake and added some additional commentary
- 825. By justinsb
-
More cautious exception handling in get_info. See Bug #741468
- 824. By justinsb
-
Refactored init_host into the base driver.
For each machine discovered on boot, it calls init_instance. A driver doesn't need to implement that, but we log a warning if the driver doesn't. The 'public humiliation' approach.
- 823. By justinsb
-
Ah... createWithFlags is probably on the domain object
(Adjust with the correct pre-req branch)
OK... I think this is ready for merge.
There are a few big changes in this patch:
1) We create persistent, not transient, libvirt instances. A transient libvirt instance is destroyed whenever it is shut down. This includes a host restart. Not good.
2) We set instances to auto-start. Currently we rely on this to ensure that if an instance is shut-down, we treat is as if it should be deleted (well, tombstoned)
3) Much more careful error handling in get_info(). I hit a really nasty bug - Bug #741468
4) The Amazon API defaults to destroy- on-shutdown, the Rackspace API defaults to do-not- destroy- on-shutdown. Rackspace-style instances are therefore set to auto-start on host start, Amazon-style are not.
Open questions:
1) If the user shuts down a machine (shutdown now), what should we do? Restart it?
2) What should we do with an Amazon-style instance after a host restart?
3) Do we want different handling based on the API used (and potentially a parameter in future)? There was an IRC chat where we came down strongly in favor of having both options.