yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #28882
[Bug 1426433] [NEW] [FakeDriver] Live migration issue, power_state=NOSTATE
Public bug reported:
[nova branch 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
** Affects: nova
Importance: Undecided
Status: New
** Description changed:
+ [nova branch 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)
+ 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]
+ ++ name = instance['name']
+ ++ del self.instances[name]
- return
-
+ return
and
-
def post_live_migration_at_destination(self, context, instance,
- network_info,
- block_migration=False,
- block_device_info=None):
+ 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
--
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):
New
Bug description:
[nova branch 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
Follow ups
References