Bug 988065 - Migration fails - AttributeError: 'ConsoleDevice' object has no attribute 'alias'
Summary: Migration fails - AttributeError: 'ConsoleDevice' object has no attribute 'al...
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: unspecified
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 3.3
Assignee: Vinzenz Feenstra [evilissimo]
QA Contact: Haim
Whiteboard: virt
: 987496 (view as bug list)
Depends On:
Blocks: 918494
TreeView+ depends on / blocked
Reported: 2013-07-24 16:06 UTC by Martin Sivák
Modified: 2014-01-13 00:57 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-08-08 16:44:09 UTC
oVirt Team: ---

Attachments (Terms of Use)
The log from my test machine dev-01. (5.39 MB, text/x-log)
2013-07-24 16:06 UTC, Martin Sivák
no flags Details

System ID Priority Status Summary Last Updated
oVirt gerrit 17515 None None None Never
oVirt gerrit 17602 None None None Never

Description Martin Sivák 2013-07-24 16:06:09 UTC
Created attachment 777855 [details]
The log from my test machine dev-01.

Description of problem:

Migration fails with the following error on the destination host.

Thread-1079::ERROR::2013-07-24 16:52:16,498::BindingXMLRPC::998::vds::(wrapper) unexpected error
Traceback (most recent call last):
  File "/usr/share/vdsm/BindingXMLRPC.py", line 984, in wrapper
    res = f(*args, **kwargs)
  File "/usr/share/vdsm/BindingXMLRPC.py", line 345, in vmMigrationCreate
    return vm.migrationCreate(params)
  File "/usr/share/vdsm/API.py", line 507, in migrationCreate
    if not v.waitForMigrationDestinationPrepare():
  File "/usr/share/vdsm/vm.py", line 4789, in waitForMigrationDestinationPrepare
  File "/usr/share/vdsm/vm.py", line 4758, in _updateDevicesDomxmlCache
    aliasToDevice[dev.alias] = dev
AttributeError: 'ConsoleDevice' object has no attribute 'alias'

Version-Release number of selected component (if applicable):

engine: latest checkout from engine git 7d16422d22cf1995545b6a99d0fcaf9c64dc8619
host OS: F18

Linux dev-01.rhev.lab.eng.brq.redhat.com 3.9.11-200.fc18.x86_64 #1 SMP Mon Jul 22 21:04:50 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Linux dev-22.rhev.lab.eng.brq.redhat.com 3.9.10-200.fc18.x86_64 #1 SMP Sun Jul 14 01:36:53 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:

Always on my setup

Steps to Reproduce:

Install two hosts, add the following repositories:



yum update
setup engine somewhere
disable Gluster in the Cluster settings
add the two hosts and let engine install them
start a VM
try to migrate it

Actual results:

Migration failed due to Error: unexpected (VM: mom_test, Source: dev-22, Destination: dev-01).

Expected results:

Migration successful.

Other info:

The log contains data from couple of test runs where the bug happened couple of times. I also tried to workaround it by adding if hasattr(dev, "alias") around the failing block so you will find one other failure there. Just use what you need.

Comment 1 Michal Skrivanek 2013-07-25 07:54:32 UTC
assaf, I think this is again related to your change regarding "alias"

Comment 2 Dan Kenigsberg 2013-07-25 08:18:45 UTC
Note that console devices HAS an alias. The fix should be to read it properly from the domxml, not to ignore it.

    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='virtio' port='0'/>
      <alias name='console0'/>

Vinzenz, could you help Assaf with it?

Comment 3 Vinzenz Feenstra [evilissimo] 2013-07-29 14:53:28 UTC
The problem is not libvirt, libvirt does create aliases for everything, but we did not read the aliases for all devices from libvirt.

For example the ConsoleDevice does not retrieve the 'underlying device info' and does not set the alias.
When the migration is sent, the 'devices' dictionary does not contain an alias for the ConsoleDevice object.

It also seems like that the BalloonDevice in older oVirt versions (pre 3.1) do not have an alias, which would basically break migrations from that VDSM to this one as well.

I can fix it for now for ConsoleDevices by adding an alias member in the '__init__' of the class after the base class was initialized.
Not a big fan, however it solves that for migrations from older versions.

Comment 4 Michal Skrivanek 2013-07-30 10:07:11 UTC
it doesn't solve the balloon, though

Comment 6 Assaf Muller 2013-08-08 16:44:09 UTC
Closing as the bug has been fixed via patches merged on upstream master and ovirt-3.3 branches.

Comment 7 Michal Skrivanek 2013-09-05 12:57:29 UTC
*** Bug 987496 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.