[vdsm/f18] update to vdsm-4.10.3-9

Federico Simoncelli fsimonce at fedoraproject.org
Thu Feb 28 10:00:59 UTC 2013


commit 9bc10fc0ca22a1c7e1dbc848eca9e26d0f03e587
Author: Federico Simoncelli <fsimonce at redhat.com>
Date:   Thu Feb 28 10:59:41 2013 +0100

    update to vdsm-4.10.3-9
    
    - packaging: add load_needed_modules.py.in
    - tool: _enable_bond_dev: reopen bonding_masters per bond

 0031-packaging-add-load_needed_modules.py.in.patch |   81 ++++++++++++++++++++
 ...e_bond_dev-reopen-bonding_masters-per-bon.patch |   38 +++++++++
 vdsm.spec                                          |   12 +++-
 3 files changed, 130 insertions(+), 1 deletions(-)
---
diff --git a/0031-packaging-add-load_needed_modules.py.in.patch b/0031-packaging-add-load_needed_modules.py.in.patch
new file mode 100644
index 0000000..25fc677
--- /dev/null
+++ b/0031-packaging-add-load_needed_modules.py.in.patch
@@ -0,0 +1,81 @@
+From 45fec93749f8474db30cb0b518ca9b2f7b80f142 Mon Sep 17 00:00:00 2001
+From: Federico Simoncelli <fsimonce at redhat.com>
+Date: Thu, 28 Feb 2013 10:44:49 +0100
+Subject: [PATCH 31/32] packaging: add load_needed_modules.py.in
+
+Signed-off-by: Federico Simoncelli <fsimonce at redhat.com>
+---
+ vdsm-tool/load_needed_modules.py.in | 61 +++++++++++++++++++++++++++++++++++++
+ 1 file changed, 61 insertions(+)
+ create mode 100644 vdsm-tool/load_needed_modules.py.in
+
+diff --git a/vdsm-tool/load_needed_modules.py.in b/vdsm-tool/load_needed_modules.py.in
+new file mode 100644
+index 0000000..675a172
+--- /dev/null
++++ b/vdsm-tool/load_needed_modules.py.in
+@@ -0,0 +1,61 @@
++# Copyright IBM, Corp. 2012
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the Free Software
++# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
++#
++# Refer to the README and COPYING files for full details of the license
++#
++
++
++import subprocess
++
++from vdsm.tool import expose
++
++
++EX_MODPROBE = '@MODPROBE_PATH@'
++
++
++def _exec_command(argv):
++    """
++    This function executes a given shell command.
++    """
++
++    p = subprocess.Popen(argv, stdout=subprocess.PIPE,
++                         stderr=subprocess.PIPE)
++    out, err = p.communicate()
++    rc = p.returncode
++    if rc != 0:
++        raise Exception("Execute command %s failed: %s" % (argv, err))
++
++
++def _enable_bond_dev():
++    REQUIRED = set(['bond0', 'bond1', 'bond2', 'bond3', 'bond4'])
++    MASTER_FILE = '/sys/class/net/bonding_masters'
++
++    # @ENGINENAME@ currently assumes that all bonding devices pre-exist
++    existing = set(file(MASTER_FILE).read().split())
++    with open(MASTER_FILE, 'w') as f:
++        for bond in REQUIRED - existing:
++            f.write('+%s\n' % bond)
++
++
++ at expose('load-needed-modules')
++def load_needed_modules():
++    """
++    Load needed modules
++    """
++
++    for mod in ['tun', 'bonding', '8021q']:
++        _exec_command([EX_MODPROBE, mod])
++    _enable_bond_dev()
+-- 
+1.8.1.2
+
diff --git a/0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch b/0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch
new file mode 100644
index 0000000..b73ce8b
--- /dev/null
+++ b/0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch
@@ -0,0 +1,38 @@
+From 8cca94da272babb5eef7a81a7a05d178070efe69 Mon Sep 17 00:00:00 2001
+From: Dan Kenigsberg <danken at redhat.com>
+Date: Mon, 25 Feb 2013 16:06:56 +0200
+Subject: [PATCH 32/32] tool: _enable_bond_dev: reopen bonding_masters per bond
+
+Writing multiple +bondnames into /sys/class/net/bonding_masters is not
+enough to add new bonding devices. One has to reopen that file for each
+added bond.
+
+Change-Id: I4693a3d2cc3beba0b5961d16fb1ef25170f99f9e
+Signed-off-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/12409
+Reviewed-by: Antoni Segura Puimedon <asegurap at redhat.com>
+Tested-by: gena cher <genadic at gmail.com>
+Reviewed-on: http://gerrit.ovirt.org/12447
+Reviewed-by: Igor Lvovsky <ilvovsky at redhat.com>
+---
+ vdsm-tool/load_needed_modules.py.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/vdsm-tool/load_needed_modules.py.in b/vdsm-tool/load_needed_modules.py.in
+index 675a172..89c2b3f 100644
+--- a/vdsm-tool/load_needed_modules.py.in
++++ b/vdsm-tool/load_needed_modules.py.in
+@@ -45,8 +45,8 @@ def _enable_bond_dev():
+ 
+     # @ENGINENAME@ currently assumes that all bonding devices pre-exist
+     existing = set(file(MASTER_FILE).read().split())
+-    with open(MASTER_FILE, 'w') as f:
+-        for bond in REQUIRED - existing:
++    for bond in REQUIRED - existing:
++        with open(MASTER_FILE, 'w') as f:
+             f.write('+%s\n' % bond)
+ 
+ 
+-- 
+1.8.1.2
+
diff --git a/vdsm.spec b/vdsm.spec
index c696938..99f36c1 100644
--- a/vdsm.spec
+++ b/vdsm.spec
@@ -32,7 +32,7 @@
 
 Name:           %{vdsm_name}
 Version:        4.10.3
-Release:        8%{?vdsm_relvtag}%{?dist}%{?extra_release}
+Release:        9%{?vdsm_relvtag}%{?dist}%{?extra_release}
 Summary:        Virtual Desktop Server Manager
 
 Group:          Applications/System
@@ -78,6 +78,10 @@ Patch26:        0027-removing-the-use-of-zombie-reaper-from-supervdsm.patch
 Patch27:        0028-configNet-allow-delete-update-of-devices-with-no-ifc.patch
 Patch28:        0029-Requires-policycoreutils-2.1.13-55-to-avoid-another-.patch
 Patch29:        0030-After-fail-to-connect-to-supervdsm-more-than-3-time-.patch
+# This patch is not present in the upstream ovirt-3.2 branch and it was added to
+# add a missing file in the base vdsm tar.gz
+Patch30:        0031-packaging-add-load_needed_modules.py.in.patch
+Patch31:        0032-tool-_enable_bond_dev-reopen-bonding_masters-per-bon.patch
 
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -491,6 +495,8 @@ Gluster plugin enables VDSM to serve Gluster functionalities.
 %patch27 -p1 -b .patch27
 %patch28 -p1 -b .patch28
 %patch29 -p1 -b .patch29
+%patch30 -p1 -b .patch30
+%patch31 -p1 -b .patch31
 
 %if 0%{?rhel} == 6
 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in
@@ -1081,6 +1087,10 @@ exit 0
 %{_datadir}/%{vdsm_name}/gluster/hostname.py*
 
 %changelog
+* Wed Feb 27 2013 Federico Simoncelli <fsimonce at redhat.com> 4.10.3-9
+- packaging: add load_needed_modules.py.in
+- tool: _enable_bond_dev: reopen bonding_masters per bond
+
 * Tue Feb 19 2013 Federico Simoncelli <fsimonce at redhat.com> 4.10.3-8
 - configNet: allow delete/update of devices with no ifcfg (#906383)
 - Requires policycoreutils-2.1.13-55 to avoid another


More information about the scm-commits mailing list