[vdsm/f20] Revert "Adding patch for 4.14.1-4"

Douglas Schilling Landgraf dougsland at fedoraproject.org
Mon Feb 10 15:52:30 UTC 2014


commit a5a773059abf61a04a716f319849c2000915eba8
Author: Douglas Schilling Landgraf <dougsland at redhat.com>
Date:   Mon Feb 10 10:52:08 2014 -0500

    Revert "Adding patch for 4.14.1-4"
    
    This reverts commit b8088f84b249c80147cb3ce5ebfe89a95ec1308d.

 0001-Adding-configure-sanlock-on-force.patch       |   42 ---
 0001-Using-old-form-of-zombiereaper.patch          |   45 +++
 0002-Revert-Using-old-form-of-zombiereaper.patch   |   47 +++
 ...Revert-utils-Create-AsyncProcessOperation.patch |  164 ++++++++++
 0004-Revert-iscsi-Iscsi-rescan-cleanup.patch       |  316 ++++++++++++++++++++
 ...-conflict-when-python-cpopen-is-installed.patch |   35 +++
 ...-spec-replace-requires-vdsm-python-cpopen.patch |   45 +++
 vdsm.spec                                          |  298 +++++-------------
 8 files changed, 735 insertions(+), 257 deletions(-)
---
diff --git a/0001-Using-old-form-of-zombiereaper.patch b/0001-Using-old-form-of-zombiereaper.patch
new file mode 100644
index 0000000..1615ae5
--- /dev/null
+++ b/0001-Using-old-form-of-zombiereaper.patch
@@ -0,0 +1,45 @@
+From d1bb20a892d32822e8f04488fb12df0ffea76a04 Mon Sep 17 00:00:00 2001
+From: Yaniv Bronhaim <ybronhei at redhat.com>
+Date: Mon, 13 Jan 2014 14:55:35 +0200
+Subject: [PATCH 1/4] Using old form of zombiereaper
+
+In ovirt-3.3 we don't include the change [1] that modifies zombieReaper
+to zombiereaper.
+
+The import in utils.py cause an import error without having [1].
+
+[1] http://gerrit.ovirt.org/#/c/19253/
+
+Change-Id: I7483e09df69d07b8396e075726dd14efb42a5551
+Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/23215
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+---
+ lib/vdsm/utils.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py
+index 5a2f746..0d3ec91 100644
+--- a/lib/vdsm/utils.py
++++ b/lib/vdsm/utils.py
+@@ -48,7 +48,7 @@ import stat
+ import subprocess
+ import threading
+ import time
+-import zombiereaper
++import zombieReaper
+ 
+ from cpopen import CPopen as BetterPopen
+ from config import config
+@@ -983,7 +983,7 @@ class AsyncProcessOperation(object):
+ 
+     def __del__(self):
+         if self._proc.returncode is None:
+-            zombiereaper.autoReapPID(self._proc.pid)
++            zombieReaper.autoReapPID(self._proc.pid)
+ 
+ 
+ def panic(msg):
+-- 
+1.8.4.2
+
diff --git a/0002-Revert-Using-old-form-of-zombiereaper.patch b/0002-Revert-Using-old-form-of-zombiereaper.patch
new file mode 100644
index 0000000..e8de0ea
--- /dev/null
+++ b/0002-Revert-Using-old-form-of-zombiereaper.patch
@@ -0,0 +1,47 @@
+From d3c7870167cdab24be231756f0753a83728fcf32 Mon Sep 17 00:00:00 2001
+From: Yaniv Bronhaim <ybronhei at redhat.com>
+Date: Mon, 13 Jan 2014 17:44:05 +0200
+Subject: [PATCH 2/4] Revert "Using old form of zombiereaper"
+
+This reverts commit d1bb20a892d32822e8f04488fb12df0ffea76a04.
+
+This patch didn't resolve the problem, it just fixed the build errors.
+Still the import is invalid as zombieReaper located under
+/usr/share/vdsm and utils.py runs for site-packages and cannot locate
+it. This revert comes aside to backport of
+http://gerrit.ovirt.org/#/c/23213/ that arrange the issue.
+
+Change-Id: If6a970cdd17c9dbf5544f68e406e6667344df900
+Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/23228
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Tested-by: Dan Kenigsberg <danken at redhat.com>
+---
+ lib/vdsm/utils.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py
+index 0d3ec91..5a2f746 100644
+--- a/lib/vdsm/utils.py
++++ b/lib/vdsm/utils.py
+@@ -48,7 +48,7 @@ import stat
+ import subprocess
+ import threading
+ import time
+-import zombieReaper
++import zombiereaper
+ 
+ from cpopen import CPopen as BetterPopen
+ from config import config
+@@ -983,7 +983,7 @@ class AsyncProcessOperation(object):
+ 
+     def __del__(self):
+         if self._proc.returncode is None:
+-            zombieReaper.autoReapPID(self._proc.pid)
++            zombiereaper.autoReapPID(self._proc.pid)
+ 
+ 
+ def panic(msg):
+-- 
+1.8.4.2
+
diff --git a/0003-Revert-utils-Create-AsyncProcessOperation.patch b/0003-Revert-utils-Create-AsyncProcessOperation.patch
new file mode 100644
index 0000000..a7332a0
--- /dev/null
+++ b/0003-Revert-utils-Create-AsyncProcessOperation.patch
@@ -0,0 +1,164 @@
+From c0239063a8ecc595beff62d6e6f3795146771a45 Mon Sep 17 00:00:00 2001
+From: Yaniv Bronhaim <ybronhei at redhat.com>
+Date: Mon, 13 Jan 2014 18:45:36 +0200
+Subject: [PATCH 3/4] Revert "utils: Create AsyncProcessOperation"
+
+This reverts commit ed426e5590df421bace0aef9fc802baf2a24a5f2.
+
+Change-Id: I4a4d42db21d4541d955af415898d9cdedd83275b
+Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/23234
+---
+ lib/vdsm/utils.py   | 50 ------------------------------------------
+ tests/utilsTests.py | 63 -----------------------------------------------------
+ 2 files changed, 113 deletions(-)
+
+diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py
+index 5a2f746..ef0f512 100644
+--- a/lib/vdsm/utils.py
++++ b/lib/vdsm/utils.py
+@@ -48,7 +48,6 @@ import stat
+ import subprocess
+ import threading
+ import time
+-import zombiereaper
+ 
+ from cpopen import CPopen as BetterPopen
+ from config import config
+@@ -937,55 +936,6 @@ def retry(func, expectedException=Exception, tries=None,
+             time.sleep(sleep)
+ 
+ 
+-class AsyncProcessOperation(object):
+-    def __init__(self, proc, resultParser=None):
+-        """Wraps a running process operation.
+-
+-        resultParser should be of type callback(rc, out, err) and can return
+-        anything or throw exceptions."""
+-        self._lock = threading.Lock()
+-
+-        self._result = None
+-        self._resultParser = resultParser
+-
+-        self._proc = proc
+-
+-    def wait(self, timeout=None, cond=None):
+-        """Waits until the process has exited, the timeout has been reached or
+-        the condition has been met"""
+-        return self._proc.wait(timeout, cond)
+-
+-    def stop(self):
+-        """Stops the running operation, effectively sending a kill signal to
+-        the process"""
+-        self._proc.kill()
+-
+-    def result(self):
+-        """Returns the result in the as a tuple of (result, error).
+-        If the operation is still running it will block until it returns.
+-
+-        If no resultParser has been set the default result
+-        is (rc, out, err) """
+-        with self._lock:
+-            if self._result is None:
+-                out, err = self._proc.communicate()
+-                rc = self._proc.returncode
+-                if self._resultParser is not None:
+-                    try:
+-                        self._result = (self._resultParser(rc, out, err),
+-                                        None)
+-                    except Exception as e:
+-                        self._result = (None, e)
+-                else:
+-                    self._result = ((rc, out, err), None)
+-
+-            return self._result
+-
+-    def __del__(self):
+-        if self._proc.returncode is None:
+-            zombiereaper.autoReapPID(self._proc.pid)
+-
+-
+ def panic(msg):
+     logging.error("Panic: %s", msg, exc_info=True)
+     os.killpg(0, 9)
+diff --git a/tests/utilsTests.py b/tests/utilsTests.py
+index 4dc6579..5f7c82d 100644
+--- a/tests/utilsTests.py
++++ b/tests/utilsTests.py
+@@ -24,7 +24,6 @@ import logging
+ from testrunner import VdsmTestCase as TestCaseBase
+ from vdsm import utils
+ from storage import misc
+-import time
+ 
+ 
+ class RetryTests(TestCaseBase):
+@@ -141,65 +140,3 @@ class TracebackTests(TestCaseBase):
+     def handle(self, record):
+         assert self.record is None
+         self.record = record
+-
+-
+-class AsyncProcessOperationTests(TestCaseBase):
+-    def _echo(self, text):
+-        proc = misc.execCmd(["echo", "-n", "test"], sync=False)
+-
+-        def parse(rc, out, err):
+-            return out
+-
+-        return utils.AsyncProcessOperation(proc, parse)
+-
+-    def _sleep(self, t):
+-        proc = misc.execCmd(["sleep", str(t)], sync=False)
+-        return utils.AsyncProcessOperation(proc)
+-
+-    def _fail(self, t):
+-        proc = misc.execCmd(["sleep", str(t)], sync=False)
+-
+-        def parse(rc, out, err):
+-            raise Exception("TEST!!!")
+-
+-        return utils.AsyncProcessOperation(proc, parse)
+-
+-    def test(self):
+-        aop = self._sleep(1)
+-        self.assertEquals(aop.result(), ((0, "", ""), None))
+-
+-    def testAlreadyExitedSuccess(self):
+-        aop = self._sleep(0)
+-        time.sleep(1)
+-        self.assertEquals(aop.result(), ((0, "", ""), None))
+-
+-    def testAlreadyExitedFail(self):
+-        aop = self._sleep("hello")
+-        time.sleep(1)
+-        ((rc, out, err), err) = aop.result()
+-        self.assertEquals(err, None)
+-        self.assertEquals(rc, 1)
+-
+-    def testWait(self):
+-        aop = self._sleep(1)
+-        aop.wait(timeout=2)
+-
+-    def testParser(self):
+-        aop = self._echo("test")
+-        self.assertEquals(aop.result(), ("test", None))
+-
+-    def testStop(self):
+-        aop = self._sleep(10)
+-        aop.stop()
+-
+-        start = time.time()
+-        aop.result()
+-        end = time.time()
+-        duration = end - start
+-        self.assertTrue(duration < 2)
+-
+-    def testException(self):
+-        aop = self._fail(1)
+-        res, err = aop.result()
+-        self.assertEquals(res, None)
+-        self.assertNotEquals(err, None)
+-- 
+1.8.4.2
+
diff --git a/0004-Revert-iscsi-Iscsi-rescan-cleanup.patch b/0004-Revert-iscsi-Iscsi-rescan-cleanup.patch
new file mode 100644
index 0000000..178891a
--- /dev/null
+++ b/0004-Revert-iscsi-Iscsi-rescan-cleanup.patch
@@ -0,0 +1,316 @@
+From fb564a48f76a38575df56df5dde2e3cf00f586e6 Mon Sep 17 00:00:00 2001
+From: Yaniv Bronhaim <ybronhei at redhat.com>
+Date: Mon, 13 Jan 2014 18:45:24 +0200
+Subject: [PATCH 4/4] Revert "iscsi: Iscsi rescan cleanup"
+
+This reverts commit 9df615a98ef98a3111f691c0f1dd47a979b48032.
+
+Change-Id: Ie28d733ac86d0b7379bbe406bfcdc7779bc0402a
+Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/23233
+---
+ tests/Makefile.am         |  1 -
+ tests/iscsiTests.py       | 80 -----------------------------------------------
+ vdsm.spec.in              |  2 +-
+ vdsm/storage/iscsi.py     | 59 +++++++++++++++++++++++++++-------
+ vdsm/storage/iscsiadm.py  | 24 +++++---------
+ vdsm/storage/multipath.py |  2 ++
+ vdsm/supervdsmServer      |  5 +++
+ 7 files changed, 62 insertions(+), 111 deletions(-)
+ delete mode 100644 tests/iscsiTests.py
+
+diff --git a/tests/Makefile.am b/tests/Makefile.am
+index 5efae38..f87eddd 100644
+--- a/tests/Makefile.am
++++ b/tests/Makefile.am
+@@ -37,7 +37,6 @@ test_modules = \
+ 	guestIFTests.py \
+ 	hooksTests.py \
+ 	ipwrapperTests.py \
+-	iscsiTests.py \
+ 	jsonRpcTests.py \
+ 	jsonRpcUtils.py \
+ 	libvirtconnectionTests.py \
+diff --git a/tests/iscsiTests.py b/tests/iscsiTests.py
+deleted file mode 100644
+index 44f6962..0000000
+--- a/tests/iscsiTests.py
++++ /dev/null
+@@ -1,80 +0,0 @@
+-import threading
+-import time
+-from contextlib import contextmanager
+-
+-from testrunner import VdsmTestCase as TestCaseBase
+-
+-from storage import iscsi
+-
+-
+-class AsyncStubOperation(object):
+-    def __init__(self, timeout):
+-        self._evt = threading.Event()
+-        if timeout == 0:
+-            self._evt.set()
+-        else:
+-            threading.Timer(timeout, self._evt.set)
+-
+-    def wait(self, timeout=None, cond=None):
+-        if cond is not None:
+-            raise Exception("TODO!!!")
+-
+-        self._evt.wait(timeout)
+-
+-    def stop(self):
+-        self._evt.set()
+-
+-    def result(self):
+-        if self._evt.is_set():
+-            return (None, None)
+-        else:
+-            return None
+-
+-
+-class RescanTimeoutTests(TestCaseBase):
+-    def setUp(self):
+-        self._iscsiadm_rescan_async = \
+-            iscsi.iscsiadm.session_rescan_async
+-        iscsi.iscsiadm.session_rescan_async = self._iscsi_stub
+-        self._timeout = 0
+-
+-    def tearDown(self):
+-        iscsi.iscsiadm.session_rescan_async = \
+-            self._iscsiadm_rescan_async
+-
+-    def _iscsi_stub(self):
+-        return AsyncStubOperation(self._timeout)
+-
+-    @contextmanager
+-    def assertMaxDuration(self, maxtime):
+-        start = time.time()
+-        try:
+-            yield
+-        finally:
+-            end = time.time()
+-            elapsed = end - start
+-            if maxtime < elapsed:
+-                self.fail("Operation was too slow %fs > %fs" %
+-                          (elapsed, maxtime))
+-
+-    @contextmanager
+-    def assertMinDuration(self, mintime):
+-        start = time.time()
+-        try:
+-            yield
+-        finally:
+-            end = time.time()
+-            elapsed = end - start
+-            if mintime > elapsed:
+-                self.fail("Operation was too fast %fs > %fs" %
+-                          (elapsed, mintime))
+-
+-    def testFast(self):
+-        self._timeout = 0
+-        with self.assertMinDuration(2):
+-            iscsi.rescan(2, 4)
+-
+-    def testSlow(self):
+-        self._timeout = 60
+-        with self.assertMaxDuration(3):
+-            iscsi.rescan(1, 2)
+diff --git a/vdsm.spec.in b/vdsm.spec.in
+index 8d3ba09..9aeb607 100644
+--- a/vdsm.spec.in
++++ b/vdsm.spec.in
+@@ -146,7 +146,7 @@ Requires: python
+ # Update the qemu-kvm requires when block_stream will be included
+ Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4
+ Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4
+-Requires: iscsi-initiator-utils >= 6.2.0.873-3
++Requires: iscsi-initiator-utils >= 6.2.0.872-15
+ Requires: device-mapper-multipath >= 0.4.9-52
+ Requires: e2fsprogs >= 1.41.12-11
+ Requires: fence-agents
+diff --git a/vdsm/storage/iscsi.py b/vdsm/storage/iscsi.py
+index f4fdceb..7da94ab 100644
+--- a/vdsm/storage/iscsi.py
++++ b/vdsm/storage/iscsi.py
+@@ -30,6 +30,7 @@ import errno
+ import time
+ from collections import namedtuple
+ 
++from vdsm import constants
+ import misc
+ from vdsm.config import config
+ import devicemapper
+@@ -372,15 +373,38 @@ def iterateIscsiInterfaces():
+ 
+ 
+ @misc.samplingmethod
+-def rescan(minTimeout=None, maxTimeout=None):
+-    # FIXME: This whole thing is wrong from the core. We need to make rescan
+-    #        completely async and have methods timeout on their own if they
+-    #        can't find the devices they are looking for
+-    if minTimeout is None:
+-        minTimeout = config.getint('irs', 'scsi_rescan_minimal_timeout')
+-    if maxTimeout is None:
+-        maxTimeout = config.getint('irs', 'scsi_rescan_maximal_timeout')
++def rescan():
++    try:
++        iscsiadm.session_rescan()
++    except iscsiadm.IscsiError:
++        pass
++
+ 
++ at misc.samplingmethod
++def forceScsiScan():
++    processes = []
++    minTimeout = config.getint('irs', 'scsi_rescan_minimal_timeout')
++    maxTimeout = config.getint('irs', 'scsi_rescan_maximal_timeout')
++    for hba in glob.glob(SCAN_PATTERN):
++        cmd = [constants.EXT_DD, 'of=' + hba]
++        p = misc.execCmd(cmd, sudo=False, sync=False)
++        try:
++            p.stdin.write("- - -")
++            p.stdin.flush()
++            p.stdin.close()
++        except OSError as e:
++            if p.wait(0) is False:
++                log.error("pid %s still running", p.pid)
++            log.warning("Error in rescan of hba:%s with returncode:%s and "
++                        "error message: %s", hba, p.returncode,
++                        p.stderr.read(1000))
++            if e.errno != errno.EPIPE:
++                raise
++            else:
++                log.warning("Ignoring error in rescan of hba %s: ",
++                            hba, exc_info=True)
++                continue
++        processes.append((hba, p))
+     if (minTimeout > maxTimeout or minTimeout < 0):
+         minTimeout = 2
+         maxTimeout = 30
+@@ -388,13 +412,24 @@ def rescan(minTimeout=None, maxTimeout=None):
+                     "illegal value: scsi_rescan_minimal_timeout or "
+                     "scsi_rescan_maximal_timeout. Set to %s and %s seconds "
+                     "respectively.", minTimeout, maxTimeout)
+-
+     log.debug("Performing SCSI scan, this will take up to %s seconds",
+               maxTimeout)
+-
+-    rescanOp = iscsiadm.session_rescan_async()
+     time.sleep(minTimeout)
+-    rescanOp.wait(timeout=(maxTimeout - minTimeout))
++    for i in xrange(maxTimeout - minTimeout):
++        for p in processes[:]:
++            (hba, proc) = p
++            if proc.wait(0):
++                if proc.returncode != 0:
++                    log.warning('returncode for: %s is: %s', hba,
++                                proc.returncode)
++                processes.remove(p)
++        if not processes:
++            break
++        else:
++            time.sleep(1)
++    else:
++        log.warning("Still waiting for scsi scan of hbas: %s",
++                    tuple(hba for p in processes))
+ 
+ 
+ def devIsiSCSI(dev):
+diff --git a/vdsm/storage/iscsiadm.py b/vdsm/storage/iscsiadm.py
+index 9bb27ea..cd28db8 100644
+--- a/vdsm/storage/iscsiadm.py
++++ b/vdsm/storage/iscsiadm.py
+@@ -1,7 +1,6 @@
+ from threading import Lock
+ import misc
+ from vdsm import constants
+-from vdsm.utils import AsyncProcessOperation
+ 
+ # iscsiadm exit statuses
+ ISCSI_ERR_SESS_EXISTS = 15
+@@ -72,7 +71,7 @@ _RESERVED_INTERFACES = ("default", "tcp", "iser")
+ _iscsiadmLock = Lock()
+ 
+ 
+-def _runCmd(args, hideValue=False, sync=True):
++def _runCmd(args, hideValue=False):
+     # FIXME: I don't use supervdsm because this entire module has to just be
+     # run as root and there is no such feature yet in supervdsm. When such
+     # feature exists please change this.
+@@ -89,7 +88,7 @@ def _runCmd(args, hideValue=False, sync=True):
+                 if i < (len(printCmd) - 1):
+                     printCmd[i + 1] = "****"
+ 
+-        return misc.execCmd(cmd, printable=printCmd, sudo=True, sync=sync)
++        return misc.execCmd(cmd, printable=printCmd, sudo=True)
+ 
+ 
+ def iface_exists(interfaceName):
+@@ -295,21 +294,12 @@ def node_login(iface, portal, targetName):
+     raise IscsiNodeError(rc, out, err)
+ 
+ 
+-def session_rescan_async():
+-    proc = _runCmd(["-m", "session", "-R"], sync=False)
+-
+-    def parse_result(rc, out, err):
+-        if rc == 0:
+-            return
+-
+-        raise IscsiSessionError(rc, out, err)
+-
+-    return AsyncProcessOperation(proc, parse_result)
+-
+-
+ def session_rescan():
+-    aop = session_rescan_async()
+-    return aop.result()
++    rc, out, err = _runCmd(["-m", "session", "-R"])
++    if rc == 0:
++        return
++
++    raise IscsiSessionError(rc, out, err)
+ 
+ 
+ def session_logout(sessionId):
+diff --git a/vdsm/storage/multipath.py b/vdsm/storage/multipath.py
+index 29851f3..1f9773c 100644
+--- a/vdsm/storage/multipath.py
++++ b/vdsm/storage/multipath.py
+@@ -105,6 +105,8 @@ def rescan():
+     # First ask iSCSI to rescan all its sessions
+     iscsi.rescan()
+ 
++    supervdsm.getProxy().forceScsiScan()
++
+     # Now let multipath daemon pick up new devices
+     cmd = [constants.EXT_MULTIPATH, "-r"]
+     misc.execCmd(cmd, sudo=True)
+diff --git a/vdsm/supervdsmServer b/vdsm/supervdsmServer
+index 6ad3875..7fa1c2b 100755
+--- a/vdsm/supervdsmServer
++++ b/vdsm/supervdsmServer
+@@ -56,6 +56,7 @@ from md_utils import getMdDeviceUuidMap as _getMdDeviceUuidMap
+ 
+ from lsblk import getLsBlk as _getLsBlk
+ from storage.multipath import getScsiSerial as _getScsiSerial
++from storage.iscsi import forceScsiScan as _forceScsiScan
+ from storage.iscsi import getDevIscsiInfo as _getdeviSCSIinfo
+ from storage.iscsi import readSessionInfo as _readSessionInfo
+ from supervdsm import _SuperVdsmManager
+@@ -148,6 +149,10 @@ class _SuperVdsm(object):
+         return _getScsiSerial(*args, **kwargs)
+ 
+     @logDecorator
++    def forceScsiScan(self, *args, **kwargs):
++        return _forceScsiScan(*args, **kwargs)
++
++    @logDecorator
+     def removeDeviceMapping(self, devName):
+         return _removeMapping(devName)
+ 
+-- 
+1.8.4.2
+
diff --git a/0005-Report-conflict-when-python-cpopen-is-installed.patch b/0005-Report-conflict-when-python-cpopen-is-installed.patch
new file mode 100644
index 0000000..4b64281
--- /dev/null
+++ b/0005-Report-conflict-when-python-cpopen-is-installed.patch
@@ -0,0 +1,35 @@
+From a71e5a959f0e14565e55dc3b126f0be7530e4c66 Mon Sep 17 00:00:00 2001
+From: Yaniv Bronhaim <ybronhei at redhat.com>
+Date: Thu, 23 Jan 2014 15:38:22 +0200
+Subject: [PATCH] Report conflict when python-cpopen is installed
+
+vdsm-python-cpopen-4.13.2 cannot be installed in parallel to
+python-cpopen, because the latter the user should manually take care of
+removing python-cpopen if installed.
+This patch adds a conflict report when this scenario occurs.
+
+Change-Id: I0bcdf60a696e9b203555c83bda2c7053db5c6bfe
+Signed-off-by: Yaniv Bronhaim <ybronhei at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/23632
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+Reviewed-by: Douglas Schilling Landgraf <dougsland at redhat.com>
+---
+ vdsm.spec.in |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/vdsm.spec.in b/vdsm.spec.in
+index bec4213..c8bbf8d 100644
+--- a/vdsm.spec.in
++++ b/vdsm.spec.in
+@@ -312,7 +312,7 @@ Manager.
+ Summary: Creates a sub-process in simpler safer manner.
+ 
+ BuildRequires: python2-devel
+-Provides: python-cpopen = 1.2.3
++Conflicts: python-cpopen
+ 
+ %description python-cpopen
+ Python package for creating sub-process in simpler and safer manner by using C
+-- 
+1.7.1
+
diff --git a/0006-spec-replace-requires-vdsm-python-cpopen.patch b/0006-spec-replace-requires-vdsm-python-cpopen.patch
new file mode 100644
index 0000000..6dbfc0f
--- /dev/null
+++ b/0006-spec-replace-requires-vdsm-python-cpopen.patch
@@ -0,0 +1,45 @@
+From 2d7e622fbcc9ddf4f4f828f81d9464d1bce544f7 Mon Sep 17 00:00:00 2001
+From: Douglas Schilling Landgraf <dougsland at redhat.com>
+Date: Fri, 31 Jan 2014 16:08:13 -0500
+Subject: [PATCH 1/3] spec: replace requires vdsm-python-cpopen
+
+Due dependency problems and yum bug [1] we are
+obsoleting vdsm-python-cpopen with python-cpopen to
+avoid installation problem with VDSM.
+
+[1] http://yum.baseurl.org/gitweb?p=yum.git;a=commitdiff;h=1bbf40af8548d2d3fb9deea8844770fccd67a384
+
+Change-Id: Iee2c64d489745db5d0e4a8491d7d8b16dfb1d21b
+Signed-off-by: Douglas Schilling Landgraf <dougsland at redhat.com>
+Reviewed-on: http://gerrit.ovirt.org/23942
+Reviewed-by: Sandro Bonazzola <sbonazzo at redhat.com>
+Reviewed-by: Dan Kenigsberg <danken at redhat.com>
+---
+ vdsm.spec.in |    4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/vdsm.spec.in b/vdsm.spec.in
+index a1fa38c..1435e0a 100644
+--- a/vdsm.spec.in
++++ b/vdsm.spec.in
+@@ -242,7 +242,7 @@ BuildArch:      noarch
+ 
+ Requires: %{name}-python = %{version}-%{release}
+ Requires: %{name}-xmlrpc = %{version}-%{release}
+-Requires: %{name}-python-cpopen
++Requires: python-cpopen
+ 
+ %description cli
+ Call VDSM commands from the command line. Used for testing and debugging.
+@@ -252,7 +252,7 @@ Summary:        VDSM xmlrpc API
+ BuildArch:      noarch
+ 
+ Requires: %{name}-python = %{version}-%{release}
+-Requires: %{name}-python-cpopen
++Requires: python-cpopen
+ 
+ 
+ %description xmlrpc
+-- 
+1.7.1
+
diff --git a/vdsm.spec b/vdsm.spec
index 91bd2db..a10cad2 100644
--- a/vdsm.spec
+++ b/vdsm.spec
@@ -35,10 +35,6 @@
 %global with_gluster 1
 %endif
 
-%if ! 0%{?rhel}
-%global with_vhostmd 1
-%endif
-
 %if 0%{?fedora} >= 15 || 0%{?rhel} >= 7
 %global with_systemd 1
 %endif
@@ -49,8 +45,8 @@
 %endif
 
 Name:           %{vdsm_name}
-Version:        4.14.1
-Release:        4%{?dist}%{?extra_release}
+Version:        4.13.3
+Release:        3%{?dist}%{?extra_release}
 Summary:        Virtual Desktop Server Manager
 
 Group:          Applications/System
@@ -64,26 +60,24 @@ 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.4 patches
-Patch0:         0001-Adding-configure-sanlock-on-force.patch
+# ovirt-3.3.3 patches
+Patch0:         0001-Using-old-form-of-zombiereaper.patch
+Patch1:         0002-Revert-Using-old-form-of-zombiereaper.patch
+Patch2:         0003-Revert-utils-Create-AsyncProcessOperation.patch
+Patch3:         0004-Revert-iscsi-Iscsi-rescan-cleanup.patch
+Patch4:         0005-Report-conflict-when-python-cpopen-is-installed.patch
+Patch5:         0006-spec-replace-requires-vdsm-python-cpopen.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
-BuildRequires: gcc
 BuildRequires: python
 BuildRequires: python-devel
 BuildRequires: python-nose
 BuildRequires: python-netaddr
-BuildRequires: rpm-build
 
 # BuildRequires needed by the tests during the build
-BuildRequires: dosfstools
-BuildRequires: psmisc
 BuildRequires: python-ethtool
-BuildRequires: python-inotify
 BuildRequires: python-pthreading
-BuildRequires: python-cpopen >= 1.3
-BuildRequires: libnl
 BuildRequires: libselinux-python
 BuildRequires: libvirt-python
 BuildRequires: genisoimage
@@ -93,7 +87,6 @@ BuildRequires: m2crypto
 BuildRequires: python-dmidecode
 %endif
 %if 0%{?rhel} == 6
-BuildRequires: python-argparse
 BuildRequires: python-ordereddict
 %endif
 BuildRequires: python-ethtool
@@ -115,7 +108,6 @@ BuildRequires: python-pep8
 BuildRequires: systemd-units
 %endif
 
-Requires: ethtool
 Requires: which
 Requires: sudo >= 1.7.3
 Requires: logrotate
@@ -126,14 +118,11 @@ Requires: iproute
 Requires: python-netaddr
 Requires: python-inotify
 Requires: python-argparse
-Requires: python-cpopen >= 1.3
 Requires: python-ethtool >= 0.6-3
-Requires: %{name}-python-zombiereaper = %{version}-%{release}
 Requires: rpm-python
 Requires: nfs-utils
 Requires: m2crypto
 Requires: libguestfs-tools-c
-Requires: libnl
 Requires: %{name}-xmlrpc = %{version}-%{release}
 Requires: mom >= 0.3.2-3
 
@@ -150,24 +139,13 @@ Requires: libvirt-daemon-driver-nwfilter
 Requires: libvirt-daemon-driver-qemu
 %else
 %if 0%{?rhel}
-Requires: libvirt >= 0.10.2-18.el6_4.15
+Requires: libvirt >= 0.10.2-18.el6_4.10
 %else
 Requires: libvirt >= 1.0.2-1
 %endif
 %endif
 Requires: libvirt-python, libvirt-lock-sanlock, libvirt-client
 
-# iscsi-intiator versions
-%if 0%{?rhel}
-%if 0%{?rhel} >= 7
-Requires: iscsi-initiator-utils
-%else
-Requires: iscsi-initiator-utils >= 6.2.0.872-15
-%endif # rhel 7
-%else # fedora
-Requires: iscsi-initiator-utils >= 6.2.0.873-3
-%endif
-
 %if 0%{?rhel}
 Requires: python-ethtool >= 0.6-3
 %if 0%{?rhel} >= 7
@@ -175,12 +153,13 @@ ExclusiveArch:  x86_64
 Requires: device-mapper-multipath
 Requires: e2fsprogs
 Requires: fence-agents-all
+Requires: iscsi-initiator-utils
 Requires: lvm2
 Requires: python
 Requires: policycoreutils-python
 Requires: python-pthreading >= 0.1.2
 Requires: qemu-kvm
-Requires: qemu-img
+Requires: qemu-kvm-img
 Requires: sanlock, sanlock-python
 Requires: selinux-policy-targeted
 %else
@@ -188,6 +167,7 @@ Requires: python
 # Update the qemu-kvm requires when block_stream will be included
 Requires: qemu-kvm >= 2:0.12.1.2-2.295.el6_3.4
 Requires: qemu-img >= 2:0.12.1.2-2.295.el6_3.4
+Requires: iscsi-initiator-utils >= 6.2.0.873-3
 Requires: device-mapper-multipath >= 0.4.9-52
 Requires: e2fsprogs >= 1.41.12-11
 Requires: fence-agents
@@ -205,11 +185,9 @@ Requires: logrotate < 3.8.0
 %if 0%{?fedora} >= 19
 Requires: python-pthreading >= 0.1.2
 Requires: fence-agents-all
-Requires: kernel >= 3.11.3-201
 %else
 Requires: python-pthreading
 Requires: fence-agents
-Requires: kernel >= 3.6
 %endif
 # Subprocess and thread bug was found on python 2.7.2
 Requires: python >= 2.7.3
@@ -219,8 +197,10 @@ Requires: python-ethtool >= 0.8-1
 %if 0%{?fedora} >= 18
 Requires: initscripts >= 9.42.2-1
 %endif
+Requires: iscsi-initiator-utils >= 6.2.0.872-14
 Requires: device-mapper-multipath >= 0.4.9-18
 Requires: e2fsprogs >= 1.41.14
+Requires: kernel >= 3.6
 Requires: sanlock >= 2.4-2, sanlock-python
 Requires: policycoreutils-python
 Requires: sed >= 4.2.1-10
@@ -243,7 +223,7 @@ Requires: systemd >= 197-1.fc18.2
 
 # GlusterFS client-side RPMs needed for Gluster SD
 %if 0%{?with_gluster}
-Requires: glusterfs >= 3.4.2
+Requires: glusterfs >= 3.4.0
 Requires: glusterfs-cli
 Requires: glusterfs-api
 Requires: glusterfs-fuse
@@ -283,6 +263,7 @@ BuildArch:      noarch
 
 Requires: %{name}-python = %{version}-%{release}
 Requires: %{name}-xmlrpc = %{version}-%{release}
+Requires: python-cpopen
 
 %description cli
 Call VDSM commands from the command line. Used for testing and debugging.
@@ -292,6 +273,7 @@ Summary:        VDSM xmlrpc API
 BuildArch:      noarch
 
 Requires: %{name}-python = %{version}-%{release}
+Requires: python-cpopen
 
 
 %description xmlrpc
@@ -327,15 +309,6 @@ Requires:       python >= 2.6
 %description yajsonrpc
 A JSON RPC server and client implementation.
 
-%package python-zombiereaper
-Summary:        Collects zombie processes automatically
-BuildArch:      noarch
-
-Requires:       python >= 2.6
-
-%description python-zombiereaper
-Collects zombie processes automatically so you don't have to
-
 %package bootstrap
 Summary:        VDSM bootstrapping package
 BuildArch:      noarch
@@ -356,10 +329,18 @@ Requires: openssl
 VDSM registration package. Used to register a Linux host to a Virtualization
 Manager.
 
+%package python-cpopen
+Summary: Creates a sub-process in simpler safer manner.
+
+BuildRequires: python2-devel
+Conflicts: python-cpopen
+
+%description python-cpopen
+Python package for creating sub-process in simpler and safer manner by using C
+code.
+
 %package python
 Summary:        VDSM python libraries
-Requires:       %{name}-python-zombiereaper = %{version}-%{release}
-Requires:       python-cpopen >= 1.2.3-5
 
 %description python
 Shared libraries between the various VDSM packages.
@@ -392,7 +373,6 @@ Requires:       vdsm
 VDSM hook used to perform consistency check on a qcow2 format disk image
 using the QEMU disk image utility.
 
-%if 0%{?with_vhostmd}
 %package hook-vhostmd
 Summary:        VDSM hook set for interaction with vhostmd
 Requires:       vhostmd
@@ -400,7 +380,6 @@ BuildArch:      noarch
 
 %description hook-vhostmd
 VDSM hook to use vhostmd per VM according to Virtualization Manager requests.
-%endif
 
 %package hook-faqemu
 Summary:        Fake qemu process for VDSM quality assurance
@@ -430,15 +409,6 @@ VDSM hooks which allow to disable mac spoof filtering
 either on all the of the VM's interfaces or on
 specific vnics.
 
-%package hook-extnet
-Summary:        Force a vNIC to connect to a specific libvirt network
-BuildArch:      noarch
-Requires:       vdsm = %{version}-%{release}
-
-%description hook-extnet
-VDSM hook which allows to connect a vNIC to a libvirt network that is managed
-outside of oVirt, such as an openvswitch network.
-
 %package hook-fileinject
 Summary:        Allow uploading file to VMs disk
 BuildArch:      noarch
@@ -570,21 +540,10 @@ directly to a virtual machine.
 %package hook-vmfex
 Summary:        vmfex support for VDSM
 BuildArch:      noarch
-Conflicts:      hook-vmfex-dev
 
 %description hook-vmfex
 Hook for vmfex.
 
-%package hook-vmfex-dev
-Summary:        VM-FEX vNIC support for VDSM
-BuildArch:      noarch
-Requires:       vdsm = %{version}-%{release}
-Conflicts:      hook-vmfex
-
-%description hook-vmfex-dev
-Allows to use custom device properties to connect a guest vNIC to a host
-VM-FEX Virtual Function (SR-IOV with macvtap mode).
-
 %package hook-vmdisk
 Summary:        External disk support for VDSM
 BuildArch:      noarch
@@ -607,8 +566,13 @@ Gluster plugin enables VDSM to serve Gluster functionalities.
 
 %prep
 %setup -q
-# ovirt-3.4 patches
+# ovirt-3.3.3 patches
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
 
 %if 0%{?rhel} == 6
 sed -i '/ su /d' vdsm/vdsm-logrotate.conf.in
@@ -632,11 +596,6 @@ sed -i -e 's/^software_version =.*/software_version = "'"${baseversion}"'"/' \
 rm -rf %{buildroot}
 make DESTDIR=%{buildroot} install
 
-# Creating VDSM logs in this session to avoid rpmbuild
-# complain during the build
-install -dDm 0755 %{buildroot}/var/log/vdsm
-touch %{buildroot}/var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log}
-
 # Install the respawn utility
 install -Dm 0755 init/sysvinit/respawn \
                  %{buildroot}%{_datadir}/%{vdsm_name}/respawn
@@ -653,6 +612,8 @@ install -Dm 0755 init/systemd/systemd-vdsmd %{buildroot}/lib/systemd/systemd-vds
 install -Dm 0644 init/systemd/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service
 install -Dm 0644 init/systemd/supervdsmd.service %{buildroot}%{_unitdir}/supervdsmd.service
 
+install -Dm 0644 init/systemd/vdsm-restore-net-config.service \
+                 %{buildroot}%{_unitdir}/vdsm-restore-net-config.service
 install -Dm 0755 vdsm_reg/vdsm-reg.init \
                  %{buildroot}/lib/systemd/systemd-vdsm-reg
 install -Dm 0644 vdsm_reg/vdsm-reg.service \
@@ -665,6 +626,8 @@ install -Dm 0755 init/sysvinit/vdsmd.init %{buildroot}%{_initrddir}/vdsmd
 install -Dm 0755 init/sysvinit/supervdsmd.init %{buildroot}%{_initrddir}/supervdsmd
 
 install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg
+install -Dm 0755 init/sysvinit/vdsm-restore-net-config.init \
+    %{buildroot}%{_initrddir}/vdsm-restore-net-config
 %endif
 
 %if 0%{?with_tmpfiles_macro}
@@ -676,22 +639,20 @@ install -Dm 0644 init/systemd/vdsm-tmpfiles.d.conf \
 # This is not commonplace, but we want /var/log/core to be a world-writable
 # dropbox for core dumps
 install -dDm 1777 %{buildroot}%{_localstatedir}/log/core
-%endif
-
-%if !0%{?rhel}
+%else
 # Install the configuration sample
 install -Dm 0644 lib/vdsm/vdsm.conf.sample \
-                 %{buildroot}%{_sysconfdir}/%{vdsm_name}/vdsm.conf
-%endif
+                 %{buildroot}%{_sysconfdir}/vdsm/vdsm.conf
 
 # Install the polkit for libvirt
-%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
+%if 0%{?fedora} >= 18
 install -Dm 0644 vdsm/vdsm-libvirt-access.rules \
                  %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.rules
 %else
 install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \
                  %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.pkla
 %endif
+%endif
 
 %check
 # Disabling the nose tests until they'll all succeed in koji.
@@ -709,20 +670,13 @@ export LC_ALL=C
     /usr/sbin/useradd -r -u 36 -g %{vdsm_group} -d /var/lib/vdsm \
         -s /sbin/nologin -c "Node Virtualization Manager" %{vdsm_user}
 /usr/sbin/usermod -a -G %{qemu_group},%{snlk_group} %{vdsm_user}
+/usr/sbin/usermod -a -G %{qemu_group},%{vdsm_group} %{snlk_user}
 
 %post
 %{_bindir}/vdsm-tool sebool-config || :
 # set the vdsm "secret" password for libvirt
 %{_bindir}/vdsm-tool set-saslpasswd
 
-# After vdsm install we should create the logs files.
-# In the install session we create it but since we use
-# the ghost macro (in files session) the files are not included
-touch /var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log}
-chmod 0644 /var/log/vdsm/{metadata.log,mom.log,supervdsm.log,vdsm.log}
-chown vdsm:kvm /var/log/vdsm/{metadata.log,mom.log,vdsm.log}
-chown root:root /var/log/vdsm/supervdsm.log
-
 # Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.conf.
 # So Remove them if it is played with /etc/sysctl.conf.
 if grep -q "# VDSM section begin" /etc/sysctl.conf; then
@@ -737,20 +691,24 @@ fi
 /sbin/restorecon -R /var/log/core >/dev/null 2>&1
 # hack until we replace core dump with abrt
 
-%if ! 0%{?with_systemd}
+%if 0%{?rhel}
 if [ "$1" -eq 1 ] ; then
     /sbin/chkconfig --add vdsmd
     /sbin/chkconfig --add supervdsmd
+    /sbin/chkconfig --add vdsm-restore-net-config
 fi
 %else
+%if 0%{?with_systemd}
 /bin/systemctl restart systemd-modules-load.service >/dev/null 2>&1 || :
 if [ "$1" -eq 1 ] ; then
     /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || :
     /bin/systemctl enable supervdsmd.service >/dev/null 2>&1 || :
+    /bin/systemctl enable vdsm-restore-net-config.service >/dev/null 2>&1 || :
     /bin/systemctl daemon-reload >/dev/null 2>&1 || :
 fi
 exit 0
 %endif
+%endif
 
 %preun
 if [ "$1" -eq 0 ]; then
@@ -771,13 +729,14 @@ if [ "$1" -eq 0 ]; then
         /bin/sed -i -e 's/# VDSM backup//' %{_sysconfdir}/logrotate.d/libvirtd
 fi
 
-%if ! 0%{?with_systemd}
+%if 0%{?rhel}
 if [ "$1" -eq 0 ]
 then
     /sbin/service vdsmd stop > /dev/null 2>&1 || :
     /sbin/chkconfig --del vdsmd
     /sbin/service supervdsmd stop > /dev/null 2>&1 || :
     /sbin/chkconfig --del supervdsmd
+    /sbin/chkconfig --del vdsm-restore-net-config
 
     /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \
         /etc/sysctl.conf
@@ -798,10 +757,12 @@ fi
 %if 0%{?with_systemd_macros}
 %systemd_preun vdsmd.service
 %systemd_preun supervdsmd.service
+%systemd_preun vdsm-restore-net-config.service
 %else
 if [ "$1" -eq 0 ]; then
     /bin/systemctl --no-reload disable vdsmd.service > /dev/null 2>&1 || :
     /bin/systemctl --no-reload disable supervdsmd.service > /dev/null 2>&1 || :
+    /bin/systemctl --no-reload disable vdsm-restore-net-config.service > /dev/null 2>&1 || :
     /bin/systemctl stop vdsmd.service > /dev/null 2>&1 || :
     /bin/systemctl stop supervdsmd.service > /dev/null 2>&1 || :
 fi
@@ -813,46 +774,27 @@ exit 0
 if [ "$1" -ge 1 ]; then
     supervdsmd_start_required='no'
     vdsmd_start_required='no'
-
-    # Both vdsm and supervdsm should be managed here and must be restarted if
-    # ran before (code might changed)
     if %{_bindir}/vdsm-tool service-status vdsmd >/dev/null 2>&1; then
-        %{_bindir}/vdsm-tool service-stop vdsmd >/dev/null 2>&1 || :
+        %{_bindir}/vdsm-tool service-stop vdsmd >/dev/null 2>&1
         vdsmd_start_required='yes'
     fi
     if %{_bindir}/vdsm-tool service-status supervdsmd >/dev/null 2>&1; then
-        %{_bindir}/vdsm-tool service-stop supervdsmd >/dev/null 2>&1 || :
+        %{_bindir}/vdsm-tool service-stop supervdsmd >/dev/null 2>&1
         supervdsmd_start_required='yes'
     fi
 
-    if ! %{_bindir}/vdsm-tool is-configured --module libvirt >/dev/null 2>&1;
-    then
-        if ! %{_bindir}/vdsm-tool configure --module libvirt --force \
-                >/dev/null 2>&1; then
-            # fallback to vdsmd reconfigure api - This change may be removed
-            # when vdsm won't support any downgrade\upgrade to versions that
-            # don't include vdsm-tool configure api (vdsm <= 3.3)
-            for f in '/lib/systemd/systemd-vdsmd' '/etc/init.d/vdsmd'; do
-                if [ -f "${f}" ]; then
-                    "${f}" reconfigure >/dev/null 2>&1 || :
-                fi
-            done
-        fi
-    fi
+    %{_bindir}/vdsm-tool libvirt-configure >/dev/null 2>&1
 
     if [ "${supervdsmd_start_required}" = 'yes' ]; then
-        %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1 || :
+        %{_bindir}/vdsm-tool service-start supervdsmd >/dev/null 2>&1
     fi
     if [ "${vdsmd_start_required}" = 'yes' ]; then
-        %{_bindir}/vdsm-tool service-start vdsmd >/dev/null 2>&1 || :
+        %{_bindir}/vdsm-tool service-start vdsmd >/dev/null 2>&1
     fi
 fi
 exit 0
 
-%if 0%{?rhel} == 6
-# In el6, We configure libvirt to use upstart without the libvirt.rpm's
-# awareness. Thus, we must stop/restart libvirt ourselves when the
-# libvirt.rpm is removed/upgraded.
+%if 0%{?rhel}
 %triggerun -- libvirt
 if [ "$2" -eq "0" ]; then
     /sbin/initctl stop libvirtd > /dev/null 2>&1 || :
@@ -865,7 +807,7 @@ fi
 %endif
 
 %post reg
-%if ! 0%{?with_systemd}
+%if 0%{?rhel}
 if [ "$1" -eq 1 ] ; then
     /sbin/chkconfig --add vdsm-reg
 fi
@@ -882,7 +824,7 @@ exit 0
 %endif
 
 %preun reg
-%if ! 0%{?with_systemd}
+%if 0%{?rhel}
 if [ "$1" -eq 0 ]
 then
     /sbin/service vdsm-reg stop > /dev/null 2>&1 || :
@@ -907,23 +849,20 @@ exit 0
 /lib/systemd/systemd-vdsmd
 %{_unitdir}/vdsmd.service
 %{_unitdir}/supervdsmd.service
+%{_unitdir}/vdsm-restore-net-config.service
 %else
 %{_initrddir}/vdsmd
 %{_initrddir}/supervdsmd
+%{_initrddir}/vdsm-restore-net-config
 %endif
 
 %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center
-%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/metadata.log
-%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/mom.log
-%ghost %config %attr(0644, root, root) /var/log/vdsm/supervdsm.log
-%ghost %config %attr(0644, %{vdsm_user}, %{vdsm_group}) /var/log/vdsm/vdsm.log
 %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/hsm-tasks
 %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center/mnt
 %dir %{_libexecdir}/%{vdsm_name}
 %dir %{_sysconfdir}/%{vdsm_name}
 %dir %{_sysconfdir}/%{vdsm_name}/mom.d
 %dir %{_datadir}/%{vdsm_name}
-%dir %{_datadir}/%{vdsm_name}/netconf
 %dir %{_datadir}/%{vdsm_name}/storage
 %dir %{_datadir}/%{vdsm_name}/storage/imageRepository
 %{_datadir}/%{vdsm_name}/alignmentScan.py*
@@ -940,7 +879,6 @@ exit 0
 %{_datadir}/%{vdsm_name}/mk_sysprep_floppy
 %{_datadir}/%{vdsm_name}/parted_utils.py*
 %{_datadir}/%{vdsm_name}/mkimage.py*
-%{_datadir}/%{vdsm_name}/ppc64HardwareInfo.py*
 %{_datadir}/%{vdsm_name}/sourceRoute.py*
 %{_datadir}/%{vdsm_name}/sourceRouteThread.py*
 %{_datadir}/%{vdsm_name}/supervdsm.py*
@@ -951,10 +889,9 @@ exit 0
 %{_datadir}/%{vdsm_name}/vdsm-restore-net-config
 %{_datadir}/%{vdsm_name}/vdsm-store-net-config
 %{_datadir}/%{vdsm_name}/vm.py*
-
+%{_datadir}/%{vdsm_name}/zombieReaper.py*
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/svdsm.logger.conf
-%config(noreplace) %{_sysconfdir}/%{vdsm_name}/upgrade.logger.conf
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.conf
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/mom.d/*.policy
 %config(noreplace) %{_sysconfdir}/logrotate.d/vdsm
@@ -999,7 +936,6 @@ exit 0
 %{_datadir}/%{vdsm_name}/storage/iscsiadm.py*
 %{_datadir}/%{vdsm_name}/storage/iscsi.py*
 %{_datadir}/%{vdsm_name}/storage/localFsSD.py*
-%{_datadir}/%{vdsm_name}/storage/lvm.env
 %{_datadir}/%{vdsm_name}/storage/lvm.py*
 %{_datadir}/%{vdsm_name}/storage/misc.py*
 %{_datadir}/%{vdsm_name}/storage/mount.py*
@@ -1015,7 +951,6 @@ exit 0
 %{_datadir}/%{vdsm_name}/storage/sd.py*
 %{_datadir}/%{vdsm_name}/storage/securable.py*
 %{_datadir}/%{vdsm_name}/storage/sp.py*
-%{_datadir}/%{vdsm_name}/storage/spbackends.py*
 %{_datadir}/%{vdsm_name}/storage/storageConstants.py*
 %{_datadir}/%{vdsm_name}/storage/storage_exception.py*
 %{_datadir}/%{vdsm_name}/storage/storage_mailbox.py*
@@ -1031,7 +966,6 @@ exit 0
 %{_libexecdir}/%{vdsm_name}/safelease
 %{_libexecdir}/%{vdsm_name}/spmprotect.sh
 %{_libexecdir}/%{vdsm_name}/spmstop.sh
-%dir %{_libexecdir}/%{vdsm_name}/hooks
 %dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_create
 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_device_create
 %dir %{_libexecdir}/%{vdsm_name}/hooks/before_device_destroy
@@ -1073,10 +1007,6 @@ exit 0
 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_disk_hotunplug
 %dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start
 %dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop
-%dir %{_libexecdir}/%{vdsm_name}/hooks/before_network_setup
-%dir %{_libexecdir}/%{vdsm_name}/hooks/after_network_setup
-%dir %{_libexecdir}/%{vdsm_name}/hooks/before_set_num_of_cpus
-%dir %{_libexecdir}/%{vdsm_name}/hooks/after_set_num_of_cpus
 %{_datadir}/%{vdsm_name}/addNetwork
 %{_datadir}/%{vdsm_name}/configNetwork.py*
 %{_datadir}/%{vdsm_name}/delNetwork
@@ -1086,7 +1016,6 @@ exit 0
 %{_datadir}/%{vdsm_name}/ksm.py*
 %{_datadir}/%{vdsm_name}/momIF.py*
 %{_datadir}/%{vdsm_name}/netconf/__init__.py*
-%{_datadir}/%{vdsm_name}/netconf/dhclient.py*
 %{_datadir}/%{vdsm_name}/netconf/ifcfg.py*
 %{_datadir}/%{vdsm_name}/netconf/libvirtCfg.py*
 %{_datadir}/%{vdsm_name}/netconf/iproute2.py*
@@ -1110,12 +1039,13 @@ exit 0
 %{_mandir}/man8/vdsmd.8*
 %if 0%{?rhel}
 %dir %{_localstatedir}/log/core
-%endif
-%if 0%{?fedora} >= 18 || 0%{?rhel} >= 7
+%else
+%if 0%{?fedora} >= 18
 %{_polkitdir}/10-vdsm-libvirt-access.rules
 %else
 %{_polkitdir}/10-vdsm-libvirt-access.pkla
 %endif
+%endif
 
 %defattr(-, %{vdsm_user}, %{qemu_group}, -)
 %dir %{_localstatedir}/lib/libvirt/qemu/channels
@@ -1128,11 +1058,10 @@ exit 0
 %config(noreplace) %{_sysconfdir}/pki/%{vdsm_name}/keys/libvirt_password
 %dir %{_localstatedir}/lib/%{vdsm_name}
 %dir %{_localstatedir}/lib/%{vdsm_name}/netconfback
-%dir %{_localstatedir}/lib/%{vdsm_name}/persistence
-%dir %{_localstatedir}/lib/%{vdsm_name}/upgrade
 %dir %{_localstatedir}/run/%{vdsm_name}
 %dir %{_localstatedir}/run/%{vdsm_name}/sourceRoutes
 %dir %{_localstatedir}/run/%{vdsm_name}/trackedInterfaces
+%ghost %dir %{_localstatedir}/run/%{vdsm_name}/pools
 %ghost %dir %{_localstatedir}/run/%{vdsm_name}/payload
 %dir %{_localstatedir}/log/%{vdsm_name}
 %dir %{_localstatedir}/log/%{vdsm_name}/backup
@@ -1143,8 +1072,6 @@ exit 0
 %if !0%{?rhel}
 %config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf
 %endif
-%dir %{python_sitearch}/%{vdsm_name}
-%dir %{python_sitearch}/%{vdsm_name}/tool
 %{python_sitearch}/%{vdsm_name}/__init__.py*
 %{python_sitearch}/%{vdsm_name}/config.py*
 %{python_sitearch}/%{vdsm_name}/constants.py*
@@ -1153,10 +1080,8 @@ exit 0
 %{python_sitearch}/%{vdsm_name}/ipwrapper.py*
 %{python_sitearch}/%{vdsm_name}/libvirtconnection.py*
 %{python_sitearch}/%{vdsm_name}/netinfo.py*
-%{python_sitearch}/%{vdsm_name}/netlink.py*
 %{python_sitearch}/%{vdsm_name}/qemuImg.py*
 %{python_sitearch}/%{vdsm_name}/SecureXMLRPCServer.py*
-%{python_sitearch}/%{vdsm_name}/netconfpersistence.py*
 %{python_sitearch}/%{vdsm_name}/utils.py*
 %{python_sitearch}/%{vdsm_name}/vdscli.py*
 %{python_sitearch}/%{vdsm_name}/tool/__init__.py*
@@ -1167,34 +1092,25 @@ exit 0
 %endif
 %{python_sitearch}/%{vdsm_name}/tool/dummybr.py*
 %{python_sitearch}/%{vdsm_name}/tool/nwfilter.py*
-%{python_sitearch}/%{vdsm_name}/tool/configurator.py*
+%{python_sitearch}/%{vdsm_name}/tool/libvirt_configure.py*
 %{_libexecdir}/%{vdsm_name}/libvirt_configure.sh
 %{python_sitearch}/%{vdsm_name}/tool/passwd.py*
-%{python_sitearch}/%{vdsm_name}/tool/restore_nets.py*
+%{python_sitearch}/%{vdsm_name}/tool/sanlock.py*
 %{python_sitearch}/%{vdsm_name}/tool/seboolsetup.py*
 %{python_sitearch}/%{vdsm_name}/tool/service.py*
-%{python_sitearch}/%{vdsm_name}/tool/transient.py*
-%{python_sitearch}/%{vdsm_name}/tool/unified_persistence.py*
-%{python_sitearch}/%{vdsm_name}/tool/upgrade.py*
-%{python_sitearch}/%{vdsm_name}/tool/upgrade_300_networks.py*
 %{python_sitearch}/%{vdsm_name}/tool/validate_ovirt_certs.py*
 %{python_sitearch}/%{vdsm_name}/tool/vdsm-id.py*
 
 %files tests
 %doc %{_datadir}/%{vdsm_name}/tests/README
 %defattr(-, root, root, -)
-%dir %{_datadir}/%{vdsm_name}/tests
-%dir %{_datadir}/%{vdsm_name}/tests/functional
 %{_datadir}/%{vdsm_name}/tests/*.py*
 %{_datadir}/%{vdsm_name}/tests/cpu_info.out
 %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E5649.out
 %{_datadir}/%{vdsm_name}/tests/caps_libvirt_amd_6274.out
 %{_datadir}/%{vdsm_name}/tests/caps_libvirt_intel_E31220.out
-%{_datadir}/%{vdsm_name}/tests/caps_lscpu_ppc64_1_4_4.out
-%{_datadir}/%{vdsm_name}/tests/caps_lscpu_ppc64_2_4_8.out
 %{_datadir}/%{vdsm_name}/tests/glob_1c60971a-8647-44ac-ae33-6520887f8843.out
 %{_datadir}/%{vdsm_name}/tests/lvs_3386c6f2-926f-42c4-839c-38287fac8998.out
-%{_datadir}/%{vdsm_name}/tests/mem_info.out
 %{_datadir}/%{vdsm_name}/tests/netmaskconversions
 %{_datadir}/%{vdsm_name}/tests/run_tests.sh
 %{_datadir}/%{vdsm_name}/tests/tc_filter_show.out
@@ -1202,7 +1118,6 @@ exit 0
 %{_datadir}/%{vdsm_name}/tests/glusterVolumeProfileInfoNfs.xml
 %{_datadir}/%{vdsm_name}/tests/glusterVolumeRebalanceStatus.xml
 %{_datadir}/%{vdsm_name}/tests/glusterVolumeRemoveBricksStatus.xml
-%{_datadir}/%{vdsm_name}/tests/glusterVolumeTasks.xml
 %{_datadir}/%{vdsm_name}/tests/functional/*.py*
 %{_datadir}/%{vdsm_name}/tests/functional/*.policy
 
@@ -1210,21 +1125,16 @@ exit 0
 %defattr(-, root, root, -)
 %{_sysconfdir}/sudoers.d/50_vdsm_hook_openstacknet
 %{_libexecdir}/%{vdsm_name}/hooks/after_device_create/50_openstacknet
-%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_utils.py*
-%{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy/50_openstacknet
-%{_libexecdir}/%{vdsm_name}/hooks/after_device_destroy/openstacknet_utils.py*
+%{_libexecdir}/%{vdsm_name}/hooks/after_device_create/openstacknet_consts.py*
 %{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/50_openstacknet
-%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_utils.py*
+%{_libexecdir}/%{vdsm_name}/hooks/after_device_migrate_destination/openstacknet_consts.py*
 %{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/50_openstacknet
-%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_utils.py*
-%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug/50_openstacknet
-%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotunplug/openstacknet_utils.py*
+%{_libexecdir}/%{vdsm_name}/hooks/after_nic_hotplug/openstacknet_consts.py*
 %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_openstacknet
-%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_utils.py*
+%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/openstacknet_consts.py*
 %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_openstacknet
-%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_utils.py*
+%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/openstacknet_consts.py*
 
-%if 0%{?with_vhostmd}
 %files hook-vhostmd
 %defattr(-, root, root, -)
 %doc COPYING
@@ -1233,13 +1143,6 @@ exit 0
 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd
 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd
 %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd
-%else
-%exclude %{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd
-%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd
-%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vhostmd
-%exclude %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate/50_vhostmd
-%exclude %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_vhostmd
-%endif
 
 %files hook-qemucmdline
 %defattr(-, root, root, -)
@@ -1292,11 +1195,6 @@ exit 0
 %{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_macspoof
 %{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_macspoof
 
-%files hook-extnet
-%defattr(-, root, root, -)
-%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_extnet
-%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_extnet
-
 %files hook-nestedvt
 %defattr(-, root, root, -)
 %{_sysconfdir}/modprobe.d/vdsm-nestedvt.conf
@@ -1345,12 +1243,6 @@ exit 0
 %defattr(-, root, root, -)
 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_vmfex
 %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmfex
-
-%files hook-vmfex-dev
-%defattr(-, root, root, -)
-%{_libexecdir}/%{vdsm_name}/hooks/before_device_create/50_vmfex
-%{_libexecdir}/%{vdsm_name}/hooks/before_device_migrate_destination/50_vmfex
-%{_libexecdir}/%{vdsm_name}/hooks/before_nic_hotplug/50_vmfex
 %endif
 
 %files debug-plugin
@@ -1369,7 +1261,6 @@ exit 0
 
 %files xmlrpc
 %defattr(-, root, root, -)
-%dir %{_datadir}/%{vdsm_name}
 %{_datadir}/%{vdsm_name}/BindingXMLRPC.py*
 
 %files api
@@ -1382,15 +1273,11 @@ exit 0
 %{_datadir}/%{vdsm_name}/Bridge.py*
 
 %files yajsonrpc
-%dir %{python_sitelib}/yajsonrpc
 %{python_sitelib}/yajsonrpc/__init__.py*
 %{python_sitelib}/yajsonrpc/asyncoreReactor.py*
 %{python_sitelib}/yajsonrpc/protonReactor.py*
 %{python_sitelib}/yajsonrpc/client.py*
 
-%files python-zombiereaper
-%{python_sitelib}/zombiereaper/__init__.py*
-
 %files bootstrap
 %defattr(-, root, root, -)
 %doc COPYING
@@ -1444,37 +1331,18 @@ exit 0
 %{_datadir}/%{vdsm_name}/gluster/vdsmapi-gluster-schema.json
 %{_datadir}/%{vdsm_name}/gluster/hooks.py*
 %{_datadir}/%{vdsm_name}/gluster/services.py*
-%{_datadir}/%{vdsm_name}/gluster/tasks.py*
 %endif
 
+%files python-cpopen
+%{python_sitearch}/cpopen/__init__.py*
+%attr(755, root, root) %{python_sitearch}/cpopen/cpopen.so*
+
 %changelog
-* Thu Feb 06 2014 Yaniv Bronhaim <ybronhei at redhat.com - 4.14.1-4
-- Adding configure sanlock on force
-
-* Wed Feb 05 2014 Douglas Schilling Landgraf <dougsland at redhat.com> - 4.14.1-3
-- execCmd with sudo=root raise require tty fault when running as root
-- sysvinit: Ensure that iscsid is started (BZ#1056948)
-- Add missing libnl buildrequires dependency
-- vdsm.spec: vdsm-python requires python-cpopen
-- netconfig: set ETHTOOL_OPTS when a NIC goes up (BZ#1059680)
-- sos: plugin should ignore /var/run/vdsm/storage
-- vdsm.spec: vdsm should own vdsm.log (BZ#1055153)
-- vdsm.spec: own metadata supervdsm mom logs (BZ#1055153)
-- spec: do not remove vdsm logs when pkg removed (BZ#1055153)
-- gluster: add host uuid in volume status
-- gluster: interpret and use correct xml elements
-- gluster: adopt xml changes of rebalance and remove-brick status
-- vm: do not pause during refreshVolume (BZ#889097)
-- spec: vdsm pkg for EL distro must include pkla (BZ#1060524)
-
-* Tue Jan 21 2014 Douglas Schilling Landgraf <dougsland at redhat.com> - 4.14.1-2
-- vdsm.spec: Add BuildRequires to python-argparse
-
-* Mon Jan 20 2014 Douglas Schilling Landgraf <dougsland at redhat.com> - 4.14.1-1
-- Rebuild 4.14.1 from ovirt-3.4
-
-* Mon Jan 20 2014 Douglas Schilling Landgraf <dougsland at redhat.com> - 4.14.1-0
-- Build 4.14.1-0
+* Mon Feb 03 2014 Douglas Schilling Landgraf <dougsland at redhat.com> - 4.13.3-3
+- spec: replace requires vdsm-python-cpopen
+
+* Thu Jan 23 2014 Douglas Schilling Landgraf <dougsland at redhat.com> - 4.13.3-2
+- Report conflict when python-cpopen is installed
 
 * Mon Jan 13 2014 Yaniv Bronhaim <ybronhei at redhat.com> - 4.13.3-1
 - Reverting iscsi changes that caused a regression by importing


More information about the scm-commits mailing list