[vdsm/f17] update to vdsm-4.10.0-5
Federico Simoncelli
fsimonce at fedoraproject.org
Tue Jul 17 14:07:15 UTC 2012
commit 6581ca8abd70837a0020e61439103120e59f56fd
Author: Federico Simoncelli <fsimonce at redhat.com>
Date: Tue Jul 17 12:52:19 2012 +0200
update to vdsm-4.10.0-5
- configNet: atomicBackup: remove new files upon restore
- configNet: clear up atomicBackup arg
- Remove redundant 'explicitBonding' parameter from setupNetworks
- BZ#837054 - Do not detach network from the bond during bond resize
- BZ#836954 - Allow to break bond and create a new network on its
interface in single action.
- BZ#837443: remove bridge before add VDSM bridge
- BZ#837443: removeVlan() drop/remove interface
- configNetwork: fix NetInfo call
- BZ#837443: replace the netinfo import
- BZ#837443: removeBridge() drop/remove interface
- ovirt_functions: fix elif statement
- BZ#838097 _addNetworkValidation: do not explode if STP/DNS1 option
passed
- BZ#832199: move selinux from init to spec
- bump libvirt version to fix readonly lease unsupported issue
Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
...t-version-to-fix-readonly-lease-unsupport.patch | 32 +++
...-BZ-832199-move-selinux-from-init-to-spec.patch | 89 +++++++++
...addNetworkValidation-do-not-explode-if-ST.patch | 34 ++++
0030-ovirt_functions-fix-elif-statement.patch | 39 ++++
...837443-removeBridge-drop-remove-interface.patch | 44 +++++
0032-BZ-837443-replace-the-netinfo-import.patch | 199 ++++++++++++++++++++
0033-configNetwork-fix-NetInfo-call.patch | 32 +++
...Z-837443-removeVlan-drop-remove-interface.patch | 55 ++++++
...7443-remove-bridge-before-add-VDSM-bridge.patch | 64 +++++++
...llow-to-break-bond-and-create-a-new-netwo.patch | 47 +++++
...o-not-detach-network-from-the-bond-during.patch | 47 +++++
...ndant-explicitBonding-parameter-from-setu.patch | 115 +++++++++++
0039-configNet-clear-up-atomicBackup-arg.patch | 41 ++++
...tomicBackup-remove-new-files-upon-restore.patch | 51 +++++
vdsm.spec | 71 +++++++-
15 files changed, 957 insertions(+), 3 deletions(-)
---
diff --git a/0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch b/0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch
new file mode 100644
index 0000000..17e09ab
--- /dev/null
+++ b/0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch
@@ -0,0 +1,32 @@
+From ada1caae80ef463d511395ccbd0cb773b3e8b8b6 Mon Sep 17 00:00:00 2001
+From: lvroyce <lvroyce at linux.vnet.ibm.com>
+Date: Fri, 29 Jun 2012 13:13:52 +0800
+Subject: [PATCH 27/40] bump libvirt version to fix readonly lease unsupported
+ issue
+
+Change-Id: I116f3ce07fff8075902a862e0259198232efd2f4
+Signed-off-by: Royce Lv <lvroyce at linux.vnet.ibm.com>
+Reviewed-on: http://gerrit.ovirt.org/5787
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Tested-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm.spec.in | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/vdsm.spec.in b/vdsm.spec.in
+index 3fd404e..88fe373 100644
+--- a/vdsm.spec.in
++++ b/vdsm.spec.in
+@@ -63,7 +63,8 @@ Requires: e2fsprogs >= 1.41.12-11
+ Requires: python >= 2.7.3
+ Requires: qemu-kvm >= 2:0.15.0-4
+ Requires: qemu-img >= 2:0.15.0-4
+-Requires: libvirt >= 0.9.10
++#readonly lease ignored by default on 0.9.11.4-3
++Requires: libvirt >= 0.9.11.4-3
+ Requires: libvirt-python, libvirt-lock-sanlock
+ Requires: iscsi-initiator-utils >= 6.2.0.872-14
+ Requires: device-mapper-multipath >= 0.4.9-18
+--
+1.7.7.6
+
diff --git a/0028-BZ-832199-move-selinux-from-init-to-spec.patch b/0028-BZ-832199-move-selinux-from-init-to-spec.patch
new file mode 100644
index 0000000..c133b68
--- /dev/null
+++ b/0028-BZ-832199-move-selinux-from-init-to-spec.patch
@@ -0,0 +1,89 @@
+From 16ad84b47fac0e325073e1b08e99a364c7850699 Mon Sep 17 00:00:00 2001
+From: Douglas Schilling Landgraf <dougsland at redhat.com>
+Date: Fri, 6 Jul 2012 09:40:17 -0400
+Subject: [PATCH 28/40] BZ#832199: move selinux from init to spec
+
+To reduce the time during the init, transferring all the selinux
+set to spec instead use it during the vdsm init.
+
+Change-Id: Id515ddb96cbfb4f3a936336b3f7e261658df662a
+Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/5614
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm.spec.in | 22 +++++++++++++++++++++-
+ vdsm/vdsmd.init.in | 8 --------
+ 2 files changed, 21 insertions(+), 9 deletions(-)
+
+diff --git a/vdsm.spec.in b/vdsm.spec.in
+index 88fe373..6be7da4 100644
+--- a/vdsm.spec.in
++++ b/vdsm.spec.in
+@@ -78,6 +78,7 @@ Requires: sos
+ Requires: tree
+ Requires: dosfstools
+ Requires: policycoreutils-python
++Requires(pre,preun): policycoreutils-python
+ Requires: libselinux-python
+ Requires: kernel >= 2.6.32-198
+ Requires: %{name}-python = %{version}-%{release}
+@@ -375,6 +376,23 @@ rm -rf %{buildroot}
+ /usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user}
+ /usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user}
+
++# vdsm makes extensive use of nfs-exported images
++# The next lines will collect the default selinux behaviour for the booleans
++virtNFS=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_nfs | cut -d ',' -f 2)
++virtSANLOCK=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_sanlock | cut -d ',' -f 2)
++
++if [[ "${virtNFS}" == *off* || "${virtSANLOCK}" == *off* ]]; then
++ /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF
++virt_use_nfs=1
++virt_use_sanlock=1
++_EOF
++fi
++
++if /usr/sbin/selinuxenabled; then
++ /usr/sbin/setsebool virt_use_nfs on
++ /usr/sbin/setsebool virt_use_sanlock on
++fi
++
+ %post
+ # update the vdsm "secret" password for libvirt
+ if [ -f /etc/pki/vdsm/keys/libvirt_password ]; then
+@@ -415,10 +433,12 @@ then
+
+ /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF
+ virt_use_nfs=0
++virt_use_sanlock=0
+ _EOF
+
+- if selinuxenabled; then
++ if /usr/sbin/selinuxenabled; then
+ /usr/sbin/setsebool virt_use_nfs off
++ /usr/sbin/setsebool virt_use_sanlock off
+ fi
+
+ /usr/sbin/saslpasswd2 -p -a libvirt -d vdsm at rhevh
+diff --git a/vdsm/vdsmd.init.in b/vdsm/vdsmd.init.in
+index ac3bd08..dd6f3c6 100755
+--- a/vdsm/vdsmd.init.in
++++ b/vdsm/vdsmd.init.in
+@@ -410,14 +410,6 @@ EOF
+
+ ovirt_store_config "$lconf" "$qconf" "$ldconf" "$llogr"
+
+- # vdsm makes extensive use of nfs-exported images
+- /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF
+-virt_use_nfs=1
+-virt_use_sanlock=1
+-_EOF
+- /usr/sbin/setsebool virt_use_nfs on
+- /usr/sbin/setsebool virt_use_sanlock on
+-
+ /sbin/initctl restart libvirtd 2>/dev/null || :
+ }
+
+--
+1.7.7.6
+
diff --git a/0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch b/0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch
new file mode 100644
index 0000000..41d95ee
--- /dev/null
+++ b/0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch
@@ -0,0 +1,34 @@
+From 34f080dd8b7456248ed2e2693030cf736e097606 Mon Sep 17 00:00:00 2001
+From: Dan Kenigsberg <danken at redhat.com>
+Date: Tue, 3 Jul 2012 10:53:37 +0300
+Subject: [PATCH 29/40] BZ#838097 _addNetworkValidation: do not explode if
+ STP/DNS1 option passed
+
+http://gerrit.ovirt.org/5456 has started passing all optional parameters
+to _addNetworkValidation, but no one is expecting them there.
+
+Change-Id: I071e6a7a53279c24d45ebec3858d9b0c0d6294ae
+Signed-off-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/5885
+Reviewed-by: Igor Lvovsky <ilvovsky at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6017
+---
+ vdsm/configNetwork.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
+index af6c19d..961dd33 100755
+--- a/vdsm/configNetwork.py
++++ b/vdsm/configNetwork.py
+@@ -494,7 +494,7 @@ def validateVlanId(vlan):
+
+ def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr,
+ netmask, gateway, bondingOptions, bridged=True,
+- implicitBonding=False):
++ implicitBonding=False, **options):
+ # The (relatively) new setupNetwork verb allows to specify a network on
+ # top of an existing bonding device. The nics of this bonds are taken
+ # implictly from current host configuration
+--
+1.7.7.6
+
diff --git a/0030-ovirt_functions-fix-elif-statement.patch b/0030-ovirt_functions-fix-elif-statement.patch
new file mode 100644
index 0000000..4cc9980
--- /dev/null
+++ b/0030-ovirt_functions-fix-elif-statement.patch
@@ -0,0 +1,39 @@
+From fe88d1834032776638fc41c9fc96123923e1432a Mon Sep 17 00:00:00 2001
+From: Douglas Schilling Landgraf <dougsland at redhat.com>
+Date: Mon, 9 Jul 2012 10:49:24 -0400
+Subject: [PATCH 30/40] ovirt_functions: fix elif statement
+
+Identify correctly the ovirt Node and fix the error message from vdsm-reg logs:
+
+[: /etc/ovirt-node-image-release: binary operator expected
+
+Change-Id: I4eae7e64361d148d60c50dbacd273de7a2490be2
+Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6072
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm/ovirt_functions.sh | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/vdsm/ovirt_functions.sh b/vdsm/ovirt_functions.sh
+index 84cf686..b1e3ef2 100644
+--- a/vdsm/ovirt_functions.sh
++++ b/vdsm/ovirt_functions.sh
+@@ -9,10 +9,12 @@
+ #
+
+ function isOvirt() {
++ for f in /etc/ovirt-node-*-release; do
++ [ -f "$f" ] && return 0
++ done
++
+ if [ -f /etc/rhev-hypervisor-release ]; then
+ return 0
+- elif [ -f /etc/ovirt-node-*-release ]; then
+- return 0
+ else
+ return 1
+ fi
+--
+1.7.7.6
+
diff --git a/0031-BZ-837443-removeBridge-drop-remove-interface.patch b/0031-BZ-837443-removeBridge-drop-remove-interface.patch
new file mode 100644
index 0000000..df21615
--- /dev/null
+++ b/0031-BZ-837443-removeBridge-drop-remove-interface.patch
@@ -0,0 +1,44 @@
+From f1792cfb33bff5ef5c9a8c1f938ff92b00d192a8 Mon Sep 17 00:00:00 2001
+From: Douglas Schilling Landgraf <dougsland at redhat.com>
+Date: Mon, 9 Jul 2012 17:20:35 -0400
+Subject: [PATCH 31/40] BZ#837443: removeBridge() drop/remove interface
+
+Move ifdown() and brctl delbr to removeBridge(). We need a generic
+function to be called multiple times. For example, removing a bridge listed
+or not listed in libvirt database.
+
+Change-Id: Iea798b2ddf6413b58dbfc3d8d11dc4bf54c592fc
+Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/5914
+Reviewed-by: Igor Lvovsky <ilvovsky at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6204
+---
+ vdsm/configNetwork.py | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
+index 961dd33..51471bc 100755
+--- a/vdsm/configNetwork.py
++++ b/vdsm/configNetwork.py
+@@ -321,6 +321,8 @@ class ConfigWriter(object):
+ self._removeFile(self.NET_CONF_PREF + bonding)
+
+ def removeBridge(self, bridge):
++ ifdown(bridge)
++ subprocess.call([constants.EXT_BRCTL, 'delbr', bridge])
+ self._backup(self.NET_CONF_PREF + bridge)
+ self._removeFile(self.NET_CONF_PREF + bridge)
+
+@@ -775,8 +777,6 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False,
+ "delNetwork: bridge %s still exists" % network)
+
+ if network and bridged:
+- ifdown(network)
+- subprocess.call([constants.EXT_BRCTL, 'delbr', network])
+ configWriter.removeBridge(network)
+
+ if vlan:
+--
+1.7.7.6
+
diff --git a/0032-BZ-837443-replace-the-netinfo-import.patch b/0032-BZ-837443-replace-the-netinfo-import.patch
new file mode 100644
index 0000000..77acbcb
--- /dev/null
+++ b/0032-BZ-837443-replace-the-netinfo-import.patch
@@ -0,0 +1,199 @@
+From a2e8aa85f270d5bd2390b07ac82710fa398c755b Mon Sep 17 00:00:00 2001
+From: Douglas Schilling Landgraf <dougsland at redhat.com>
+Date: Thu, 12 Jul 2012 17:01:22 -0400
+Subject: [PATCH 32/40] BZ#837443: replace the netinfo import
+
+We will use functions like netinfo.bridges() to
+verify if there is any bridge listed in the system
+but not in the libvirt database.
+
+Change-Id: I76ac6f21267f9e2c26f032dbe0334aeaa59aa030
+Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6205
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm/configNetwork.py | 42 +++++++++++++++++++++---------------------
+ 1 files changed, 21 insertions(+), 21 deletions(-)
+
+diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
+index 51471bc..bddf71c 100755
+--- a/vdsm/configNetwork.py
++++ b/vdsm/configNetwork.py
+@@ -33,7 +33,7 @@ from vdsm import constants
+ from vdsm import utils
+ import neterrors as ne
+ from vdsm import define
+-from vdsm.netinfo import NetInfo, NET_CONF_DIR, NET_CONF_BACK_DIR, LIBVIRT_NET_PREFIX
++from vdsm import netinfo
+ from vdsm import libvirtconnection
+
+ CONNECTIVITY_TIMEOUT_DEFAULT = 4
+@@ -84,7 +84,7 @@ def ifup(iface):
+
+ def ifaceUsers(iface):
+ "Returns a list of entities using the interface"
+- _netinfo = NetInfo()
++ _netinfo = netinfo.NetInfo()
+ users = set()
+ for n, ndict in _netinfo.networks.iteritems():
+ if ndict['bridged'] and iface in ndict['ports']:
+@@ -155,7 +155,7 @@ def nicSort(nics):
+ return [x + z for x, y, z in sorted(nics_list)]
+
+ class ConfigWriter(object):
+- NET_CONF_PREF = NET_CONF_DIR + 'ifcfg-'
++ NET_CONF_PREF = netinfo.NET_CONF_DIR + 'ifcfg-'
+ CONFFILE_HEADER = '# automatically generated by vdsm'
+ DELETED_HEADER = '# original file did not exist'
+
+@@ -168,7 +168,7 @@ class ConfigWriter(object):
+
+ def _atomicBackup(self, filename):
+ """Backs up configuration to memory, for a later rollback in case of error."""
+- confFile = os.path.join(NET_CONF_DIR, filename)
++ confFile = os.path.join(netinfo.NET_CONF_DIR, filename)
+ if confFile not in self._backups:
+ try:
+ self._backups[confFile] = open(confFile).read()
+@@ -201,7 +201,7 @@ class ConfigWriter(object):
+ logging.debug("unmounted %s using ovirt" % filename)
+
+ (dummy, basename) = os.path.split(filename)
+- backup = os.path.join(NET_CONF_BACK_DIR, basename)
++ backup = os.path.join(netinfo.NET_CONF_BACK_DIR, basename)
+ if os.path.exists(backup):
+ # original copy already backed up
+ return
+@@ -209,9 +209,9 @@ class ConfigWriter(object):
+ vdsm_uid = pwd.getpwnam('vdsm').pw_uid
+
+ # make directory (if it doesn't exist) and assign it to vdsm
+- if not os.path.exists(NET_CONF_BACK_DIR):
+- os.mkdir(NET_CONF_BACK_DIR)
+- os.chown(NET_CONF_BACK_DIR, vdsm_uid, 0)
++ if not os.path.exists(netinfo.NET_CONF_BACK_DIR):
++ os.mkdir(netinfo.NET_CONF_BACK_DIR)
++ os.chown(netinfo.NET_CONF_BACK_DIR, vdsm_uid, 0)
+
+ if os.path.exists(filename):
+ shutil.copy2(filename, backup)
+@@ -285,7 +285,7 @@ class ConfigWriter(object):
+ "Based on addNetwork"
+ conffile = self.NET_CONF_PREF + nic
+ self._backup(conffile)
+- _netinfo = NetInfo()
++ _netinfo = netinfo.NetInfo()
+ hwaddr = _netinfo.nics[nic].get('permhwaddr') or \
+ _netinfo.nics[nic]['hwaddr']
+ with open(conffile, 'w') as f:
+@@ -413,7 +413,7 @@ class ConfigWriter(object):
+ Or added a new value,
+ also set the bridge to the higher value if its under vlans or bond
+ """
+- _netinfo = NetInfo()
++ _netinfo = netinfo.NetInfo()
+ cf = self.NET_CONF_PREF + bridge
+ currmtu = self._getConfigValue(cf, 'MTU')
+ if currmtu is None:
+@@ -581,7 +581,7 @@ def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr,
+ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask=None, mtu=None,
+ gateway=None, force=False, configWriter=None, bondingOptions=None, bridged=True, **options):
+ nics = nics or ()
+- _netinfo = NetInfo()
++ _netinfo = netinfo.NetInfo()
+ bridged = utils.tobool(bridged)
+
+ if mtu:
+@@ -659,7 +659,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask
+
+ def createLibvirtNetwork(network, bridged=True, iface=None):
+ conn = libvirtconnection.get()
+- netName = LIBVIRT_NET_PREFIX + network
++ netName = netinfo.LIBVIRT_NET_PREFIX + network
+ if bridged:
+ netXml = '''<network><name>%s</name><forward mode='bridge'/>
+ <bridge name='%s'/></network>''' % (escape(netName), escape(network))
+@@ -672,7 +672,7 @@ def createLibvirtNetwork(network, bridged=True, iface=None):
+ net.setAutostart(1)
+
+ def removeLibvirtNetwork(network, log=True):
+- netName = LIBVIRT_NET_PREFIX + network
++ netName = netinfo.LIBVIRT_NET_PREFIX + network
+ conn = libvirtconnection.get()
+ try:
+ net = conn.networkLookupByName(netName)
+@@ -705,7 +705,7 @@ def assertBridgeClean(bridge, vlan, bonding, nics):
+ raise ConfigNetworkError(ne.ERR_USED_BRIDGE, 'bridge %s has interfaces %s connected' % (bridge, brifs))
+
+ def showNetwork(network):
+- _netinfo = NetInfo()
++ _netinfo = netinfo.NetInfo()
+ if network not in _netinfo.networks:
+ print "Network %r doesn't exist" % network
+ return
+@@ -729,7 +729,7 @@ def showNetwork(network):
+ print "vlan=%s, bonding=%s, nics=%s" % (vlan, bonding, nics)
+
+ def listNetworks():
+- _netinfo = NetInfo()
++ _netinfo = netinfo.NetInfo()
+ print "Networks:", _netinfo.networks.keys()
+ print "Vlans:", _netinfo.vlans.keys()
+ print "Nics:", _netinfo.nics.keys()
+@@ -737,7 +737,7 @@ def listNetworks():
+
+ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False,
+ configWriter=None, implicitBonding=True, **options):
+- _netinfo = NetInfo()
++ _netinfo = netinfo.NetInfo()
+
+ validateBridgeName(network)
+
+@@ -772,7 +772,7 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False,
+ removeLibvirtNetwork(network, log=False)
+ # We need to gather NetInfo again to refresh networks info from libvirt.
+ # The deleted bridge should never be up at this stage.
+- if network in NetInfo().networks:
++ if network in netinfo.NetInfo().networks:
+ raise ConfigNetworkError(ne.ERR_USED_BRIDGE,
+ "delNetwork: bridge %s still exists" % network)
+
+@@ -825,7 +825,7 @@ def editNetwork(oldBridge, newBridge, vlan=None, bonding=None, nics=None, **opti
+ return define.errCode['noConPeer']['status']['code']
+
+ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False):
+- _netinfo = NetInfo()
++ _netinfo = netinfo.NetInfo()
+
+ # Step 1: Initial validation (validate names, existence of params, etc.)
+ for network, networkAttrs in networks.iteritems():
+@@ -973,7 +973,7 @@ def _editBondings(bondings, configWriter):
+ """ Add/Edit bond interface """
+ logger = logging.getLogger("_editBondings")
+
+- _netinfo = NetInfo()
++ _netinfo = netinfo.NetInfo()
+
+ for bond, bondAttrs in bondings.iteritems():
+ logger.debug("Creating/Editing bond %s with attributes %s",
+@@ -999,7 +999,7 @@ def _removeBondings(bondings, configWriter):
+ """ Add/Edit bond interface """
+ logger = logging.getLogger("_removeBondings")
+
+- _netinfo = NetInfo()
++ _netinfo = netinfo.NetInfo()
+
+ for bond, bondAttrs in bondings.items():
+ if 'remove' in bondAttrs:
+@@ -1063,7 +1063,7 @@ def setupNetworks(networks={}, bondings={}, **options):
+ logger = logging.getLogger("setupNetworks")
+
+ try:
+- _netinfo = NetInfo()
++ _netinfo = netinfo.NetInfo()
+ configWriter = ConfigWriter()
+ networksAdded = set()
+ # keep set netsWithNewBonds to be able remove
+--
+1.7.7.6
+
diff --git a/0033-configNetwork-fix-NetInfo-call.patch b/0033-configNetwork-fix-NetInfo-call.patch
new file mode 100644
index 0000000..7973f79
--- /dev/null
+++ b/0033-configNetwork-fix-NetInfo-call.patch
@@ -0,0 +1,32 @@
+From ce31be09f8e1ae3decaa5219d6ffdfb9a39115f9 Mon Sep 17 00:00:00 2001
+From: Douglas Schilling Landgraf <dougsland at redhat.com>
+Date: Thu, 12 Jul 2012 16:09:50 -0400
+Subject: [PATCH 33/40] configNetwork: fix NetInfo call
+
+Commit 9be0497ba77333577e3f5e8738c9efd8794e7a36 changed the import of
+netinfo. This patch fix a NetInfo call missed from the previous patch.
+
+Change-Id: I962cbd39d601300d10a25f5ccb36875b2e544cf1
+Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6206
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm/configNetwork.py | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
+index bddf71c..5d2469d 100755
+--- a/vdsm/configNetwork.py
++++ b/vdsm/configNetwork.py
+@@ -440,7 +440,7 @@ class ConfigWriter(object):
+
+ if newmtu != currmtu:
+ if bonding:
+- slaves = NetInfo.slaves(bonding)
++ slaves = netinfo.NetInfo.slaves(bonding)
+ for slave in slaves:
+ cf = self.NET_CONF_PREF + slave
+ self._updateConfigValue(cf, 'MTU', newmtu, newmtu is None)
+--
+1.7.7.6
+
diff --git a/0034-BZ-837443-removeVlan-drop-remove-interface.patch b/0034-BZ-837443-removeVlan-drop-remove-interface.patch
new file mode 100644
index 0000000..0ca179c
--- /dev/null
+++ b/0034-BZ-837443-removeVlan-drop-remove-interface.patch
@@ -0,0 +1,55 @@
+From 229e294cf3649e03df7b9d876a918c9604ebbdc5 Mon Sep 17 00:00:00 2001
+From: Douglas Schilling Landgraf <dougsland at redhat.com>
+Date: Mon, 9 Jul 2012 17:27:35 -0400
+Subject: [PATCH 34/40] BZ#837443: removeVlan() drop/remove interface
+
+Move ifdown() and vconfig rm to removeVlan(). We need a generic
+function to be called multiple times. For example, removing a vlan listed
+or not listed in libvirt database.
+
+Change-Id: I2db7d26e3bb7fda62f1a8fcdbd0445554df20ad7
+Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6090
+Reviewed-by: Igor Lvovsky <ilvovsky at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Tested-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6207
+---
+ vdsm/configNetwork.py | 14 +++++++-------
+ 1 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
+index 5d2469d..dabd219 100755
+--- a/vdsm/configNetwork.py
++++ b/vdsm/configNetwork.py
+@@ -312,9 +312,13 @@ class ConfigWriter(object):
+ except IOError:
+ pass
+
+- def removeVlan(self, vlanId, iface):
+- self._backup(self.NET_CONF_PREF + iface + '.' + vlanId)
+- self._removeFile(self.NET_CONF_PREF + iface + '.' + vlanId)
++ def removeVlan(self, vlan, iface):
++ vlandev = iface + '.' + vlan
++ ifdown(vlandev)
++ subprocess.call([constants.EXT_VCONFIG, 'rem', vlandev],
++ stderr=subprocess.PIPE)
++ self._backup(self.NET_CONF_PREF + iface + '.' + vlan)
++ self._removeFile(self.NET_CONF_PREF + iface + '.' + vlan)
+
+ def removeBonding(self, bonding):
+ self._backup(self.NET_CONF_PREF + bonding)
+@@ -780,10 +784,6 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False,
+ configWriter.removeBridge(network)
+
+ if vlan:
+- vlandev = (bonding or nics[0]) + '.' + vlan
+- ifdown(vlandev)
+- subprocess.call([constants.EXT_VCONFIG, 'rem', vlandev],
+- stderr=subprocess.PIPE)
+ configWriter.removeVlan(vlan, bonding or nics[0])
+
+ # The (relatively) new setupNetwork verb allows to remove a network
+--
+1.7.7.6
+
diff --git a/0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch b/0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch
new file mode 100644
index 0000000..14f4411
--- /dev/null
+++ b/0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch
@@ -0,0 +1,64 @@
+From dbe23c6eb50b6dc59738dceb0ece78221cadcfd3 Mon Sep 17 00:00:00 2001
+From: Douglas Schilling Landgraf <dougsland at redhat.com>
+Date: Wed, 11 Jul 2012 11:18:42 -0400
+Subject: [PATCH 35/40] BZ#837443: remove bridge before add VDSM bridge
+
+Related to BZ#837443: ovirt-node fails to register with ovirt-engine
+
+oVirt Node when installed manually creates a bridge to be consumed.
+VDSM should remove any bridge (listed or not listed in libvirt)
+to create it's own bridge.
+
+Change-Id: Ibc2842db371483225042d511c6495df1bc5047de
+Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6016
+Reviewed-by: Igor Lvovsky <ilvovsky at redhat.com>
+Reviewed-by: Mark Wu <wudxw at linux.vnet.ibm.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6208
+---
+ vdsm/configNetwork.py | 20 +++++++++++++++-----
+ 1 files changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
+index dabd219..c94648c 100755
+--- a/vdsm/configNetwork.py
++++ b/vdsm/configNetwork.py
+@@ -745,9 +745,22 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False,
+
+ validateBridgeName(network)
+
++ if configWriter is None:
++ configWriter = ConfigWriter()
++
+ if network not in _netinfo.networks:
+- raise ConfigNetworkError(ne.ERR_BAD_BRIDGE,
+- "Cannot delete network %r: It doesn't exist" % network)
++ logging.info("Network %r: doesn't exist in libvirt database", network)
++ if network in netinfo.bridges():
++ configWriter.removeBridge(network)
++ else:
++ raise ConfigNetworkError(ne.ERR_BAD_BRIDGE,
++ "Cannot delete network %r: It doesn't exist "
++ "in the system" % network)
++
++ if vlan:
++ configWriter.removeVlan(vlan, bonding or nics[0])
++
++ return
+
+ nics, vlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(network)
+ bridged = _netinfo.networks[network]['bridged']
+@@ -767,9 +780,6 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False,
+ if bridged:
+ assertBridgeClean(network, vlan, bonding, nics)
+
+- if configWriter is None:
+- configWriter = ConfigWriter()
+-
+ if bridged:
+ configWriter.setNewMtu(network)
+
+--
+1.7.7.6
+
diff --git a/0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch b/0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch
new file mode 100644
index 0000000..cdbdac7
--- /dev/null
+++ b/0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch
@@ -0,0 +1,47 @@
+From ee31f19b5340506bc73d9f2fc27366d5241c3ca2 Mon Sep 17 00:00:00 2001
+From: Igor Lvovsky <ilvovsky at redhat.com>
+Date: Mon, 2 Jul 2012 13:00:19 +0300
+Subject: [PATCH 36/40] BZ#836954 - Allow to break bond and create a new
+ network on its interface in single action.
+
+Assume we have a bond0 on (eth1, eth2) with defined network brNet on it.
+This patch will allow to break the bond0 and create a new network brNet2 on one
+of its interfaces (e.g. eth2) with single setupNetworks operation
+
+Change-Id: Iaa6459ec24f9c81a2cfbc107b5e3548126903357
+Signed-off-by: Igor Lvovsky <ilvovsky at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/5841
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6210
+Tested-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm/configNetwork.py | 6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
+index c94648c..d277cd6 100755
+--- a/vdsm/configNetwork.py
++++ b/vdsm/configNetwork.py
+@@ -1107,6 +1107,9 @@ def setupNetworks(networks={}, bondings={}, **options):
+ else:
+ networksAdded.add(network)
+
++ # Remove bonds with 'remove' attribute
++ _removeBondings(bondings, configWriter)
++
+ handledBonds = set()
+ for network, networkAttrs in networks.iteritems():
+ d = dict(networkAttrs)
+@@ -1137,9 +1140,6 @@ def setupNetworks(networks={}, bondings={}, **options):
+ del bondings[bond]
+
+ # We are now left with bondings whose network was not mentioned
+- # Remove bonds with 'remove' attribute
+- _removeBondings(bondings, configWriter)
+-
+ # Check whether bonds should be resized
+ _editBondings(bondings, configWriter)
+
+--
+1.7.7.6
+
diff --git a/0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch b/0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch
new file mode 100644
index 0000000..c7fd1a2
--- /dev/null
+++ b/0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch
@@ -0,0 +1,47 @@
+From 3060b9110bb37ee2b05356b37fde4d79b1e46c5f Mon Sep 17 00:00:00 2001
+From: Igor Lvovsky <ilvovsky at redhat.com>
+Date: Thu, 5 Jul 2012 15:05:14 +0300
+Subject: [PATCH 37/40] BZ#837054 - Do not detach network from the bond during
+ bond resize
+
+Let's say you have bond and bridged non-VLANed network on it.
+This patch will fix detaching such network from the bond during bond resizing.
+
+Change-Id: Idf2a7f73b23dc9692bec9cc3fad01e947a7294af
+Signed-off-by: Igor Lvovsky <ilvovsky at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/5970
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6213
+Tested-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm/configNetwork.py | 7 ++++++-
+ 1 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
+index d277cd6..eb140f8 100755
+--- a/vdsm/configNetwork.py
++++ b/vdsm/configNetwork.py
+@@ -988,6 +988,11 @@ def _editBondings(bondings, configWriter):
+ for bond, bondAttrs in bondings.iteritems():
+ logger.debug("Creating/Editing bond %s with attributes %s",
+ bond, bondAttrs)
++
++ brNets = list(_netinfo.getBridgedNetworksForNic(bond))
++ # Only one bridged-non-VLANed network allowed on same nic/bond
++ bridge = brNets[0] if brNets else None
++
+ if bond in _netinfo.bondings:
+ ifdown(bond)
+ # Take down all bond's NICs.
+@@ -1001,7 +1006,7 @@ def _editBondings(bondings, configWriter):
+ configWriter.addNic(nic, bonding=bond)
+ ifup(nic)
+
+- configWriter.addBonding(bond,
++ configWriter.addBonding(bond, bridge=bridge,
+ bondingOptions=bondAttrs.get('options', None))
+ ifup(bond)
+
+--
+1.7.7.6
+
diff --git a/0038-Remove-redundant-explicitBonding-parameter-from-setu.patch b/0038-Remove-redundant-explicitBonding-parameter-from-setu.patch
new file mode 100644
index 0000000..c8e2ef5
--- /dev/null
+++ b/0038-Remove-redundant-explicitBonding-parameter-from-setu.patch
@@ -0,0 +1,115 @@
+From 5cb2be8ed2406928525072360c3a2571229415f9 Mon Sep 17 00:00:00 2001
+From: Igor Lvovsky <ilvovsky at redhat.com>
+Date: Mon, 2 Jul 2012 12:40:54 +0300
+Subject: [PATCH 38/40] Remove redundant 'explicitBonding' parameter from
+ setupNetworks
+
+Change-Id: Id8cd878109ab5fe9d082412f6d05e1c964823779
+Signed-off-by: Igor Lvovsky <ilvovsky at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/5840
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Tested-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6209
+---
+ vdsm/configNetwork.py | 34 ++++++++--------------------------
+ 1 files changed, 8 insertions(+), 26 deletions(-)
+
+diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
+index eb140f8..d8cad5d 100755
+--- a/vdsm/configNetwork.py
++++ b/vdsm/configNetwork.py
+@@ -834,7 +834,7 @@ def editNetwork(oldBridge, newBridge, vlan=None, bonding=None, nics=None, **opti
+ configWriter.restoreAtomicBackup()
+ return define.errCode['noConPeer']['status']['code']
+
+-def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False):
++def _validateNetworkSetup(networks={}, bondings={}):
+ _netinfo = netinfo.NetInfo()
+
+ # Step 1: Initial validation (validate names, existence of params, etc.)
+@@ -897,7 +897,6 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False):
+
+
+ # Step 2: Make sure we have complete information about the Setup, more validation
+- # (if explicitBonding==False we complete the missing information ourselves, else we raise an exception)
+ nics = defaultdict(lambda: {'networks':{}, 'bonding':None})
+ for network, networkAttrs in networks.iteritems():
+ if networkAttrs.get('remove', False):
+@@ -908,10 +907,6 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False):
+
+ bonding = networkAttrs['bonding']
+ if bonding not in bondings:
+- if explicitBonding:
+- raise ConfigNetworkError(ne.ERR_BAD_PARAMS, "Network %s requires unspecified bonding %s"%(
+- network, bonding))
+-
+ # fill in bonding info
+ bondings[bonding] = {'nics':_netinfo.bondings[bonding]['slaves']}
+
+@@ -930,9 +925,6 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False):
+
+ for network in connectedNetworks:
+ if network not in networks:
+- if explicitBonding:
+- raise ConfigNetworkError(ne.ERR_BAD_PARAMS, "Bonding %s is associated with unspecified network %s"%(
+- bonding, network))
+ # fill in network info
+ _, vlan, bonding2 = _netinfo.getNicsVlanAndBondingForNetwork(network)
+ assert bonding == bonding2
+@@ -1035,7 +1027,7 @@ def setupNetworks(networks={}, bondings={}, **options):
+
+ Params:
+ networks - dict of key=network, value=attributes
+- where 'attributes' is a dict with the following optional items:
++ where 'attributes' is a dict with the following optional items:
+ vlan=<id>
+ bonding="<name>" | nic="<name>"
+ (bonding and nics are mutually exclusive)
+@@ -1050,7 +1042,7 @@ def setupNetworks(networks={}, bondings={}, **options):
+ remove=True (other attributes can't be specified)
+
+ bondings - dict of key=bonding, value=attributes
+- where 'attributes' is a dict with the following optional items:
++ where 'attributes' is a dict with the following optional items:
+ nics=["<nic1>" , "<nic2>", ...]
+ options="<bonding-options>"
+ -- OR --
+@@ -1060,20 +1052,12 @@ def setupNetworks(networks={}, bondings={}, **options):
+ force=0|1
+ connectivityCheck=0|1
+ connectivityTimeout=<int>
+- explicitBonding=0|1
+-
+
+ Notes:
+- Bondings are removed when they change state from 'used' to 'unused'.
+-
+- By default, if you edit a network that is attached to a bonding, it's not
+- necessary to re-specify the bonding (you need only to note the attachment
+- in the network's attributes). Similarly, if you edit a bonding, it's not
+- necessary to specify its networks.
+- However, if you specify the 'explicitBonding' option as true, the function
+- will expect you to specify all networks that are attached to a specified
+- bonding, and vice-versa, the bonding attached to a specified network.
+-
++ When you edit a network that is attached to a bonding, it's not
++ necessary to re-specify the bonding (you need only to note
++ the attachment in the network's attributes). Similarly, if you edit
++ a bonding, it's not necessary to specify its networks.
+ """
+ logger = logging.getLogger("setupNetworks")
+
+@@ -1095,9 +1079,7 @@ def setupNetworks(networks={}, bondings={}, **options):
+ force = options.get('force', False)
+ if not utils.tobool(force):
+ logging.debug("Validating configuration")
+- _validateNetworkSetup(dict(networks), dict(bondings),
+- explicitBonding=options.get('explicitBonding',
+- False))
++ _validateNetworkSetup(dict(networks), dict(bondings))
+
+ logger.debug("Applying...")
+ try:
+--
+1.7.7.6
+
diff --git a/0039-configNet-clear-up-atomicBackup-arg.patch b/0039-configNet-clear-up-atomicBackup-arg.patch
new file mode 100644
index 0000000..8af3bae
--- /dev/null
+++ b/0039-configNet-clear-up-atomicBackup-arg.patch
@@ -0,0 +1,41 @@
+From df7e06353bcd1c48304884384e5d8575747a3b7a Mon Sep 17 00:00:00 2001
+From: Dan Kenigsberg <danken at redhat.com>
+Date: Wed, 4 Jul 2012 17:25:55 +0300
+Subject: [PATCH 39/40] configNet: clear up atomicBackup arg
+
+Apparently, os.path.join('/a/b/', '/a/b/c') == '/a/b/c'.
+Let us not trust this peculiarity, and have atomicBackup
+expect a full path to the config file.
+
+Change-Id: Id4f4fc8dd1db785837d868a45787b3fa5be901a6
+Signed-off-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/5953
+Reviewed-by: Igor Lvovsky <ilvovsky at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6211
+---
+ vdsm/configNetwork.py | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
+index d8cad5d..dbec079 100755
+--- a/vdsm/configNetwork.py
++++ b/vdsm/configNetwork.py
+@@ -168,11 +168,11 @@ class ConfigWriter(object):
+
+ def _atomicBackup(self, filename):
+ """Backs up configuration to memory, for a later rollback in case of error."""
+- confFile = os.path.join(netinfo.NET_CONF_DIR, filename)
+- if confFile not in self._backups:
++
++ if filename not in self._backups:
+ try:
+- self._backups[confFile] = open(confFile).read()
+- logging.debug("Backed up %s" % confFile)
++ self._backups[filename] = open(filename).read()
++ logging.debug("Backed up %s", filename)
+ except IOError:
+ pass
+
+--
+1.7.7.6
+
diff --git a/0040-configNet-atomicBackup-remove-new-files-upon-restore.patch b/0040-configNet-atomicBackup-remove-new-files-upon-restore.patch
new file mode 100644
index 0000000..367e3a5
--- /dev/null
+++ b/0040-configNet-atomicBackup-remove-new-files-upon-restore.patch
@@ -0,0 +1,51 @@
+From 72580d30893de15fea9af0050e989bc6d33e3216 Mon Sep 17 00:00:00 2001
+From: Dan Kenigsberg <danken at redhat.com>
+Date: Wed, 4 Jul 2012 16:36:05 +0300
+Subject: [PATCH 40/40] configNet: atomicBackup: remove new files upon restore
+
+Files that are created by ConfigWriter._atomicBackup() should be removed
+by restoreAtomicBackup, not forgotten on disk.
+
+Change-Id: I66bdb20b6e7e78be198f2616aa0ef7a8efeec18a
+Signed-off-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/5952
+Reviewed-by: Igor Lvovsky <ilvovsky at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/6212
+---
+ vdsm/configNetwork.py | 14 ++++++++++----
+ 1 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py
+index dbec079..bb4e81e 100755
+--- a/vdsm/configNetwork.py
++++ b/vdsm/configNetwork.py
+@@ -173,16 +173,22 @@ class ConfigWriter(object):
+ try:
+ self._backups[filename] = open(filename).read()
+ logging.debug("Backed up %s", filename)
+- except IOError:
+- pass
++ except IOError, e:
++ if e.errno == os.errno.ENOENT:
++ self._backups[filename] = None
++ else:
++ raise
+
+ def restoreAtomicBackup(self):
+ logging.info("Rolling back configuration (restoring atomic backup)")
+ if not self._backups:
+ return
+ for confFile, content in self._backups.iteritems():
+- open(confFile, 'w').write(content)
+- logging.debug('Restored %s', confFile)
++ if content is None:
++ utils.rmFile(confFile)
++ else:
++ open(confFile, 'w').write(content)
++ logging.info('Restored %s', confFile)
+ subprocess.Popen(['/etc/init.d/network', 'start'])
+
+ @staticmethod
+--
+1.7.7.6
+
diff --git a/vdsm.spec b/vdsm.spec
index 31cb3c3..fcaa97c 100644
--- a/vdsm.spec
+++ b/vdsm.spec
@@ -20,7 +20,7 @@
Name: %{vdsm_name}
Version: 4.10.0
-Release: 4%{?vdsm_relvtag}%{?dist}%{?extra_release}
+Release: 5%{?vdsm_relvtag}%{?dist}%{?extra_release}
Summary: Virtual Desktop Server Manager
Group: Applications/System
@@ -61,6 +61,20 @@ Patch22: 0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch
Patch23: 0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch
Patch24: 0025-Handle-bond-properly-if-connectivity-check-fail.patch
Patch25: 0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch
+Patch26: 0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch
+Patch27: 0028-BZ-832199-move-selinux-from-init-to-spec.patch
+Patch28: 0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch
+Patch29: 0030-ovirt_functions-fix-elif-statement.patch
+Patch30: 0031-BZ-837443-removeBridge-drop-remove-interface.patch
+Patch31: 0032-BZ-837443-replace-the-netinfo-import.patch
+Patch32: 0033-configNetwork-fix-NetInfo-call.patch
+Patch33: 0034-BZ-837443-removeVlan-drop-remove-interface.patch
+Patch34: 0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch
+Patch35: 0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch
+Patch36: 0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch
+Patch37: 0038-Remove-redundant-explicitBonding-parameter-from-setu.patch
+Patch38: 0039-configNet-clear-up-atomicBackup-arg.patch
+Patch39: 0040-configNet-atomicBackup-remove-new-files-upon-restore.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -103,7 +117,8 @@ Requires: e2fsprogs >= 1.41.12-11
Requires: python >= 2.7.3
Requires: qemu-kvm >= 2:0.15.0-4
Requires: qemu-img >= 2:0.15.0-4
-Requires: libvirt >= 0.9.10
+#readonly lease ignored by default on 0.9.11.4-3
+Requires: libvirt >= 0.9.11.4-3
Requires: libvirt-python, libvirt-lock-sanlock
Requires: iscsi-initiator-utils >= 6.2.0.872-14
Requires: device-mapper-multipath >= 0.4.9-18
@@ -117,6 +132,7 @@ Requires: sos
Requires: tree
Requires: dosfstools
Requires: policycoreutils-python
+Requires(pre,preun): policycoreutils-python
Requires: libselinux-python
Requires: kernel >= 2.6.32-198
Requires: %{name}-python = %{version}-%{release}
@@ -378,6 +394,20 @@ Gluster plugin enables VDSM to serve Gluster functionalities.
%patch23 -p1 -b .patch23
%patch24 -p1 -b .patch24
%patch25 -p1 -b .patch25
+%patch26 -p1 -b .patch26
+%patch27 -p1 -b .patch27
+%patch28 -p1 -b .patch28
+%patch29 -p1 -b .patch29
+%patch30 -p1 -b .patch30
+%patch31 -p1 -b .patch31
+%patch32 -p1 -b .patch32
+%patch33 -p1 -b .patch33
+%patch34 -p1 -b .patch34
+%patch35 -p1 -b .patch35
+%patch36 -p1 -b .patch36
+%patch37 -p1 -b .patch37
+%patch38 -p1 -b .patch38
+%patch39 -p1 -b .patch39
%build
%configure %{?with_hooks:--enable-hooks}
@@ -442,6 +472,23 @@ rm -rf %{buildroot}
/usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user}
/usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user}
+# vdsm makes extensive use of nfs-exported images
+# The next lines will collect the default selinux behaviour for the booleans
+virtNFS=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_nfs | cut -d ',' -f 2)
+virtSANLOCK=$(/usr/sbin/semanage boolean -l | /bin/grep virt_use_sanlock | cut -d ',' -f 2)
+
+if [[ "${virtNFS}" == *off* || "${virtSANLOCK}" == *off* ]]; then
+ /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF
+virt_use_nfs=1
+virt_use_sanlock=1
+_EOF
+fi
+
+if /usr/sbin/selinuxenabled; then
+ /usr/sbin/setsebool virt_use_nfs on
+ /usr/sbin/setsebool virt_use_sanlock on
+fi
+
%post
# update the vdsm "secret" password for libvirt
if [ -f /etc/pki/vdsm/keys/libvirt_password ]; then
@@ -482,10 +529,12 @@ then
/usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF
virt_use_nfs=0
+virt_use_sanlock=0
_EOF
- if selinuxenabled; then
+ if /usr/sbin/selinuxenabled; then
/usr/sbin/setsebool virt_use_nfs off
+ /usr/sbin/setsebool virt_use_sanlock off
fi
/usr/sbin/saslpasswd2 -p -a libvirt -d vdsm at rhevh
@@ -919,6 +968,22 @@ exit 0
%{_datadir}/%{vdsm_name}/gluster/hostname.py*
%changelog
+* Tue Jul 17 2012 Federico Simoncelli <fsimonce at redhat.com> 4.10.0-5.fc17
+- configNet: atomicBackup: remove new files upon restore
+- configNet: clear up atomicBackup arg
+- Remove redundant 'explicitBonding' parameter from setupNetworks
+- BZ#837054 - Do not detach network from the bond during bond resize
+- BZ#836954 - Allow to break bond and create a new network on its interface in single action.
+- BZ#837443: remove bridge before add VDSM bridge
+- BZ#837443: removeVlan() drop/remove interface
+- configNetwork: fix NetInfo call
+- BZ#837443: replace the netinfo import
+- BZ#837443: removeBridge() drop/remove interface
+- ovirt_functions: fix elif statement
+- BZ#838097 _addNetworkValidation: do not explode if STP/DNS1 option passed
+- BZ#832199: move selinux from init to spec
+- bump libvirt version to fix readonly lease unsupported issue
+
* Fri Jun 29 2012 Federico Simoncelli <fsimonce at redhat.com> 4.10.0-4.fc17
- deployUtil: use os.uname instead of /bin/uname
- deployUtil: slightly saner kernel version comparison
More information about the scm-commits
mailing list