multipath: Use reload option on multipath rescan

Change-Id: I39f0789c8f296fe0e38739128ade45bca8833cb1
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=964768
Signed-off-by: Yeela Kaplan <ykaplan@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/17263
Reviewed-by: Ayal Baron <abaron@redhat.com>
Reviewed-by: Allon Mureinik <amureini@redhat.com>
Reviewed-by: Sergey Gotliv <sgotliv@redhat.com>
Tested-by: Elad Ben Aharon <eladba1990@gmail.com>
QoS host networks: caps now reports QoS for networks.

In the context of applying QoS to host networks it's important
to report the current networks' QoS. Example follows below:

 'awesome': {'addr': '',
             'bridged': True,
             'cfg': {'DELAY': '0',
                     'DEVICE': 'franta',
                     'NM_CONTROLLED': 'no',
                     'ONBOOT': 'yes',
                     'TYPE': 'Bridge'},
             'gateway': '0.0.0.0',
             'iface': 'awesome',
             'ipv6addrs': ['fe80::210:18ff:fee1:6d2e/64'],
             'ipv6gateway': '::',
             'mtu': '1500',
             'netmask': '',
             'ports': ['p1p4'],
             'qosInbound': {'average': '1024', 'burst': '2048', 'peak': ''},
             'qosOutbound': {'average': '2400', 'burst': '', 'peak': ''},
             'stp': 'off'}

Same information is available when calling networks() function, after adding
a network named pluto this is the expected result:

{'ovirtmgmt': {'bridge': u'ovirtmgmt',
               'bridged': True,
               'qosInbound': '',
               'qosOutbound': ''},
 'pluto': {'bridge': u'pluto',
           'bridged': True,
           'qosInbound': {'average': u'1024', 'burst': '', 'peak': ''},
           'qosOutbound': {'average': u'2400', 'burst': '', 'peak': ''}}}

In case a QoS is not defined in for incoming/inbound or outgoing/outbond
traffic an empty string is placed instead to mark as undefined.

Change-Id: I9b9dde8c580b6087ada29bc3b0d682ed638d92f9
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=987586
Signed-off-by: Giuseppe Vallarelli <gvallare@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/17218
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
refactoring: fix imports stmts, replaced glob with iglob for uniformity.

Change-Id: Ifd28a6e0fb0a192c033e19ff8fe029728cafdf5c
Signed-off-by: Giuseppe Vallarelli <gvallare@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/16838
Reviewed-by: Antoni Segura Puimedon <asegurap@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
tests: delNetwork with specified mtu.

Added one functional test:

* testDelNetworkWithMTU

covering the behaviour related to delNetwork when
when setting an mtu.

Change-Id: Idfbe14ca3597551c4582d07aa8215825e25daeea
Signed-off-by: Giuseppe Vallarelli <gvallare@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/17400
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
Remove broken getDeviceInfo().

This function is unused by the Engine.
It was broken a long time ago, Jun 19 of 2012, without complains,
by commit f4304e25.

Change-Id: I23924f8de928d7e4fe75e999be48f778adb71452
Signed-off-by: Eduardo <ewarszaw@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/14632
Reviewed-by: Allon Mureinik <amureini@redhat.com>
Reviewed-by: Sergey Gotliv <sgotliv@redhat.com>
Reviewed-by: Ayal Baron <abaron@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
Remove unused lvm._vgmknodes().

Change-Id: I963ca7ed57a2c26fdc07caf0d1f92dba18cd1335
Signed-off-by: Eduardo <ewarszaw@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/14633
Reviewed-by: Ayal Baron <abaron@redhat.com>
Tested-by: Dan Kenigsberg <danken@redhat.com>
Too many True sizes for a False Volume class.

Since an (abstract) volume never will be instantiated alone, get
the size of the typed object instead.

Removes Volume.getVSize(), Volume.getVTrueSize() and
Volume.getVolumeTrueSize().

Reduce the number of SD produces.

Related to BZ#960952, BZ#769502.

Change-Id: I98c82bf2b48c62626b496fe16e4b83f48c189c10
Signed-off-by: Eduardo <ewarszaw@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/17509
Tested-by: Elad Ben Aharon <eladba1990@gmail.com>
Reviewed-by: Ayal Baron <abaron@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Avoid Img and Vol produces in fileVolume.getV*Size

No need for produce Images and Volumes for get the volume path
when calculating the size.

Related to BZ#960952, BZ#769502.

Change-Id: I9cccbba8a3dd1628c006fc47e7f13b6757fde9fe
Signed-off-by: Eduardo <ewarszaw@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/17510
Tested-by: Elad Ben Aharon <eladba1990@gmail.com>
Reviewed-by: Ayal Baron <abaron@redhat.com>
Make lvm.listPVNames() be based on vgs information.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=955993
Change-Id: I1e04a73476cab53e9a0a6c74eab2e747380f25c4
Signed-off-by: Eduardo <ewarszaw@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/14631
Tested-by: Elad Ben Aharon <eladba1990@gmail.com>
Reviewed-by: Ayal Baron <abaron@redhat.com>
Crash fix for migrations that involve devices with no aliases

The destination host updates the device XML cache for every
device by scanning the VM's XML that was received from
the source host, breaking it apart and placing each device's
XML into its Device class instance. The identification
of devices is done via the alias pulled from the VM conf. Some
devices don't have aliases pulled from libvirt. In any case,
migrations should succeed (instead of crashing VDSM) and
devices with no aliases should be dealt with in a separate patch.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988065
Change-Id: I3f05a945c2f3507d5571ac3f3b212e59a30bdfae
Signed-off-by: Assaf Muller <amuller@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/17515
Reviewed-by: Michal Skrivanek <michal.skrivanek@redhat.com>
Reviewed-by: Vinzenz Feenstra <vfeenstr@redhat.com>
Tested-by: Vinzenz Feenstra <vfeenstr@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
vdsm: Always retrieve alias for Balloon and Console devices

We haven't been retrieving the alias value for console devices which
now starts to bite us due to the assumption that all VmDevice objects,
have to have an alias attribute during the migration.

Due to a bug in the handling for Balloon devices this also happened.

This commit fixes the problem for the future by retrieving the aliases.

Change-Id: Ic828d13761b26b3ec01b604f431050a611bce01c
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=988065
Signed-off-by: Vinzenz Feenstra <vfeenstr@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/17602
Reviewed-by: Dan Kenigsberg <danken@redhat.com>
vdsm: Fix regression introduced by refactoring libvirtvm

Rebasing the changeset of refactoring libvirtvm.py and vm.py into vm.py [1]
caused an accidental removal of changes made in commit 30a4b50 [2].

This commit fixes the mess up of this rebase mess up.

[1]: http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=commit;h=ee082b8
[2]: http://gerrit.ovirt.org/gitweb?p=vdsm.git;a=commit;h=30a4b50

Change-Id: I0eeb53828e1a33e6f0e010f9e17fb2911fda3f45
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=985735
Signed-off-by: Vinzenz Feenstra <vfeenstr@redhat.com>
Reviewed-on: http://gerrit.ovirt.org/17659
Reviewed-by: Ayal Baron <abaron@redhat.com>
Reviewed-by: Dan Kenigsberg <danken@redhat.com>