commit d09785b97a282e8538642f6f8bcdd8491197ed74
Author: Matt Riedemann <email address hidden>
Date: Wed Feb 25 14:13:45 2015 -0800
Add config option to disable handling virt lifecycle events
Historically the _sync_power_states periodic task has had the potential
for race conditions and several changes have been made to try and
tighten up this code:
The handle_lifecycle_events method which gets power state change events
from the compute driver (currently only implemented by the libvirt
driver) and calls _sync_instance_power_state - the same method that the
_sync_power_states periodic task uses, except the periodic task at least
locks when it's running - expands the scope for race problems in the
compute manager so cloud providers should be able to turn it off. It is
also known to have races with reboot where rebooted instances are
automatically shutdown because of delayed lifecycle events that the
instance is stopped even though it's running.
This is consistent with the view that Nova should manage it's own state
and not rely on external events telling it what to do about state
changes. For example, in _sync_instance_power_state, if the Nova
database thinks an instance is stopped but the hypervisor says it's
running, the compute manager issues a force-stop on the instance.
Also, although not documented (at least from what I can find), Nova has
historically held a stance that it does not support out-of-band
discovery and management of instances, so allowing external events to
change state somewhat contradicts that stance and should be at least a
configurable deployment option.
DocImpact: New config option "handle_virt_lifecycle_events" in the DEFAULT group of nova.conf. By default the value is True
so there is no upgrade impact or change in functionality.
Reviewed: https:/ /review. openstack. org/159275 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=d09785b97a2 82e8538642f6f8b cdd8491197ed74
Committed: https:/
Submitter: Jenkins
Branch: master
commit d09785b97a282e8 538642f6f8bcdd8 491197ed74
Author: Matt Riedemann <email address hidden>
Date: Wed Feb 25 14:13:45 2015 -0800
Add config option to disable handling virt lifecycle events
Historically the _sync_power_states periodic task has had the potential
for race conditions and several changes have been made to try and
tighten up this code:
cc5388bbe81 aba635fb757e202 d860aeed98f3e8 d10e9a192142ce7 e20d37871d916a e0e9e35872cae77 eb04bdb5ee0545 8436d18441a8129 f3f20af53c2b91
aa1792eb4c1
baabab45e0a
bd8329b3409
The handle_ lifecycle_ events method which gets power state change events power_state - the same method that the power_states periodic task uses, except the periodic task at least
from the compute driver (currently only implemented by the libvirt
driver) and calls _sync_instance_
_sync_
locks when it's running - expands the scope for race problems in the
compute manager so cloud providers should be able to turn it off. It is
also known to have races with reboot where rebooted instances are
automatically shutdown because of delayed lifecycle events that the
instance is stopped even though it's running.
This is consistent with the view that Nova should manage it's own state power_state, if the Nova
and not rely on external events telling it what to do about state
changes. For example, in _sync_instance_
database thinks an instance is stopped but the hypervisor says it's
running, the compute manager issues a force-stop on the instance.
Also, although not documented (at least from what I can find), Nova has
historically held a stance that it does not support out-of-band
discovery and management of instances, so allowing external events to
change state somewhat contradicts that stance and should be at least a
configurable deployment option.
DocImpact: New config option "handle_ virt_lifecycle_ events" in the
DEFAULT group of nova.conf. By default the value is True
so there is no upgrade impact or change in functionality.
Related-Bug: #1293480
Partial-Bug: #1443186
Partial-Bug: #1444630
Change-Id: I26a1bc70939fb4 0dc38e9c5c43bf5 8ed1378bcc7