[vdsm/f20] Updating ovirt-3.3.3 patches
Yaniv Bronhaim
bronhaim at fedoraproject.org
Wed Dec 11 09:48:43 UTC 2013
commit 950391078d4e56bc431f31339e384705430bc827
Author: Yaniv Bronhaim <ybronhei at redhat.com>
Date: Wed Dec 11 11:50:08 2013 +0200
Updating ovirt-3.3.3 patches
0001-Reorder-limit-checks-in-grow-quest.patch | 42 +++++++
0002-domainMonitor-Improve-logging.patch | 55 +++++++++
...osity-from-restorecon-hack-for-var-log-co.patch | 36 ++++++
...l-expect-integer-vlan-id-from-new-netinfo.patch | 37 ++++++
...rect-parameter-for-creating-hookpath-in-v.patch | 39 +++++++
...-vdsm.spec-Remove-Obsoletes-python-cpopen.patch | 33 ++++++
0007-Allow-disable-MOM-KSM-control.patch | 53 +++++++++
...setting-just-a-single-value-in-MoM-policy.patch | 120 ++++++++++++++++++++
...ption-when-shutdown-called-on-vm-in-Down-.patch | 42 +++++++
...threadPool-Do-not-keep-reference-to-tasks.patch | 55 +++++++++
...or-Separate-change-detection-from-lastChe.patch | 84 ++++++++++++++
vdsm.spec | 37 ++++++-
12 files changed, 630 insertions(+), 3 deletions(-)
---
diff --git a/0001-Reorder-limit-checks-in-grow-quest.patch b/0001-Reorder-limit-checks-in-grow-quest.patch
new file mode 100644
index 0000000..4101479
--- /dev/null
+++ b/0001-Reorder-limit-checks-in-grow-quest.patch
@@ -0,0 +1,42 @@
+From 6791ec2bd94195c711cd719c8021692720fb02fb Mon Sep 17 00:00:00 2001
+From: Martin Sivak <msivak at redhat.com>
+Date: Tue, 26 Nov 2013 16:53:36 +0100
+Subject: [PATCH 01/11] Reorder limit checks in grow quest
+
+balloon_min is a computed value that can (and will) go over
+balloon_max. When the controller tries to use it VDSM reports
+exception.
+
+Reorder the checks so the balloon_max constant check is the latest
+one to limit the value.
+
+Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1034969
+Change-Id: I2a8d19f7fe66bb98d97718da34ec2bad6f7987f2
+Signed-off-by: Martin Sivak <msivak at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/21765
+Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Tested-by: Yaniv Bronhaim <ybronhei at redhat.com>
+---
+ vdsm/mom.d/02-balloon.policy | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/vdsm/mom.d/02-balloon.policy b/vdsm/mom.d/02-balloon.policy
+index 26c30e2..c98a231 100644
+--- a/vdsm/mom.d/02-balloon.policy
++++ b/vdsm/mom.d/02-balloon.policy
+@@ -87,10 +87,10 @@
+
+ # Determine the new target for the BalloonController. Only set
+ # if the value is a large enough for the change to be worth it.
+- (if (> balloon_size guest.balloon_max)
+- (set balloon_size guest.balloon_max) 0)
+ (if (< balloon_size balloon_min)
+ (set balloon_size balloon_min) 0)
++ (if (> balloon_size guest.balloon_max)
++ (set balloon_size guest.balloon_max) 0)
+ (if (change_big_enough guest balloon_size)
+ (guest.Control "balloon_target" balloon_size) 0)
+ } 0)
+--
+1.8.4.2
+
diff --git a/0002-domainMonitor-Improve-logging.patch b/0002-domainMonitor-Improve-logging.patch
new file mode 100644
index 0000000..7a2586b
--- /dev/null
+++ b/0002-domainMonitor-Improve-logging.patch
@@ -0,0 +1,55 @@
+From 3c5f9bb5440ca463b6af9f016178c4bcbc01b165 Mon Sep 17 00:00:00 2001
+From: Nir Soffer <nsoffer at redhat.com>
+Date: Sun, 1 Dec 2013 22:29:25 +0200
+Subject: [PATCH 02/11] domainMonitor: Improve logging
+
+We have logs in domain monitor thread, and we can see when a monitor
+starts or stops, but we don't have any info which thread triggered the
+operation. This patch adds info level log messages when starting and
+stopping domain monitoring, revealing the caller thread.
+
+Change-Id: I20feb40b097fa65ebebf851e33c051fc184ff029
+Relates-To: https://bugzilla.redhat.com/1032925
+Signed-off-by: Nir Soffer <nsoffer at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/21904
+Reviewed-by: Sergey Gotliv <sgotliv at redhat.com>
+Reviewed-by: Allon Mureinik <amureini at redhat.com>
+Reviewed-by: Ohad Basan <obasan at redhat.com>
+Reviewed-by: Ayal Baron <abaron at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/21936
+Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
+---
+ vdsm/storage/domainMonitor.py | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py
+index ffa5e00..ac01e8b 100644
+--- a/vdsm/storage/domainMonitor.py
++++ b/vdsm/storage/domainMonitor.py
+@@ -90,6 +90,7 @@ class DomainMonitor(object):
+ if sdUUID in self._domains:
+ return
+
++ self.log.info("Start monitoring %s", sdUUID)
+ domainThread = DomainMonitorThread(weakref.proxy(self),
+ sdUUID, hostId, self._interval)
+ domainThread.start()
+@@ -102,6 +103,7 @@ class DomainMonitor(object):
+ # Eg: when a domain is detached the domain monitor is stopped and
+ # the host id is released. If the monitor didn't actually exit it
+ # might respawn a new acquire host id.
++ self.log.info("Stop monitoring %s", sdUUID)
+ try:
+ self._domains[sdUUID].stop()
+ except KeyError:
+@@ -113,6 +115,7 @@ class DomainMonitor(object):
+ return self._domains[sdUUID].getStatus()
+
+ def close(self):
++ self.log.info("Stopping domain monitors")
+ for sdUUID in self._domains.keys():
+ self.stopMonitoring(sdUUID)
+
+--
+1.8.4.2
+
diff --git a/0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch b/0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch
new file mode 100644
index 0000000..ba813e0
--- /dev/null
+++ b/0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch
@@ -0,0 +1,36 @@
+From 6ffd5d7e95f9e5351c0b9881ae2a55eed1d6db48 Mon Sep 17 00:00:00 2001
+From: Mooli Tayer <mtayer at redhat.com>
+Date: Sun, 1 Dec 2013 14:43:14 +0200
+Subject: [PATCH 03/11] Remove verbosity from restorecon hack for
+ /var/log/core.
+
+vebosity spams consoel during installation.
+
+Change-Id: I862039a6dfeebe38fc5c62276ae98213ef92bd02
+Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1031109
+Signed-off-by: Mooli Tayer <mtayer at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/21888
+Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/22021
+Tested-by: Yaniv Bronhaim <ybronhei 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 00f8c70..d03703b 100644
+--- a/vdsm.spec.in
++++ b/vdsm.spec.in
+@@ -658,7 +658,7 @@ fi
+ if /usr/sbin/selinuxenabled; then
+ /usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?'
+ fi
+-/sbin/restorecon -R -v /var/log/core
++/sbin/restorecon -R /var/log/core >/dev/null 2>&1
+ # hack until we replace core dump with abrt
+
+ %if 0%{?rhel}
+--
+1.8.4.2
+
diff --git a/0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch b/0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch
new file mode 100644
index 0000000..cf27456
--- /dev/null
+++ b/0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch
@@ -0,0 +1,37 @@
+From b88d9b90d2458cab2a7ca4fc37d42439bd5774c2 Mon Sep 17 00:00:00 2001
+From: Vladimir Tananko <bs at artcon.ru>
+Date: Tue, 3 Dec 2013 10:24:23 +0000
+Subject: [PATCH 04/11] deployUtil: expect integer vlan id from new netinfo
+
+Commit 8b2bbe6e5 changed netinfo.getVlanID() to return the vlan id as an
+integer, istead of a string. This makes a lot of sense, but breaks
+compatibility with ancient deployUtil code.
+
+Change-Id: Ibc1c5875e0d13b110f61f9eabf6d1964fc4c1237
+Bug-Url: https://bugzilla.redhat.com/1037277
+Signed-off-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/21948
+Reviewed-by: Amador Pahim <apahim at redhat.com>
+Reviewed-by: Antoni Segura Puimedon <asegurap at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/21982
+Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Tested-by: Yaniv Bronhaim <ybronhei at redhat.com>
+---
+ vdsm_reg/deployUtil.py.in | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in
+index 2d379f6..ba45d64 100644
+--- a/vdsm_reg/deployUtil.py.in
++++ b/vdsm_reg/deployUtil.py.in
+@@ -1061,6 +1061,7 @@ def makeBridge(vdcName, vdsmDir, bridgeName=None):
+ else:
+ vlan, bonding, nic = _getRHELBridgeParams(mgtIface,
+ bridgeName=bridgeName)
++ vlan = str(vlan)
+ fReturn = (nic is not None)
+
+ #Delete existing bridge in oVirt
+--
+1.8.4.2
+
diff --git a/0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch b/0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch
new file mode 100644
index 0000000..1e35b3f
--- /dev/null
+++ b/0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch
@@ -0,0 +1,39 @@
+From 39b35ce25e26d0190ba0567e64751d9a55aa8aec Mon Sep 17 00:00:00 2001
+From: ndarshan <dnarayan at redhat.com>
+Date: Thu, 7 Nov 2013 15:28:55 +0530
+Subject: [PATCH 05/11] gluster: correct parameter for creating hookpath in
+ verb hookAdd.
+
+parameter hookLevel must be in lower case for creating correct
+path for hook. so that parameter is changed to lower case.
+
+Change-Id: Ic16885a7f837ccceede2cf1b70b5da3138a12a60
+Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1028972
+Signed-off-by: ndarshan <dnarayan at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/21017
+Reviewed-by: Aravinda VK <avishwan at redhat.com>
+Reviewed-by: Bala.FA <barumuga at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/21538
+Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Tested-by: Yaniv Bronhaim <ybronhei at redhat.com>
+---
+ vdsm/gluster/hooks.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vdsm/gluster/hooks.py b/vdsm/gluster/hooks.py
+index 914d09d..4f1c14d 100644
+--- a/vdsm/gluster/hooks.py
++++ b/vdsm/gluster/hooks.py
+@@ -244,7 +244,7 @@ def hookUpdate(glusterCmd, hookLevel, hookName, hookData, hookMd5Sum):
+ @makePublic
+ def hookAdd(glusterCmd, hookLevel, hookName, hookData, hookMd5Sum,
+ enable=False):
+- hookPath = os.path.join(_glusterHooksPath, glusterCmd, hookLevel)
++ hookPath = os.path.join(_glusterHooksPath, glusterCmd, hookLevel.lower())
+ try:
+ os.makedirs(hookPath)
+ if selinux.is_selinux_enabled():
+--
+1.8.4.2
+
diff --git a/0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch b/0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch
new file mode 100644
index 0000000..13d3cfb
--- /dev/null
+++ b/0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch
@@ -0,0 +1,33 @@
+From af3d4e8792175a3e0360547c44944388022f3b14 Mon Sep 17 00:00:00 2001
+From: Douglas Schilling Landgraf <dougsland at redhat.com>
+Date: Thu, 5 Dec 2013 21:03:38 -0500
+Subject: [PATCH 06/11] vdsm.spec: Remove Obsoletes: python-cpopen
+
+python-cpopen spec obsoletes vdsm-python-cpopen, so vdsm.spec don't
+need to obsolete python-cpopen. Otherwise, it will generate an
+infinity loop during the yum update between these packages.
+
+Change-Id: If5523c3530cbac667ce5c7db4f78543f21778c54
+Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/22113
+Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Tested-by: Yaniv Bronhaim <ybronhei at redhat.com>
+---
+ vdsm.spec.in | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/vdsm.spec.in b/vdsm.spec.in
+index d03703b..10fe3f2 100644
+--- a/vdsm.spec.in
++++ b/vdsm.spec.in
+@@ -313,7 +313,6 @@ Summary: Creates a sub-process in simpler safer manner.
+
+ BuildRequires: python2-devel
+ Provides: python-cpopen = 1.2.3
+-Obsoletes: python-cpopen
+
+ %description python-cpopen
+ Python package for creating sub-process in simpler and safer manner by using C
+--
+1.8.4.2
+
diff --git a/0007-Allow-disable-MOM-KSM-control.patch b/0007-Allow-disable-MOM-KSM-control.patch
new file mode 100644
index 0000000..43d46c2
--- /dev/null
+++ b/0007-Allow-disable-MOM-KSM-control.patch
@@ -0,0 +1,53 @@
+From 35019eb333d5dbe6d8c7150a5283ca196f6866df Mon Sep 17 00:00:00 2001
+From: Amador Pahim <apahim at redhat.com>
+Date: Mon, 11 Nov 2013 09:04:47 -0300
+Subject: [PATCH 07/11] Allow disable MOM KSM control.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This patch add ksmEnabled var to enable/disable mom ksm control.
+Now users can use vdsClient to runtime disable/enable
+(default enabled) ksm control:
+
+ $ vdsClient -s 0 setMOMPolicyParameters ksmEnabled=False
+
+Change-Id: Icc4333ce92561e23c062c398e24f876a74056a05
+Bug-Url: http://bugzilla.redhat.com/1025780
+Signed-off-by: Amador Pahim <apahim at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/20879
+Reviewed-by: Martin Sivák <msivak at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/22150
+Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Tested-by: Yaniv Bronhaim <ybronhei at redhat.com>
+---
+ vdsm/mom.d/01-parameters.policy | 1 +
+ vdsm/mom.d/03-ksm.policy | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/vdsm/mom.d/01-parameters.policy b/vdsm/mom.d/01-parameters.policy
+index 980e71c..97803d5 100644
+--- a/vdsm/mom.d/01-parameters.policy
++++ b/vdsm/mom.d/01-parameters.policy
+@@ -1 +1,2 @@
+ (defvar balloonEnabled 0)
++(defvar ksmEnabled 1)
+diff --git a/vdsm/mom.d/03-ksm.policy b/vdsm/mom.d/03-ksm.policy
+index 415fcfd..5a3b1bd 100644
+--- a/vdsm/mom.d/03-ksm.policy
++++ b/vdsm/mom.d/03-ksm.policy
+@@ -41,8 +41,8 @@
+ (defvar ksm_pressure_threshold (* Host.mem_available ksm_free_percent))
+ (defvar ksm_committed Host.ksm_shareable)
+
+-(if (and (< (+ ksm_pressure_threshold ksm_committed) Host.mem_available)
+- (> (Host.StatAvg "mem_free") ksm_pressure_threshold))
++(if (or (and (< (+ ksm_pressure_threshold ksm_committed) Host.mem_available)
++ (> (Host.StatAvg "mem_free") ksm_pressure_threshold)) (not ksmEnabled))
+ (Host.Control "ksm_run" 0)
+ { # else
+ (Host.Control "ksm_run" 1)
+--
+1.8.4.2
+
diff --git a/0008-Allow-setting-just-a-single-value-in-MoM-policy.patch b/0008-Allow-setting-just-a-single-value-in-MoM-policy.patch
new file mode 100644
index 0000000..03be1cc
--- /dev/null
+++ b/0008-Allow-setting-just-a-single-value-in-MoM-policy.patch
@@ -0,0 +1,120 @@
+From 4a60357831d2ef6686f8e0bfebde130f4251c52a Mon Sep 17 00:00:00 2001
+From: Martin Sivak <msivak at redhat.com>
+Date: Wed, 13 Nov 2013 14:10:31 +0100
+Subject: [PATCH 08/11] Allow setting just a single value in MoM policy
+
+This patch prevents a policy coruption that could have happened
+when the 01-parameters policy was updated with just a single
+value. If there were more values defined, the variables were lost
+and the policy ended up broken.
+
+This patch defines the variables in a file that is not touched
+by the setMOMPolicyParameters and uses (set name value) syntax
+in the generated policy part.
+
+It also remembers the old setting and puts all the values to
+the policy part when it is autogenerated.
+
+Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1025780
+
+Change-Id: I7bb1001a05e670e393b2cc0ab4b271b3b333d2e8
+Signed-off-by: Martin Sivak <msivak at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/21225
+Reviewed-by: Amador Pahim <apahim at redhat.com>
+Reviewed-by: Doron Fediuck <dfediuck at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/21839
+Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
+---
+ debian/vdsm.install | 2 +-
+ vdsm/Makefile.am | 2 +-
+ vdsm/mom.d/{00-python.policy => 00-defines.policy} | 5 +++++
+ vdsm/mom.d/01-parameters.policy | 2 --
+ vdsm/momIF.py | 9 ++++++---
+ 5 files changed, 13 insertions(+), 7 deletions(-)
+ rename vdsm/mom.d/{00-python.policy => 00-defines.policy} (58%)
+
+diff --git a/debian/vdsm.install b/debian/vdsm.install
+index 6de089e..89b6e6c 100644
+--- a/debian/vdsm.install
++++ b/debian/vdsm.install
+@@ -14,7 +14,7 @@
+ ./etc/sysctl.d/vdsm.conf
+ ./etc/vdsm/logger.conf
+ ./etc/vdsm/mom.conf
+-./etc/vdsm/mom.d/00-python.policy
++./etc/vdsm/mom.d/00-defines.policy
+ ./etc/vdsm/mom.d/01-parameters.policy
+ ./etc/vdsm/mom.d/02-balloon.policy
+ ./etc/vdsm/mom.d/03-ksm.policy
+diff --git a/vdsm/Makefile.am b/vdsm/Makefile.am
+index 26be4dc..5ab291e 100644
+--- a/vdsm/Makefile.am
++++ b/vdsm/Makefile.am
+@@ -110,7 +110,7 @@ EXTRA_DIST = \
+ logger.conf.in \
+ mk_sysprep_floppy.in \
+ mom.conf.in \
+- mom.d/00-python.policy \
++ mom.d/00-defines.policy \
+ mom.d/01-parameters.policy \
+ mom.d/02-balloon.policy \
+ mom.d/03-ksm.policy \
+diff --git a/vdsm/mom.d/00-python.policy b/vdsm/mom.d/00-defines.policy
+similarity index 58%
+rename from vdsm/mom.d/00-python.policy
+rename to vdsm/mom.d/00-defines.policy
+index face6fa..93b70ee 100644
+--- a/vdsm/mom.d/00-python.policy
++++ b/vdsm/mom.d/00-defines.policy
+@@ -2,3 +2,8 @@
+ # received by setMOMPolicyParameters
+ (defvar False 0)
+ (defvar True 1)
++
++# Define variables for configurable options here
++(defvar ksmEnabled 1)
++(defvar balloonEnabled 0)
++
+diff --git a/vdsm/mom.d/01-parameters.policy b/vdsm/mom.d/01-parameters.policy
+index 97803d5..e69de29 100644
+--- a/vdsm/mom.d/01-parameters.policy
++++ b/vdsm/mom.d/01-parameters.policy
+@@ -1,2 +0,0 @@
+-(defvar balloonEnabled 0)
+-(defvar ksmEnabled 1)
+diff --git a/vdsm/momIF.py b/vdsm/momIF.py
+index 8b62657..c1e00ef 100644
+--- a/vdsm/momIF.py
++++ b/vdsm/momIF.py
+@@ -46,6 +46,7 @@ class MomThread(threading.Thread):
+ self.log = logging.getLogger("MOM")
+ self.log.info("Starting up MOM")
+ self._mom = mom.MOM(momconf)
++ self._policy = {}
+ threading.Thread.__init__(self, target=self._mom.run, name="MOM")
+ self.start()
+
+@@ -64,14 +65,16 @@ class MomThread(threading.Thread):
+
+ def setPolicyParameters(self, key_value_store):
+ # mom.setNamedPolicy will raise an exception on failure.
++
+ # Prepare in-memory policy file with tuning variables
+ # this might need to convert certain python types to proper MoM
+ # policy language
++ self._policy.update(key_value_store)
+
+- # Python bool values are defined in 00-python.policy so need no
++ # Python bool values are defined in 00-defines.policy so need no
+ # conversion here
+- policy_string = "\n".join(["(defvar %s %r)" % (k, v)
+- for k, v in key_value_store.iteritems()])
++ policy_string = "\n".join(["(set %s %r)" % (k, v)
++ for k, v in self._policy.iteritems()])
+
+ self._mom.setNamedPolicy(config.get("mom", "tuning_policy"),
+ policy_string)
+--
+1.8.4.2
+
diff --git a/0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch b/0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch
new file mode 100644
index 0000000..d86e7cc
--- /dev/null
+++ b/0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch
@@ -0,0 +1,42 @@
+From c8aab3aa3bedfa8a92d41a8934e9adfa2a7fb89d Mon Sep 17 00:00:00 2001
+From: Greg Padgett <gpadgett at redhat.com>
+Date: Mon, 2 Dec 2013 23:04:36 -0500
+Subject: [PATCH 09/11] vm: Fix exception when shutdown() called on vm in
+ 'Down' state
+
+Attempting to call the shutdown() method on a VM which is in 'Down'
+state resulted in an exception if called through xmlrpclib. Instead,
+adopt the convention used by similar APIs such as migrate() and return
+errCode['noVM'].
+
+Change-Id: I8b75d0b869354d503e5f187e33370b5837b3c698
+Bug-Url: https://bugzilla.redhat.com/1027297
+Signed-off-by: Greg Padgett <gpadgett at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/21937
+Reviewed-by: Sandro Bonazzola <sbonazzo at redhat.com>
+Reviewed-by: Doron Fediuck <dfediuck at redhat.com>
+Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
+Reviewed-by: Michal Skrivanek <michal.skrivanek at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/22218
+Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
+---
+ vdsm/vm.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vdsm/vm.py b/vdsm/vm.py
+index b9ab60b..59541e7 100644
+--- a/vdsm/vm.py
++++ b/vdsm/vm.py
+@@ -2483,7 +2483,7 @@ class Vm(object):
+ try:
+ now = time.time()
+ if self.lastStatus == 'Down':
+- return
++ return errCode['noVM']
+ if self.guestAgent and self.guestAgent.isResponsive():
+ self._guestEventTime = now
+ self._guestEvent = 'Powering down'
+--
+1.8.4.2
+
diff --git a/0010-threadPool-Do-not-keep-reference-to-tasks.patch b/0010-threadPool-Do-not-keep-reference-to-tasks.patch
new file mode 100644
index 0000000..07c3572
--- /dev/null
+++ b/0010-threadPool-Do-not-keep-reference-to-tasks.patch
@@ -0,0 +1,55 @@
+From 9b2d7c22e806ead1c499b1da304bff6da21a5f67 Mon Sep 17 00:00:00 2001
+From: Nir Soffer <nsoffer at redhat.com>
+Date: Sun, 8 Dec 2013 00:49:36 +0200
+Subject: [PATCH 10/11] threadPool: Do not keep reference to tasks
+
+Worker thread was taking a task from the threadpool queue, run it, and
+then hold it until the next task is run. This causes the task and all
+objects referenced from it to keep living until the next task is run by
+this thread.
+
+This patch ensure that worker thread does not keep referece to tasks
+after they were run.
+
+Change-Id: Ib6e024e0727e11a4c98f4e5ede20229d148fdc58
+Relates-To: https://bugzilla.redhat.com/1032925
+Signed-off-by: Nir Soffer <nsoffer at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/22136
+Reviewed-by: Ayal Baron <abaron at redhat.com>
+Reviewed-by: Allon Mureinik <amureini at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/22208
+Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Tested-by: Yaniv Bronhaim <ybronhei at redhat.com>
+---
+ vdsm/storage/threadPool.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/vdsm/storage/threadPool.py b/vdsm/storage/threadPool.py
+index b1f3142..a0e24a2 100644
+--- a/vdsm/storage/threadPool.py
++++ b/vdsm/storage/threadPool.py
+@@ -191,8 +191,8 @@ class WorkerThread(threading.Thread):
+ it, calling the callback if any. """
+
+ while not self.__isDying:
++ id, cmd, args, callback = self.__pool.getNextTask()
+ try:
+- id, cmd, args, callback = self.__pool.getNextTask()
+ if id is None: # should retry.
+ pass
+ elif self.__isDying:
+@@ -212,6 +212,11 @@ class WorkerThread(threading.Thread):
+ self.__pool.setRunningTask(False)
+ except Exception:
+ self.log.error("Task %s failed" % repr(cmd), exc_info=True)
++ finally:
++ # Don't keep reference to objects taken from the pool.
++ # Otherwise this thread may keep those object alive until the
++ # next iteration. See BZ#1032925.
++ del id, cmd, args, callback
+
+ def goAway(self):
+
+--
+1.8.4.2
+
diff --git a/0011-domainMonitor-Separate-change-detection-from-lastChe.patch b/0011-domainMonitor-Separate-change-detection-from-lastChe.patch
new file mode 100644
index 0000000..81c0b99
--- /dev/null
+++ b/0011-domainMonitor-Separate-change-detection-from-lastChe.patch
@@ -0,0 +1,84 @@
+From b33afbee6eec61253f40df655b3c5903dafac617 Mon Sep 17 00:00:00 2001
+From: Nir Soffer <nsoffer at redhat.com>
+Date: Sat, 30 Nov 2013 14:49:08 +0200
+Subject: [PATCH 11/11] domainMonitor: Separate change detection from lastCheck
+ value
+
+Since commit 45f3037ca1e, lastCheck value is initialized to special
+NOT_CHECKED_YET value, and used for detecting the first monitor status change.
+This change caused repoStats to return high lastCheck value until the first
+monitor check is done, causing host activation to fail, and host becoming
+non-operational.
+
+Previously, lastCheck value was initialized to monitor thread creation time,
+and repoStats was returning valid lastCheck value even before the first domain
+check was finished. While somewhat incorrect, this behavior is required for
+engine monitoring logic.
+
+This patch restore the previous lastCheck semantics and use a new
+firstChange flag for detecting the first status change.
+
+Change-Id: I8e0df2ee0333354146b5d9429fd83a4f914ff751
+Relates-To: https://bugzilla.redhat.com/1003588
+Signed-off-by: Nir Soffer <nsoffer at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/21878
+Reviewed-by: Allon Mureinik <amureini at redhat.com>
+Reviewed-by: Liron Ar <laravot at redhat.com>
+Reviewed-by: Ayal Baron <abaron at redhat.com>
+Reviewed-by: Federico Simoncelli <fsimonce at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/22209
+Reviewed-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Tested-by: Yaniv Bronhaim <ybronhei at redhat.com>
+---
+ vdsm/storage/domainMonitor.py | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/vdsm/storage/domainMonitor.py b/vdsm/storage/domainMonitor.py
+index ac01e8b..d95f133 100644
+--- a/vdsm/storage/domainMonitor.py
++++ b/vdsm/storage/domainMonitor.py
+@@ -27,8 +27,6 @@ import misc
+ from vdsm.config import config
+ from sdc import sdCache
+
+-NOT_CHECKED_YET = -1
+-
+
+ class DomainMonitorStatus(object):
+ __slots__ = (
+@@ -43,7 +41,7 @@ class DomainMonitorStatus(object):
+
+ def clear(self):
+ self.error = None
+- self.lastCheck = NOT_CHECKED_YET
++ self.lastCheck = time()
+ self.valid = True
+ self.readDelay = 0
+ self.diskUtilization = (None, None)
+@@ -133,6 +131,7 @@ class DomainMonitorThread(object):
+ self.sdUUID = sdUUID
+ self.hostId = hostId
+ self.interval = interval
++ self.firstChange = True
+ self.status = DomainMonitorStatus()
+ self.nextStatus = DomainMonitorStatus()
+ self.isIsoDomain = None
+@@ -244,6 +243,8 @@ class DomainMonitorThread(object):
+ self.log.warn("Could not emit domain state change event",
+ exc_info=True)
+
++ self.firstChange = False
++
+ # An ISO domain can be shared by multiple pools
+ if (not self.isIsoDomain and self.nextStatus.valid
+ and self.nextStatus.hasHostId is False):
+@@ -257,5 +258,4 @@ class DomainMonitorThread(object):
+ self.status.update(self.nextStatus)
+
+ def _statusDidChange(self):
+- return (self.status.lastCheck == NOT_CHECKED_YET or
+- self.status.valid != self.nextStatus.valid)
++ return self.firstChange or self.status.valid != self.nextStatus.valid
+--
+1.8.4.2
+
diff --git a/vdsm.spec b/vdsm.spec
index 14ec16c..6163e00 100644
--- a/vdsm.spec
+++ b/vdsm.spec
@@ -46,7 +46,7 @@
Name: %{vdsm_name}
Version: 4.13.2
-Release: 0%{?dist}%{?extra_release}
+Release: 1%{?dist}%{?extra_release}
Summary: Virtual Desktop Server Manager
Group: Applications/System
@@ -60,6 +60,19 @@ Url: http://www.ovirt.org/wiki/Vdsm
# ./autogen.sh --system
# make VERSION={version}-{vdsm_release} dist
Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz
+# ovirt-3.3.3 patches
+Patch0: 0001-Reorder-limit-checks-in-grow-quest.patch
+Patch1: 0002-domainMonitor-Improve-logging.patch
+Patch2: 0003-Remove-verbosity-from-restorecon-hack-for-var-log-co.patch
+Patch3: 0004-deployUtil-expect-integer-vlan-id-from-new-netinfo.patch
+Patch4: 0005-gluster-correct-parameter-for-creating-hookpath-in-v.patch
+Patch5: 0006-vdsm.spec-Remove-Obsoletes-python-cpopen.patch
+Patch6: 0007-Allow-disable-MOM-KSM-control.patch
+Patch7: 0008-Allow-setting-just-a-single-value-in-MoM-policy.patch
+Patch8: 0009-vm-Fix-exception-when-shutdown-called-on-vm-in-Down-.patch
+Patch9: 0010-threadPool-Do-not-keep-reference-to-tasks.patch
+Patch10: 0011-domainMonitor-Separate-change-detection-from-lastChe.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python
@@ -326,7 +339,6 @@ Summary: Creates a sub-process in simpler safer manner.
BuildRequires: python2-devel
Provides: python-cpopen = 1.2.3
-Obsoletes: python-cpopen
%description python-cpopen
Python package for creating sub-process in simpler and safer manner by using C
@@ -559,6 +571,18 @@ Gluster plugin enables VDSM to serve Gluster functionalities.
%prep
%setup -q
+# ovirt-3.3.3 patches
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
%if 0%{?rhel} == 6
sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in
@@ -674,7 +698,7 @@ fi
if /usr/sbin/selinuxenabled; then
/usr/sbin/semanage fcontext -a -t virt_cache_t '/var/log/core(/.*)?'
fi
-/sbin/restorecon -R -v /var/log/core
+/sbin/restorecon -R /var/log/core >/dev/null 2>&1
# hack until we replace core dump with abrt
%if 0%{?rhel}
@@ -1324,6 +1348,13 @@ exit 0
%attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so*
%changelog
+* Wed Dec 11 2013 Yaniv Bronhaim <ybronhei at redhat.com> - 4.13.2-1
+- fix cpopen obsolete loop
+- fix threadPool refs
+- mom policy fixes
+- restorecon hack in spec file
+- domainMonitor fixed last check flow
+
* Tue Dec 10 2013 Yaniv Bronhaim <ybronhei at redhat.com> - 4.13.2-0
- Bumping minor version due to recent merge of ovirt-3.3 patches
More information about the scm-commits
mailing list