← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1426433] Re: [FakeDriver] Live migration issue, power_state=NOSTATE

 

Reviewed:  https://review.opendev.org/243613
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=14342d629b714f172545f133314b5ce584503cae
Submitter: Zuul
Branch:    master

commit 14342d629b714f172545f133314b5ce584503cae
Author: Lorenzo Affetti <affox90@xxxxxxxxx>
Date:   Tue Nov 10 12:56:59 2015 +0100

    FakeDriver: adding and removing instances on live migration.
    
    There was no code in FakeDriver that updated the internal
    dict `self.instances` when a FakeInstance was live migrated.
    This commit fills this gap. As a result, a couple of versioned
    notification samples get updated since we are now properly
    tracking a live migrated instance on the destination host as
    running vs pending power state.
    
    Closes-Bug: 1426433
    
    Change-Id: I9562e1bcbb18c7d543d5a6b36011fa28c13dfa79


** Changed in: nova
       Status: In Progress => Fix Released

-- 
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/1426433

Title:
  [FakeDriver] Live migration issue, power_state=NOSTATE

Status in OpenStack Compute (nova):
  Fix Released

Bug description:
  [nova master]
  In FakeDrivers, when live-migrating an instance everything goes ok.
  So, resources are allocated the correct way and instance's host has been changed, but instance Power State goes to NOSTATE.

  This seems to be caused by get_info method which programmatically raises InstanceNotFound exception.
  Instances list inside FakeDriver seems not to be updated accordingly.

  I actually fixed the problem in my local code
  (nova.virt.fake.FakeDriver) with:

  def live_migration(self, context, instance, dest,
                         post_method, recover_method, block_migration=False,
                         migrate_data=None):
          post_method(context, instance, dest, block_migration,
                              migrate_data)

  ++      name = instance['name']
  ++      del self.instances[name]

          return

  and

  def post_live_migration_at_destination(self, context, instance,
                                             network_info,
                                             block_migration=False,
                                             block_device_info=None):

  ++     name = instance['name']
  ++     state = power_state.RUNNING
  ++     fake_instance = FakeInstance(name, state, instance['uuid'])
  ++     self.instances[name] = fake_instance

  But I don't know if it is a satisfying solution.
  With this solution the instance is live_migrated and in state ACTIVE and power state RUNNING after the operation.

  Thank you

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


References