[vdsm] update to vdsm-4.12.0-1

Federico Simoncelli fsimonce at fedoraproject.org
Tue Aug 13 15:00:32 UTC 2013


commit 63105a25cb34f358c3a91950fb9e3be71c2eb9aa
Author: Federico Simoncelli <fsimonce at redhat.com>
Date:   Tue Aug 13 16:26:48 2013 +0200

    update to vdsm-4.12.0-1
    
    - update to 4.12.0 final release
    - mom: Require latest mom
    - Mark ksmtuned as conflicting service in the init file
    - spec: vdsm-hook-sriov on el6 should not require
    - Crash fix for migrations that involve devices with no aliases (BZ#988065)
    - vdsm: Always retrieve alias for Balloon and Console (BZ#988065)
    - vdsm: Fix regression introduced by refactoring (BZ#985735)
    - VDSM now writes its version number in VDSM-generated
    - Bump requires version of selinux-policy-targeted
    - vdsm_reg: fix ovirt_node without default bridge (BZ#988990)
    - Source Route script now checks that the DHCP response (BZ#994600)
    - Management network is now kept in main routing table (BZ#984028)
    - Only remove dhcp source routing if the removal reason (BZ#995142)
    - image: use successor volume size when merging

 0001-build-use-pythondir-for-vdsmapi.patch         |   41 ---
 0001-mom-Require-latest-mom.patch                  |   36 +++
 ...ed-as-conflicting-service-in-the-init-fil.patch |   35 +++
 ...ook-sriov-on-el6-should-not-require-non-e.patch |   40 +++
 ...or-migrations-that-involve-devices-with-n.patch |   49 +++
 ...-retrieve-alias-for-Balloon-and-Console-d.patch |   88 ++++++
 ...gression-introduced-by-refactoring-libvir.patch |   76 +++++
 ...ites-its-version-number-in-VDSM-generated.patch |   53 ++++
 ...quires-version-of-selinux-policy-targeted.patch |   41 +++
 ...reg-fix-ovirt_node-without-default-bridge.patch |   47 +++
 ...e-script-now-checks-that-the-DHCP-respons.patch |   46 +++
 ...network-is-now-kept-in-main-routing-table.patch |  324 ++++++++++++++++++++
 ...-dhcp-source-routing-if-the-removal-reaso.patch |   38 +++
 ...ge-use-successor-volume-size-when-merging.patch |   47 +++
 sources                                            |    2 +-
 vdsm.spec                                          |   65 ++++-
 16 files changed, 974 insertions(+), 54 deletions(-)
---
diff --git a/0001-mom-Require-latest-mom.patch b/0001-mom-Require-latest-mom.patch
new file mode 100644
index 0000000..81003b0
--- /dev/null
+++ b/0001-mom-Require-latest-mom.patch
@@ -0,0 +1,36 @@
+From 189c632a18610b88f8fdb8c8500e8bb224cbe359 Mon Sep 17 00:00:00 2001
+From: Doron Fediuck <dfediuck at redhat.com>
+Date: Tue, 30 Jul 2013 23:34:46 +0300
+Subject: [PATCH 01/13] mom: Require latest mom
+
+Latest mom build uses strings for the balloon info,
+needed for proper ballooning integration.
+
+This patch will make vdsm depending on the latest mom
+supporting the strings api.
+
+Change-Id: Ia2aebf588f823ee986bd20bbf47bace176b4cd21
+Signed-off-by: Doron Fediuck <dfediuck at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17519
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Tested-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm.spec.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vdsm.spec.in b/vdsm.spec.in
+index 235d1db..d95bb2a 100644
+--- a/vdsm.spec.in
++++ b/vdsm.spec.in
+@@ -102,7 +102,7 @@ Requires: nfs-utils
+ Requires: m2crypto
+ Requires: libguestfs-tools-c
+ Requires: %{name}-xmlrpc = %{version}-%{release}
+-Requires: mom >= 0.3.2-2
++Requires: mom >= 0.3.2-3
+ 
+ %ifarch x86_64
+ Requires: python-dmidecode
+-- 
+1.8.3.1
+
diff --git a/0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch b/0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch
new file mode 100644
index 0000000..bf177d7
--- /dev/null
+++ b/0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch
@@ -0,0 +1,35 @@
+From 647ac116919ce8273238223a9e1b41345b1ffc59 Mon Sep 17 00:00:00 2001
+From: Martin Sivak <msivak at redhat.com>
+Date: Thu, 25 Jul 2013 10:23:02 +0200
+Subject: [PATCH 02/13] Mark ksmtuned as conflicting service in the init file
+
+MoM and ksmtuned fight over control of ksm when running at the
+same time. MoM is the prefered manager now so ksmtuned should
+be stopped during VDSM startup. VDSM can start ksmtuned again
+when needed (in case MoM is not available or fails).
+
+Change-Id: Iaaf8fd5f9dd3d92ef3d06b433312d5d22b594191
+Resolves: rhbz#987926
+Signed-off-by: Martin Sivak <msivak at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17537
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm/vdsmd.init.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
+index 4d77b01..56f07bd 100755
+--- a/vdsm/vdsmd.init.in
++++ b/vdsm/vdsmd.init.in
+@@ -32,7 +32,7 @@ DOM_METADATA_BACKUP_DIR=/var/log/vdsm/backup
+ CORE_PATTERN=/proc/sys/kernel/core_pattern
+ NEEDED_SERVICES="iscsid multipathd rpcbind ntpd wdmd sanlock network libvirtd
+                  supervdsmd"
+-CONFLICTING_SERVICES="libvirt-guests"
++CONFLICTING_SERVICES="libvirt-guests ksmtuned"
+ VDSM_TOOL="@BINDIR@/vdsm-tool"
+ RETVAL=0
+ 
+-- 
+1.8.3.1
+
diff --git a/0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch b/0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch
new file mode 100644
index 0000000..2325751
--- /dev/null
+++ b/0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch
@@ -0,0 +1,40 @@
+From 7ed5813430052a587dadbff6301187097ce118a4 Mon Sep 17 00:00:00 2001
+From: Dan Kenigsberg <danken at redhat.com>
+Date: Thu, 1 Aug 2013 09:50:39 +0300
+Subject: [PATCH 03/13] spec: vdsm-hook-sriov on el6 should not require
+ non-existing rpm
+
+As reported by a dead horse, el6 does not carry
+libvirt-daemon-driver-nodedev so the said hook should not require this
+subrpm. Since it the rpm hook is meaningful only when vdsm is installed,
+and el6's vdsm requires al libvirt, we need no special requirement
+there.
+
+Change-Id: I25bfec65fd017a048102d6321335c747a17b5dd4
+Signed-off-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17554
+Reviewed-by: Antoni Segura Puimedon <asegurap at redhat.com>
+Reviewed-by: Dead Horse <deadhorseconsulting at gmail.com>
+Tested-by: Dead Horse <deadhorseconsulting at gmail.com>
+Reviewed-on: http://gerrit.ovirt.org/17591
+---
+ vdsm.spec.in | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/vdsm.spec.in b/vdsm.spec.in
+index d95bb2a..87bc231 100644
+--- a/vdsm.spec.in
++++ b/vdsm.spec.in
+@@ -483,7 +483,9 @@ such as: vendor, version, date and release
+ 
+ %package hook-sriov
+ Summary:        sr-iov support for VDSM
++%if 0%{?rhel} >= 7 || 0%{?fedora} >= 18
+ Requires:       libvirt-daemon-driver-nodedev
++%endif
+ BuildArch:      noarch
+ 
+ %description hook-sriov
+-- 
+1.8.3.1
+
diff --git a/0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch b/0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch
new file mode 100644
index 0000000..b065315
--- /dev/null
+++ b/0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch
@@ -0,0 +1,49 @@
+From 127da86be3ac1330c2518e704b8bcb000ab43753 Mon Sep 17 00:00:00 2001
+From: Assaf Muller <amuller at redhat.com>
+Date: Tue, 30 Jul 2013 14:22:38 +0300
+Subject: [PATCH 04/13] 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 at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17515
+Reviewed-by: Michal Skrivanek <michal.skrivanek at redhat.com>
+Reviewed-by: Vinzenz Feenstra <vfeenstr at redhat.com>
+Tested-by: Vinzenz Feenstra <vfeenstr at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17685
+---
+ vdsm/vm.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/vdsm/vm.py b/vdsm/vm.py
+index 4333170..eefbccd 100644
+--- a/vdsm/vm.py
++++ b/vdsm/vm.py
+@@ -4763,7 +4763,12 @@ class Vm(object):
+         aliasToDevice = {}
+         for devType in self._devices:
+             for dev in self._devices[devType]:
+-                aliasToDevice[dev.alias] = dev
++                if hasattr(dev, 'alias'):
++                    aliasToDevice[dev.alias] = dev
++                else:
++                    self.log.error("Alias not found for device type %s "
++                                   "during migration at destination host" %
++                                   devType)
+ 
+         devices = _domParseStr(xml).childNodes[0]. \
+             getElementsByTagName('devices')[0]
+-- 
+1.8.3.1
+
diff --git a/0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch b/0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch
new file mode 100644
index 0000000..efdd1ca
--- /dev/null
+++ b/0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch
@@ -0,0 +1,88 @@
+From 02bd2860a8eac53c1e843867fa67dc16c07b6669 Mon Sep 17 00:00:00 2001
+From: Vinzenz Feenstra <vfeenstr at redhat.com>
+Date: Fri, 2 Aug 2013 15:18:13 +0200
+Subject: [PATCH 05/13] 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 at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17602
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17686
+---
+ vdsm/vm.py | 36 +++++++++++++++++++++++++++++-------
+ 1 file changed, 29 insertions(+), 7 deletions(-)
+
+diff --git a/vdsm/vm.py b/vdsm/vm.py
+index eefbccd..92b4b91 100644
+--- a/vdsm/vm.py
++++ b/vdsm/vm.py
+@@ -2732,6 +2732,7 @@ class Vm(object):
+         self._getUnderlyingBalloonDeviceInfo()
+         self._getUnderlyingWatchdogDeviceInfo()
+         self._getUnderlyingSmartcardDeviceInfo()
++        self._getUnderlyingConsoleDeviceInfo()
+         # Obtain info of all unknown devices. Must be last!
+         self._getUnderlyingUnknownDeviceInfo()
+ 
+@@ -4427,20 +4428,41 @@ class Vm(object):
+         for x in balloonxml:
+             # Ignore balloon devices without address.
+             if not x.getElementsByTagName('address'):
+-                continue
+-
+-            address = self._getUnderlyingDeviceAddress(x)
++                address = None
++            else:
++                address = self._getUnderlyingDeviceAddress(x)
+             alias = x.getElementsByTagName('alias')[0].getAttribute('name')
+ 
+             for dev in self._devices[BALLOON_DEVICES]:
+-                if not hasattr(dev, 'address'):
++                if address and not hasattr(dev, 'address'):
+                     dev.address = address
++                if not hasattr(dev, 'alias'):
+                     dev.alias = alias
+ 
+             for dev in self.conf['devices']:
+-                if ((dev['type'] == BALLOON_DEVICES) and
+-                        not dev.get('address')):
+-                    dev['address'] = address
++                if dev['type'] == BALLOON_DEVICES:
++                    if address and not dev.get('address'):
++                        dev['address'] = address
++                    if not dev.get('alias'):
++                        dev['alias'] = alias
++
++    def _getUnderlyingConsoleDeviceInfo(self):
++        """
++        Obtain the alias for the console device from libvirt
++        """
++        consolexml = _domParseStr(self._lastXMLDesc).childNodes[0].\
++            getElementsByTagName('devices')[0].\
++            getElementsByTagName('console')
++        for x in consolexml:
++            # All we care about is the alias
++            alias = x.getElementsByTagName('alias')[0].getAttribute('name')
++            for dev in self._devices[CONSOLE_DEVICES]:
++                if not hasattr(dev, 'alias'):
++                    dev.alias = alias
++
++            for dev in self.conf['devices']:
++                if dev['device'] == CONSOLE_DEVICES and \
++                        not dev.get('alias'):
+                     dev['alias'] = alias
+ 
+     def _getUnderlyingSmartcardDeviceInfo(self):
+-- 
+1.8.3.1
+
diff --git a/0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch b/0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch
new file mode 100644
index 0000000..cd768f4
--- /dev/null
+++ b/0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch
@@ -0,0 +1,76 @@
+From e5dbe4cbef2d57c34232fd998ee82b3641ee7931 Mon Sep 17 00:00:00 2001
+From: Vinzenz Feenstra <vfeenstr at redhat.com>
+Date: Mon, 5 Aug 2013 12:07:01 +0200
+Subject: [PATCH 06/13] 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 at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17687
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm/vm.py | 11 +++--------
+ 1 file changed, 3 insertions(+), 8 deletions(-)
+
+diff --git a/vdsm/vm.py b/vdsm/vm.py
+index 92b4b91..f0690b7 100644
+--- a/vdsm/vm.py
++++ b/vdsm/vm.py
+@@ -1356,7 +1356,7 @@ class Drive(VmDevice):
+         can also dynamically change according to the VM needs (e.g. increase
+         during a live storage migration).
+         """
+-        if hasattr(self, "diskReplicate"):
++        if self.isDiskReplicationInProgress():
+             return self.VOLWM_CHUNK_MB * self.VOLWM_CHUNK_REPLICATE_MULT
+         return self.VOLWM_CHUNK_MB
+ 
+@@ -3290,7 +3290,8 @@ class Vm(object):
+         for dev in self.conf['devices'][:]:
+             if (dev['type'] == DISK_DEVICES and
+                     dev['path'] == diskParams['path']):
+-                self.conf['devices'].remove(dev)
++                with self._confLock:
++                    self.conf['devices'].remove(dev)
+                 diskDev = dev
+                 break
+ 
+@@ -3801,10 +3802,6 @@ class Vm(object):
+             raise LookupError("No such drive: '%s'" % srcDrive.name)
+ 
+         srcDrive.diskReplicate = dstDisk
+-        self.saveState()
+-
+-    def isDiskReplicationInProgress(self, srcDrive):
+-        return hasattr(srcDrive, 'diskReplicate')
+ 
+     def _delDiskReplica(self, srcDrive):
+         """
+@@ -3822,7 +3819,6 @@ class Vm(object):
+             raise LookupError("No such drive: '%s'" % srcDrive.name)
+ 
+         del srcDrive.diskReplicate
+-        self.saveState()
+ 
+     def diskReplicateStart(self, srcDisk, dstDisk):
+         try:
+@@ -3838,7 +3834,6 @@ class Vm(object):
+                            "destination '%s'" % srcDrive.name, dstDisk)
+             return errCode['replicaErr']
+ 
+-        self._setDiskReplica(srcDrive, dstDisk)
+         dstDiskCopy = dstDisk.copy()
+ 
+         # The device entry is enforced because stricly required by
+-- 
+1.8.3.1
+
diff --git a/0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch b/0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch
new file mode 100644
index 0000000..ad7067a
--- /dev/null
+++ b/0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch
@@ -0,0 +1,53 @@
+From 28af8498966978cf5a442af8ecaacddde2d41cf9 Mon Sep 17 00:00:00 2001
+From: Assaf Muller <amuller at redhat.com>
+Date: Thu, 1 Aug 2013 11:44:44 +0300
+Subject: [PATCH 07/13] VDSM now writes its version number in VDSM-generated
+ ifcfg files
+
+Change-Id: Ida8a540356e04d86eb19e05149861d800d8f7313
+Signed-off-by: Assaf Muller <amuller at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17566
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17612
+---
+ vdsm/netconf/ifcfg.py | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py
+index 774f831..140b538 100644
+--- a/vdsm/netconf/ifcfg.py
++++ b/vdsm/netconf/ifcfg.py
+@@ -28,6 +28,7 @@ import selinux
+ import shutil
+ import threading
+ 
++import dsaversion
+ from netconf import Configurator
+ from neterrors import ConfigNetworkError
+ from netmodels import Nic, Bridge
+@@ -181,7 +182,8 @@ class Ifcfg(Configurator):
+ 
+ 
+ class ConfigWriter(object):
+-    CONFFILE_HEADER = '# automatically generated by vdsm'
++    CONFFILE_HEADER = '# Generated by VDSM version %s' %\
++                      dsaversion.raw_version_revision
+     DELETED_HEADER = '# original file did not exist'
+ 
+     def __init__(self):
+@@ -447,9 +449,10 @@ class ConfigWriter(object):
+                         gateway=None, bootproto=None, mtu=None, onboot='yes',
+                         **kwargs):
+         """ Create ifcfg-* file with proper fields per device """
++        cfg = self.CONFFILE_HEADER + '\n'
+ 
+-        cfg = """DEVICE=%s\nONBOOT=%s\n""" % (pipes.quote(name),
+-                                              pipes.quote(onboot))
++        cfg += """DEVICE=%s\nONBOOT=%s\n""" % (pipes.quote(name),
++                                               pipes.quote(onboot))
+         cfg += conf
+         if ipaddr:
+             cfg = cfg + 'IPADDR=%s\nNETMASK=%s\n' % (pipes.quote(ipaddr),
+-- 
+1.8.3.1
+
diff --git a/0008-Bump-requires-version-of-selinux-policy-targeted.patch b/0008-Bump-requires-version-of-selinux-policy-targeted.patch
new file mode 100644
index 0000000..0b79d82
--- /dev/null
+++ b/0008-Bump-requires-version-of-selinux-policy-targeted.patch
@@ -0,0 +1,41 @@
+From 513440e9a06a4466a7ea0955220ac39e2df4334e Mon Sep 17 00:00:00 2001
+From: Mark Wu <wudxw at linux.vnet.ibm.com>
+Date: Mon, 5 Aug 2013 15:07:28 +0800
+Subject: [PATCH 08/13] Bump requires version of selinux-policy-targeted
+
+Current SElinux policy prevent the dhcp hook for source routing
+from running. It has been fixed in latest selinux policy, so we
+we need bump the requires version. More information, please see:
+https://bugzilla.redhat.com/show_bug.cgi?id=977856
+
+Change-Id: Ia2521d34dafdad2bba57c6da16253ff10f8a780f
+Signed-off-by: Mark Wu <wudxw at linux.vnet.ibm.com>
+Reviewed-on: http://gerrit.ovirt.org/17642
+Reviewed-by: Antoni Segura Puimedon <asegurap at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17763
+Tested-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm.spec.in | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/vdsm.spec.in b/vdsm.spec.in
+index 87bc231..21b3565 100644
+--- a/vdsm.spec.in
++++ b/vdsm.spec.in
+@@ -187,7 +187,11 @@ Requires: lvm2 >= 2.02.95
+ %endif
+ 
+ %if 0%{?fedora} >= 18
+-Requires: selinux-policy-targeted >= 3.11.1-71
++%if 0%{?fedora} >= 19
++Requires: selinux-policy-targeted >= 3.12.1-69
++%else
++Requires: selinux-policy-targeted >= 3.11.1-100
++%endif
+ # In order to avoid a policycoreutils bug (rhbz 889698) when selinux is
+ # disabled we now require the version 2.1.13-55 (or newer) of Fedora.
+ Requires: policycoreutils >= 2.1.13-55
+-- 
+1.8.3.1
+
diff --git a/0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch b/0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch
new file mode 100644
index 0000000..17b5450
--- /dev/null
+++ b/0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch
@@ -0,0 +1,47 @@
+From d48853e48db9e95c040e7e8573a8ce80e14c69ab Mon Sep 17 00:00:00 2001
+From: "Antoni S. Puimedon" <asegurap at redhat.com>
+Date: Tue, 6 Aug 2013 23:54:40 +0200
+Subject: [PATCH 09/13] vdsm_reg: fix ovirt_node without default bridge
+
+This patch reflects the fact that nowadays ovirt-node usually
+doesn't have a br* interface by default, thus the standing
+assumption that it did lead to exceptions.
+
+Change-Id: I01b761e4fa134850875a4118d40359df72ffd0ef
+Bug-Url: https://bugzilla.redhat.com/988990
+Signed-off-by: Antoni S. Puimedon <asegurap at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17730
+Reviewed-by: Alon Bar-Lev <alonbl at redhat.com>
+Reviewed-by: Mark Wu <wudxw at linux.vnet.ibm.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Tested-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17771
+---
+ vdsm_reg/deployUtil.py.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in
+index de0ac41..857c33c 100644
+--- a/vdsm_reg/deployUtil.py.in
++++ b/vdsm_reg/deployUtil.py.in
+@@ -1056,7 +1056,7 @@ def makeBridge(vdcName, vdsmDir, bridgeName=None):
+             # No more handling GATEWAYDEV.
+ 
+     if fReturn:
+-        if fIsOvirt:
++        if fIsOvirt and fIsBridgeDevice:
+             vlan, bonding, nic = _getOvirtBridgeParams(mgtBridge)
+         else:
+             vlan, bonding, nic = _getRHELBridgeParams(mgtIface,
+@@ -1064,7 +1064,7 @@ def makeBridge(vdcName, vdsmDir, bridgeName=None):
+         fReturn = (nic is not None)
+ 
+     #Delete existing bridge in oVirt
+-    if fReturn and fIsOvirt:
++    if fReturn and fIsOvirt and fIsBridgeDevice:
+         try:
+             out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_DEL),
+                                       mgtBridge, vlan, bonding, nic])
+-- 
+1.8.3.1
+
diff --git a/0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch b/0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch
new file mode 100644
index 0000000..3542255
--- /dev/null
+++ b/0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch
@@ -0,0 +1,46 @@
+From c7e69a1e9eee9d4a0b06b779f8dfc3ac99128ba5 Mon Sep 17 00:00:00 2001
+From: Assaf Muller <amuller at redhat.com>
+Date: Wed, 7 Aug 2013 18:17:18 +0300
+Subject: [PATCH 10/13] Source Route script now checks that the DHCP response
+ is whole
+
+Previously we assumed that every DHCP response contains a
+gateway. Clearly that's wrong :(
+
+Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=994600
+Change-Id: I3400b1ef736082ed3d5c42edf8ed5d66e94cce98
+Signed-off-by: Assaf Muller <amuller at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17793
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm/sourceRoute.sh | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+diff --git a/vdsm/sourceRoute.sh b/vdsm/sourceRoute.sh
+index 2dafe39..bb8384e 100755
+--- a/vdsm/sourceRoute.sh
++++ b/vdsm/sourceRoute.sh
+@@ -3,11 +3,16 @@
+ timeStamp=`date +%s`
+ 
+ sourceRoute_config() {
+-    echo "configure" "$new_ip_address" "$new_subnet_mask" "$new_routers" \
+-        "$interface" > /var/run/vdsm/sourceRoutes/$timeStamp
++    if [ -n "$new_ip_address" ] && [ -n "$new_subnet_mask" ] && \
++       [ -n "$new_routers" ] && [ -n  "$interface" ]; then
++      echo "configure" "$new_ip_address" "$new_subnet_mask" "$new_routers" \
++          "$interface" > /var/run/vdsm/sourceRoutes/$timeStamp
++    fi
+ }
+ 
+ sourceRoute_restore() {
+-    echo "remove" "$interface" > \
+-        /var/run/vdsm/sourceRoutes/$timeStamp
++    if [ -n "$interface" ]; then
++      echo "remove" "$interface" > \
++          /var/run/vdsm/sourceRoutes/$timeStamp
++    fi
+ }
+-- 
+1.8.3.1
+
diff --git a/0011-Management-network-is-now-kept-in-main-routing-table.patch b/0011-Management-network-is-now-kept-in-main-routing-table.patch
new file mode 100644
index 0000000..be74165
--- /dev/null
+++ b/0011-Management-network-is-now-kept-in-main-routing-table.patch
@@ -0,0 +1,324 @@
+From 24dc35742d6a5e1da365bd43659752b394841ddb Mon Sep 17 00:00:00 2001
+From: Assaf Muller <amuller at redhat.com>
+Date: Thu, 1 Aug 2013 15:10:05 +0300
+Subject: [PATCH 11/13] Management network is now kept in main routing table
+
+Only the management network should add its default route
+to the main routing table. Each NetDevice holds an IpConfig
+instance who now holds defaultRoute='yes', 'no' or None.
+Only the top level device will have a defaultRoute value.
+When writing ifcfg files we check if we got a defaultRoute
+value, if so we write it.
+
+Patch Set 7 changed the implementation so that only the top
+level device has DEFROUTE=yes/no in its ifcfg file.
+
+Change-Id: I55c50269dd3d52fd058951200282c925a7014aca
+Signed-off-by: Assaf Muller <amuller at redhat.com>
+Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=984028
+Reviewed-on: http://gerrit.ovirt.org/17844
+Reviewed-by: Antoni Segura Puimedon <asegurap at redhat.com>
+Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
+---
+ lib/vdsm/constants.py.in |  3 +++
+ vdsm/configNetwork.py    | 12 +++++++++---
+ vdsm/netconf/__init__.py |  2 +-
+ vdsm/netconf/ifcfg.py    | 48 ++++++++++++++++++++++++++++++++----------------
+ vdsm/netmodels.py        | 21 ++++++++++++++-------
+ vdsm/sourceRoute.py      |  2 +-
+ 6 files changed, 60 insertions(+), 28 deletions(-)
+
+diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
+index bbbb625..cfea347 100644
+--- a/lib/vdsm/constants.py.in
++++ b/lib/vdsm/constants.py.in
+@@ -22,6 +22,9 @@
+ 
+ import os
+ 
++# VDSM management device
++MANAGEMENT_NETWORK = '@VDSMBRIDGE@'
++
+ # SMBIOS manufacturer
+ SMBIOS_MANUFACTURER = '@SMBIOS_MANUFACTURER@'
+ SMBIOS_OSNAME = '@SMBIOS_OSNAME@'
+diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
+index fdb0b8f..155d22a 100755
+--- a/vdsm/configNetwork.py
++++ b/vdsm/configNetwork.py
+@@ -46,7 +46,7 @@ def objectivizeNetwork(bridge=None, vlan=None, bonding=None,
+                        bondingOptions=None, nics=None, mtu=None, ipaddr=None,
+                        netmask=None, gateway=None, bootproto=None,
+                        _netinfo=None, configurator=None, blockingdhcp=None,
+-                       implicitBonding=None, **opts):
++                       implicitBonding=None, defaultRoute=None, **opts):
+     """
+     Constructs an object hierarchy that describes the network configuration
+     that is passed in the parameters.
+@@ -66,6 +66,8 @@ def objectivizeNetwork(bridge=None, vlan=None, bonding=None,
+     :param blockingdhcp: whether to acquire dhcp IP config in a synced manner.
+     :param implicitBonding: whether the bond's existance is tied to it's
+                             master's.
++    :param defaultRoute: Should this network's gateway be set in the main
++                         routing table?
+ 
+     :returns: the top object of the hierarchy.
+     """
+@@ -101,7 +103,7 @@ def objectivizeNetwork(bridge=None, vlan=None, bonding=None,
+     if topNetDev is None:
+         raise ConfigNetworkError(ne.ERR_BAD_PARAMS, 'Network defined without'
+                                  'devices.')
+-    topNetDev.ip = IpConfig(inet=IPv4(ipaddr, netmask, gateway),
++    topNetDev.ip = IpConfig(inet=IPv4(ipaddr, netmask, gateway, defaultRoute),
+                             bootproto=bootproto,
+                             blocking=utils.tobool(blockingdhcp))
+     return topNetDev
+@@ -182,6 +184,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None,
+             for nic in nics:
+                 _validateInterNetworkCompatibility(_netinfo, vlan, nic,
+                                                    bridged)
++
+     logging.info("Adding network %s with vlan=%s, bonding=%s, nics=%s,"
+                  " bondingOptions=%s, mtu=%s, bridged=%s, options=%s",
+                  network, vlan, bonding, nics, bondingOptions,
+@@ -192,10 +195,13 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None,
+ 
+     bootproto = options.pop('bootproto', None)
+ 
++    defaultRoute = network == constants.MANAGEMENT_NETWORK
++
+     netEnt = objectivizeNetwork(network if bridged else None, vlan, bonding,
+                                 bondingOptions, nics, mtu, ipaddr, netmask,
+                                 gateway, bootproto, _netinfo, configurator,
+-                                **options)
++                                defaultRoute=defaultRoute, **options)
++
+     netEnt.configure(**options)
+     configurator.configureLibvirtNetwork(network, netEnt,
+                                          qosInbound=qosInbound,
+diff --git a/vdsm/netconf/__init__.py b/vdsm/netconf/__init__.py
+index c5227c2..d618522 100644
+--- a/vdsm/netconf/__init__.py
++++ b/vdsm/netconf/__init__.py
+@@ -81,7 +81,7 @@ class Configurator(object):
+         DynamicSourceRoute.addInterfaceTracking(netEnt)
+ 
+     def _removeSourceRoute(self, netEnt):
+-        _, _, _, bootproto, _ = netEnt.getIpConfig()
++        _, _, _, bootproto, _, _ = netEnt.getIpConfig()
+         if bootproto != 'dhcp' and netEnt.master is None:
+             logging.debug("Removing source route for device %s" % netEnt.name)
+             StaticSourceRoute(netEnt.name, self).remove()
+diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py
+index 140b538..5e6239e 100644
+--- a/vdsm/netconf/ifcfg.py
++++ b/vdsm/netconf/ifcfg.py
+@@ -61,7 +61,7 @@ class Ifcfg(Configurator):
+             self._libvirtAdded = set()
+ 
+     def configureBridge(self, bridge, **opts):
+-        ipaddr, netmask, gateway, bootproto, async = bridge.getIpConfig()
++        ipaddr, netmask, gateway, bootproto, async, _ = bridge.getIpConfig()
+         self.configApplier.addBridge(bridge, **opts)
+         ifdown(bridge.name)
+         if bridge.port:
+@@ -70,14 +70,14 @@ class Ifcfg(Configurator):
+         ifup(bridge.name, async)
+ 
+     def configureVlan(self, vlan, **opts):
+-        ipaddr, netmask, gateway, bootproto, async = vlan.getIpConfig()
++        ipaddr, netmask, gateway, bootproto, async, _ = vlan.getIpConfig()
+         self.configApplier.addVlan(vlan, **opts)
+         vlan.device.configure(**opts)
+         self._addSourceRoute(vlan, ipaddr, netmask, gateway, bootproto)
+         ifup(vlan.name, async)
+ 
+     def configureBond(self, bond, **opts):
+-        ipaddr, netmask, gateway, bootproto, async = bond.getIpConfig()
++        ipaddr, netmask, gateway, bootproto, async, _ = bond.getIpConfig()
+         self.configApplier.addBonding(bond, **opts)
+         if not netinfo.isVlanned(bond.name):
+             for slave in bond.slaves:
+@@ -97,7 +97,7 @@ class Ifcfg(Configurator):
+         self.configureBond(bond)
+ 
+     def configureNic(self, nic, **opts):
+-        ipaddr, netmask, gateway, bootproto, async = nic.getIpConfig()
++        ipaddr, netmask, gateway, bootproto, async, _ = nic.getIpConfig()
+         self.configApplier.addNic(nic, **opts)
+         self._addSourceRoute(nic, ipaddr, netmask, gateway, bootproto)
+         if nic.bond is None:
+@@ -445,9 +445,15 @@ class ConfigWriter(object):
+             logging.debug('ignoring restorecon error in case '
+                           'SElinux is disabled', exc_info=True)
+ 
++    @staticmethod
++    def _toIfcfgFormat(defaultRoute):
++        if defaultRoute is None:
++            return None
++        return 'yes' if defaultRoute else 'no'
++
+     def _createConfFile(self, conf, name, ipaddr=None, netmask=None,
+-                        gateway=None, bootproto=None, mtu=None, onboot='yes',
+-                        **kwargs):
++                        gateway=None, bootproto=None, mtu=None,
++                        defaultRoute=None, onboot='yes', **kwargs):
+         """ Create ifcfg-* file with proper fields per device """
+         cfg = self.CONFFILE_HEADER + '\n'
+ 
+@@ -467,6 +473,8 @@ class ConfigWriter(object):
+                 cfg = cfg + 'BOOTPROTO=%s\n' % pipes.quote(bootproto)
+         if mtu:
+             cfg = cfg + 'MTU=%d\n' % mtu
++        if defaultRoute:
++            cfg = cfg + 'DEFROUTE=%s\n' % defaultRoute
+         cfg += 'NM_CONTROLLED=no\n'
+         BLACKLIST = ['TYPE', 'NAME', 'DEVICE', 'bondingOptions',
+                      'force', 'blockingdhcp',
+@@ -482,20 +490,24 @@ class ConfigWriter(object):
+ 
+     def addBridge(self, bridge, **opts):
+         """ Create ifcfg-* file with proper fields for bridge """
+-        ipaddr, netmask, gateway, bootproto, _ = bridge.getIpConfig()
++        ipaddr, netmask, gateway, bootproto, _, defaultRoute = \
++            bridge.getIpConfig()
+         conf = 'TYPE=Bridge\nDELAY=%s\n' % bridge.forwardDelay
+         self._createConfFile(conf, bridge.name, ipaddr, netmask, gateway,
+-                             bootproto, bridge.mtu, **opts)
++                             bootproto, bridge.mtu,
++                             self._toIfcfgFormat(defaultRoute), **opts)
+ 
+     def addVlan(self, vlan, **opts):
+         """ Create ifcfg-* file with proper fields for VLAN """
+-        ipaddr, netmask, gateway, bootproto, _ = vlan.getIpConfig()
++        ipaddr, netmask, gateway, bootproto, _, defaultRoute = \
++            vlan.getIpConfig()
+         conf = 'VLAN=yes\n'
+         if vlan.bridge:
+             conf += 'BRIDGE=%s\n' % pipes.quote(vlan.bridge.name)
+ 
+         self._createConfFile(conf, vlan.name, ipaddr, netmask, gateway,
+-                             bootproto, vlan.mtu, **opts)
++                             bootproto, vlan.mtu,
++                             self._toIfcfgFormat(defaultRoute), **opts)
+ 
+     def addBonding(self, bond, **opts):
+         """ Create ifcfg-* file with proper fields for bond """
+@@ -503,10 +515,10 @@ class ConfigWriter(object):
+         if bond.bridge:
+             conf += 'BRIDGE=%s\n' % pipes.quote(bond.bridge.name)
+ 
+-        ipaddr, netmask, gateway, bootproto, mtu = \
++        ipaddr, netmask, gateway, bootproto, mtu, defaultRoute = \
+             self._getIfaceConfValues(bond, netinfo.NetInfo())
+         self._createConfFile(conf, bond.name, ipaddr, netmask, gateway,
+-                             bootproto, mtu, **opts)
++                             bootproto, mtu, defaultRoute, **opts)
+ 
+         # create the bonding device to avoid initscripts noise
+         if bond.name not in open(netinfo.BONDING_MASTERS).read().split():
+@@ -524,14 +536,16 @@ class ConfigWriter(object):
+         if nic.bond:
+             conf += 'MASTER=%s\nSLAVE=yes\n' % pipes.quote(nic.bond.name)
+ 
+-        ipaddr, netmask, gateway, bootproto, mtu = \
++        ipaddr, netmask, gateway, bootproto, mtu, defaultRoute = \
+             self._getIfaceConfValues(nic, _netinfo)
+         self._createConfFile(conf, nic.name, ipaddr, netmask, gateway,
+-                             bootproto, mtu, **opts)
++                             bootproto, mtu, defaultRoute, **opts)
+ 
+     @staticmethod
+     def _getIfaceConfValues(iface, _netinfo):
+-        ipaddr, netmask, gateway, bootproto, _ = iface.getIpConfig()
++        ipaddr, netmask, gateway, bootproto, _, defaultRoute = \
++            iface.getIpConfig()
++        defaultRoute = ConfigWriter._toIfcfgFormat(defaultRoute)
+         mtu = iface.mtu
+         if _netinfo.ifaceUsers(iface.name):
+             confParams = netinfo.getIfaceCfg(iface.name)
+@@ -540,11 +554,13 @@ class ConfigWriter(object):
+                 netmask = confParams.get('NETMASK', None)
+                 gateway = confParams.get('GATEWAY', None)
+                 bootproto = confParams.get('BOOTPROTO', None)
++            if defaultRoute is None:
++                defaultRoute = confParams.get('DEFROUTE', None)
+             if not iface.mtu:
+                 mtu = confParams.get('MTU', None)
+                 if mtu:
+                     mtu = int(mtu)
+-        return ipaddr, netmask, gateway, bootproto, mtu
++        return ipaddr, netmask, gateway, bootproto, mtu, defaultRoute
+ 
+     def removeNic(self, nic):
+         cf = netinfo.NET_CONF_PREF + nic
+diff --git a/vdsm/netmodels.py b/vdsm/netmodels.py
+index 6368e36..fffba2a 100644
+--- a/vdsm/netmodels.py
++++ b/vdsm/netmodels.py
+@@ -44,10 +44,12 @@ class NetDevice(object):
+ 
+     def getIpConfig(self):
+         try:
+-            ipaddr, netmask, gateway, bootproto, async = self.ip.getConfig()
++            ipaddr, netmask, gateway, bootproto, async, defaultRoute = \
++                self.ip.getConfig()
+         except AttributeError:
+-            ipaddr = netmask = gateway = bootproto = async = None
+-        return ipaddr, netmask, gateway, bootproto, async
++            ipaddr = netmask = gateway = bootproto = async = defaultRoute = \
++                None
++        return ipaddr, netmask, gateway, bootproto, async, defaultRoute
+ 
+     @property
+     def bridge(self):
+@@ -260,7 +262,8 @@ class Bond(NetDevice):
+ 
+ 
+ class IPv4(object):
+-    def __init__(self, address=None, netmask=None, gateway=None):
++    def __init__(self, address=None, netmask=None, gateway=None,
++                 defaultRoute=None):
+         if address:
+             if not netmask:
+                 raise ConfigNetworkError(ne.ERR_BAD_ADDR, 'Must specify '
+@@ -277,9 +280,11 @@ class IPv4(object):
+         self.address = address
+         self.netmask = netmask
+         self.gateway = gateway
++        self.defaultRoute = defaultRoute
+ 
+     def __repr__(self):
+-        return 'IPv4(%s, %s, %s)' % (self.address, self.netmask, self.gateway)
++        return 'IPv4(%s, %s, %s, %s)' % (self.address, self.netmask,
++                                         self.gateway, self.defaultRoute)
+ 
+     @classmethod
+     def validateAddress(cls, address):
+@@ -328,6 +333,8 @@ class IpConfig(object):
+             ipaddr = self.inet.address
+             netmask = self.inet.netmask
+             gateway = self.inet.gateway
++            defaultRoute = self.inet.defaultRoute
+         except AttributeError:
+-            ipaddr = netmask = gateway = None
+-        return ipaddr, netmask, gateway, self.bootproto, self.async
++            ipaddr = netmask = gateway = defaultRoute = None
++        return ipaddr, netmask, gateway, self.bootproto, self.async, \
++            defaultRoute
+diff --git a/vdsm/sourceRoute.py b/vdsm/sourceRoute.py
+index bed5cd0..c05d066 100644
+--- a/vdsm/sourceRoute.py
++++ b/vdsm/sourceRoute.py
+@@ -101,7 +101,7 @@ class DynamicSourceRoute(StaticSourceRoute):
+ 
+     @staticmethod
+     def addInterfaceTracking(device):
+-        _, _, _, bootproto, _ = device.getIpConfig()
++        _, _, _, bootproto, _, _ = device.getIpConfig()
+         if bootproto == 'dhcp':
+             open(DynamicSourceRoute.getTrackingFilePath(device.name), 'a').\
+                 close()
+-- 
+1.8.3.1
+
diff --git a/0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch b/0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch
new file mode 100644
index 0000000..9e47e9e
--- /dev/null
+++ b/0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch
@@ -0,0 +1,38 @@
+From 46a360381ad8b2ffa121d90e718fb838352a123c Mon Sep 17 00:00:00 2001
+From: Assaf Muller <amuller at redhat.com>
+Date: Mon, 12 Aug 2013 14:23:28 +0300
+Subject: [PATCH 12/13] Only remove dhcp source routing if the removal reason
+ is "STOP"
+
+If the reason is FAIL then the IP configuration is not lost
+and source routing should not be removed. Only STOP actually
+removes the ip configuration from the device.
+
+Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=995142
+Change-Id: Ie92a4b4a95e9f1a7855f3d276b4e4d5b8b4c6ad3
+Signed-off-by: Assaf Muller <amuller at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17961
+Reviewed-by: Saggi Mizrahi <smizrahi at redhat.com>
+Reviewed-by: Antoni Segura Puimedon <asegurap at redhat.com>
+Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17963
+---
+ vdsm/sourceRoute.sh | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vdsm/sourceRoute.sh b/vdsm/sourceRoute.sh
+index bb8384e..8c60430 100755
+--- a/vdsm/sourceRoute.sh
++++ b/vdsm/sourceRoute.sh
+@@ -11,7 +11,7 @@ sourceRoute_config() {
+ }
+ 
+ sourceRoute_restore() {
+-    if [ -n "$interface" ]; then
++    if [ -n "$interface" ] && [ "$reason" == "STOP" ]; then
+       echo "remove" "$interface" > \
+           /var/run/vdsm/sourceRoutes/$timeStamp
+     fi
+-- 
+1.8.3.1
+
diff --git a/0013-image-use-successor-volume-size-when-merging.patch b/0013-image-use-successor-volume-size-when-merging.patch
new file mode 100644
index 0000000..7894024
--- /dev/null
+++ b/0013-image-use-successor-volume-size-when-merging.patch
@@ -0,0 +1,47 @@
+From 99290c2dd497b6447dd226ca20076073cb06449a Mon Sep 17 00:00:00 2001
+From: Federico Simoncelli <fsimonce at redhat.com>
+Date: Thu, 18 Jul 2013 13:41:15 -0400
+Subject: [PATCH 13/13] image: use successor volume size when merging
+
+Volumes in the same image chain might have different capacity since the
+introduction of the disk resize feature. This means that when we merge
+volumes the ancestor should get the new size from the successor in order
+to be able to contain the additional data that we are collapsing.
+
+Change-Id: Ic0bfd2ffa080bf89709ae543043b52aad27eb759
+Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/17093
+Reviewed-by: Eduardo <ewarszaw at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/18025
+---
+ vdsm/storage/image.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
+index 2a9510d..9aa8fc7 100644
+--- a/vdsm/storage/image.py
++++ b/vdsm/storage/image.py
+@@ -1000,7 +1000,7 @@ class Image:
+             # destination volume's parent parameters
+             newUUID = srcVol.volUUID + "_MERGE"
+             sdDom.createVolume(
+-                imgUUID=srcVolParams['imgUUID'], size=volParams['size'],
++                imgUUID=srcVolParams['imgUUID'], size=srcVolParams['size'],
+                 volFormat=volParams['volFormat'],
+                 preallocate=volParams['prealloc'],
+                 diskType=volParams['disktype'], volUUID=newUUID,
+@@ -1111,6 +1111,11 @@ class Image:
+         reqSize = min(accSize, imageApparentSize) * 1.1
+         try:
+             # Start the actual merge image procedure
++            # IMPORTANT NOTE: volumes in the same image chain might have
++            # different capacity since the introduction of the disk resize
++            # feature. This means that when we merge volumes the ancestor
++            # should get the new size from the successor (in order to be
++            # able to contain the additional data that we are collapsing).
+             if dstParentUUID != sd.BLANK_UUID:
+                 # The ancestor isn't a base volume of the chain.
+                 self.log.info("Internal volume merge: src = %s dst = %s",
+-- 
+1.8.3.1
+
diff --git a/sources b/sources
index 3cc5616..7a9f675 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-1872fb0d60a1a4908349ef958e19f611  vdsm-4.12.0.tar.gz
+d5ce66e518d8538224f1845c17c6e86f  vdsm-4.12.0.tar.gz
diff --git a/vdsm.spec b/vdsm.spec
index 6811bd6..366613b 100644
--- a/vdsm.spec
+++ b/vdsm.spec
@@ -46,7 +46,7 @@
 
 Name:           %{vdsm_name}
 Version:        4.12.0
-Release:        0.2.rc3%{?vdsm_relvtag}%{?dist}%{?extra_release}
+Release:        1%{?vdsm_relvtag}%{?dist}%{?extra_release}
 Summary:        Virtual Desktop Server Manager
 
 Group:          Applications/System
@@ -60,7 +60,21 @@ Url:            http://www.ovirt.org/wiki/Vdsm
 #  ./autogen.sh --system
 #  make VERSION={version}-{vdsm_release} dist
 Source0:        %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz
-Patch0:		0001-build-use-pythondir-for-vdsmapi.patch
+
+Patch1:         0001-mom-Require-latest-mom.patch
+Patch2:         0002-Mark-ksmtuned-as-conflicting-service-in-the-init-fil.patch
+Patch3:         0003-spec-vdsm-hook-sriov-on-el6-should-not-require-non-e.patch
+Patch4:         0004-Crash-fix-for-migrations-that-involve-devices-with-n.patch
+Patch5:         0005-vdsm-Always-retrieve-alias-for-Balloon-and-Console-d.patch
+Patch6:         0006-vdsm-Fix-regression-introduced-by-refactoring-libvir.patch
+Patch7:         0007-VDSM-now-writes-its-version-number-in-VDSM-generated.patch
+Patch8:         0008-Bump-requires-version-of-selinux-policy-targeted.patch
+Patch9:         0009-vdsm_reg-fix-ovirt_node-without-default-bridge.patch
+Patch10:        0010-Source-Route-script-now-checks-that-the-DHCP-respons.patch
+Patch11:        0011-Management-network-is-now-kept-in-main-routing-table.patch
+Patch12:        0012-Only-remove-dhcp-source-routing-if-the-removal-reaso.patch
+Patch13:        0013-image-use-successor-volume-size-when-merging.patch
+
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -117,7 +131,7 @@ Requires: nfs-utils
 Requires: m2crypto
 Requires: libguestfs-tools-c
 Requires: %{name}-xmlrpc = %{version}-%{release}
-Requires: mom >= 0.3.2
+Requires: mom >= 0.3.2-3
 
 %ifarch x86_64
 Requires: python-dmidecode
@@ -202,7 +216,11 @@ Requires: lvm2 >= 2.02.95
 %endif
 
 %if 0%{?fedora} >= 18
-Requires: selinux-policy-targeted >= 3.11.1-71
+%if 0%{?fedora} >= 19
+Requires: selinux-policy-targeted >= 3.12.1-69
+%else
+Requires: selinux-policy-targeted >= 3.11.1-100
+%endif
 # In order to avoid a policycoreutils bug (rhbz 889698) when selinux is
 # disabled we now require the version 2.1.13-55 (or newer) of Fedora.
 Requires: policycoreutils >= 2.1.13-55
@@ -498,7 +516,9 @@ such as: vendor, version, date and release
 
 %package hook-sriov
 Summary:        sr-iov support for VDSM
+%if 0%{?rhel} >= 7 || 0%{?fedora} >= 18
 Requires:       libvirt-daemon-driver-nodedev
+%endif
 BuildArch:      noarch
 
 %description hook-sriov
@@ -537,7 +557,19 @@ Gluster plugin enables VDSM to serve Gluster functionalities.
 
 %prep
 %setup -q
-%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
 %if 0%{?rhel} == 6
 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in
 %endif
@@ -658,11 +690,6 @@ fi
 %else
 %if 0%{?with_systemd}
 /bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || :
-%if 0%{?with_systemd_macros}
-%systemd_post vdsmd.service
-%systemd_post supervdsmd.service
-%systemd_post vdsm-restore-net-config.service
-%else
 if [ "$1" -eq 1 ] ; then
     /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || :
     /bin/systemctl enable supervdsmd.service >/dev/null 2>&1 || :
@@ -672,7 +699,6 @@ fi
 exit 0
 %endif
 %endif
-%endif
 
 %preun
 if [ "$1" -eq 0 ]; then
@@ -1297,8 +1323,23 @@ exit 0
 %{python_sitearch}/cpopen/__init__.py*
 %attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so*
 
-
 %changelog
+* Tue Aug 13 2013 Federico Simoncelli <fsimonce at redhat.com> 4.12.0-1
+- update to 4.12.0 final release
+- mom: Require latest mom
+- Mark ksmtuned as conflicting service in the init file
+- spec: vdsm-hook-sriov on el6 should not require
+- Crash fix for migrations that involve devices with no aliases (BZ#988065)
+- vdsm: Always retrieve alias for Balloon and Console (BZ#988065)
+- vdsm: Fix regression introduced by refactoring (BZ#985735)
+- VDSM now writes its version number in VDSM-generated
+- Bump requires version of selinux-policy-targeted
+- vdsm_reg: fix ovirt_node without default bridge (BZ#988990)
+- Source Route script now checks that the DHCP response (BZ#994600)
+- Management network is now kept in main routing table (BZ#984028)
+- Only remove dhcp source routing if the removal reason (BZ#995142)
+- image: use successor volume size when merging
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 4.12.0-0.2.rc3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list