Bug 988065 - Migration fails - AttributeError: 'ConsoleDevice' object has no attribute 'alias'
Migration fails - AttributeError: 'ConsoleDevice' object has no attribute 'al...
Product: oVirt
Classification: Community
Component: vdsm (Show other bugs)
Unspecified Unspecified
urgent Severity high
: ---
: 3.3
Assigned To: Vinzenz Feenstra [evilissimo]
: 987496 (view as bug list)
Depends On:
Blocks: 918494
  Show dependency treegraph
Reported: 2013-07-24 12:06 EDT by Martin Sivák
Modified: 2014-01-12 19:57 EST (History)
12 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-08 12:44:09 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 17515 None None None Never
oVirt gerrit 17602 None None None Never

  None (edit)
Description Martin Sivák 2013-07-24 12:06:09 EDT
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 03:54:32 EDT
assaf, I think this is again related to your change regarding "alias"
Comment 2 Dan Kenigsberg 2013-07-25 04:18:45 EDT
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 10:53:28 EDT
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 06:07:11 EDT
it doesn't solve the balloon, though
Comment 6 Assaf Muller 2013-08-08 12:44:09 EDT
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 08:57:29 EDT
*** 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.