← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1445881] Re: vm_state and power_state are inconsistent after creating a VM which is not power-on.

 

This bug does not have enough information to be actionable, it would
have auto expired, except it was assigned to a user.

** Changed in: nova
     Assignee: javeme (javaloveme) => (unassigned)

** Changed in: nova
       Status: Incomplete => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1445881

Title:
  vm_state and power_state are inconsistent after creating a VM which is
  not power-on.

Status in OpenStack Compute (nova):
  Invalid

Bug description:
  vm_state and power_state are inconsistent after creating a VM which is not power-on, until periodic task _sync_power_states().
  It's need to set the vm_state to the state decided by the power_state(such as STOPPED) instead of ACTIVE, after it is created.

  [master] nova/compute/manager.py  class ComputeManager._update_instance_after_spawn():
      def _update_instance_after_spawn(self, context, instance):
          instance.power_state = self._get_power_state(context, instance)
          instance.vm_state = vm_states.ACTIVE  # todo: decided by the power_state(such as STOPPED) instead of ACTIVE
          instance.task_state = None
          instance.launched_at = timeutils.utcnow()
          configdrive.update_instance(instance)

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1445881/+subscriptions


References