AttributeError raised during roll_back_live_migration_at_destination

Bug #1539342 reported by Zhenyu Zheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Zhenyu Zheng

Bug Description

In roll_back_live_migration_at_destination, we treat migrate_data as a LiveMigrateData object, but it is actually a dict:
https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L5176-L5198
and
https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L5509-L5514

We should not transform object to dict in the above code, instead, we should transform
dict to object.

We have logic here :
https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L5484-L5491
but we directly pass it down to driver here:
https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L5512-L5514
and it has not been handled in libvirt driver:
https://github.com/openstack/nova/blob/master/nova/virt/libvirt/driver.py#L6406-L6412

This will cause AttributeError.

Changed in nova:
assignee: nobody → Zhenyu Zheng (zhengzhenyu)
description: updated
description: updated
tags: added: live-migration
Matt Riedemann (mriedem)
tags: added: libvirt unified-objects
Revision history for this message
Matt Riedemann (mriedem) wrote :

What git hash are you testing against? The code links no longer line up.

Revision history for this message
Matt Riedemann (mriedem) wrote :

Where is the compute manager code converting an object to a dict?

If _do_live_migration does not get an object for migrate_data, it converts it to one here:

https://github.com/openstack/nova/blob/2d7a851199b12355b36a3982ea0fc7bb5a7cd11f/nova/compute/manager.py#L5174

And then migrate_data (as an object) should be passed down to _rollback_live_migration here:

https://github.com/openstack/nova/blob/2d7a851199b12355b36a3982ea0fc7bb5a7cd11f/nova/compute/manager.py#L5195

And even if _rollback_live_migration gets a dict for migrate_data, it should convert it to an object here:

https://github.com/openstack/nova/blob/2d7a851199b12355b36a3982ea0fc7bb5a7cd11f/nova/compute/manager.py#L5486

Are you saying it's the call to compute rpcapi that's converting it to a dict?

https://github.com/openstack/nova/blob/2d7a851199b12355b36a3982ea0fc7bb5a7cd11f/nova/compute/manager.py#L5511

Changed in nova:
status: New → Incomplete
Revision history for this message
Matt Riedemann (mriedem) wrote :

Also, are you live migrating from 2 mitaka nodes, or are you live migrating from liberty->mitaka (or vice-versa)?

Revision history for this message
Zhenyu Zheng (zhengzhenyu) wrote :

@Matt Riedemann, Hi, sorry for the delay, I was on vacation, I realized I was in the middle of your BP implementation when I find out this bug, I will close this one.

Changed in nova:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.