Skip to content

Commit

Permalink
libvirt: ignore NOSTATE in resume_state_on_host_boot() method.
Browse files Browse the repository at this point in the history
Occasionally, libvirt would get NOSTATE from hypervisor as instance
state. Thus if we don't ignore instances in NOSTATE in
resume_state_on_host_boot() method, we would mistakenly reboot such
instances when we restart nova-compute service or on host boot. This
patch fixes this by adding NOSTATE into ignored_states.

Bug 1176897

Change-Id: I651cb043d7f97fde29b2a62e6ead8222062f01f7
  • Loading branch information
yufang521247 committed May 6, 2013
1 parent 7bd267d commit 0098f12
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions nova/virt/libvirt/driver.py
Expand Up @@ -1434,6 +1434,7 @@ def resume_state_on_host_boot(self, context, instance, network_info,

ignored_states = (power_state.RUNNING,
power_state.SUSPENDED,
power_state.NOSTATE,
power_state.PAUSED)

if state in ignored_states:
Expand Down

0 comments on commit 0098f12

Please sign in to comment.