diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8219ac9..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/vdsm-*.tar.gz diff --git a/0001-deployUtil.yumFind-rename-and-simplify-semantics.patch b/0001-deployUtil.yumFind-rename-and-simplify-semantics.patch deleted file mode 100644 index 46041c1..0000000 --- a/0001-deployUtil.yumFind-rename-and-simplify-semantics.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 8cf22884c2134353981bca1cb0600451391dd0de Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 19 Jun 2012 00:17:13 +0300 -Subject: [PATCH 01/17] deployUtil.yumFind: rename and simplify semantics - -deployUtil.yumListPackages is a convenience wrapper around -yum.YumBase.pkgSack.searchNevra() - -Change-Id: I5ad5405ae0f8548c0116ac5a8066325455aef13a -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5467 -Reviewed-by: Douglas Schilling Landgraf -Tested-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5542 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm_reg/deployUtil.py.in | 14 ++++++-------- - 1 files changed, 6 insertions(+), 8 deletions(-) - -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 976295f..c80b487 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -1029,18 +1029,16 @@ def installAndVerify(pckgType, pckgName, action, args=None): - - return fReturn, msg - --def yumFind(pkgName): -+def yumListPackages(pkgName): - """ - Returns a list of available packages exists in yum's db. - """ - import yum -- lReturn = None - - my = yum.YumBase() - my.preconf.debuglevel = 0 # Remove yum noise -- lReturn = my.pkgSack.searchNevra(name=pkgName) -+ return my.pkgSack.searchNevra(name=pkgName) - -- return lReturn - - def yumSearch(pkgName): - """ -@@ -1048,8 +1046,8 @@ def yumSearch(pkgName): - """ - fReturn = False - -- pkgs = yumFind(pkgName) -- if pkgs and len(pkgs)>0: -+ pkgs = yumListPackages(pkgName) -+ if pkgs: - fReturn = True - logging.debug("yumSearch: found " + str(pkgName) + " entries: " + str(pkgs)) - else: -@@ -1064,8 +1062,8 @@ def yumSearchVersion(pkgName, ver, startWith=True): - """ - fReturn = False - -- pkgs = yumFind(pkgName) -- if pkgs and len(pkgs)>0: -+ pkgs = yumListPackages(pkgName) -+ if pkgs: - for item in pkgs: - if startWith: - if str(item).startswith(ver): --- -1.7.1 - diff --git a/0002-drop-deployUtil.yumSearch.patch b/0002-drop-deployUtil.yumSearch.patch deleted file mode 100644 index 4980e65..0000000 --- a/0002-drop-deployUtil.yumSearch.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 5edbed09c4091959e569e8cccc888bb72958082b Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 19 Jun 2012 00:21:55 +0300 -Subject: [PATCH 02/17] drop deployUtil.yumSearch - -It was just a complex way of calculating bool(yumFind()). - -Change-Id: Iafc9d67fef5cb348255b06a9e6b404a70ec35693 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5468 -Reviewed-by: Douglas Schilling Landgraf -Tested-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5543 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vds_bootstrap/vds_bootstrap.py | 2 +- - vdsm_reg/deployUtil.py.in | 16 ---------------- - 2 files changed, 1 insertions(+), 17 deletions(-) - -diff --git a/vds_bootstrap/vds_bootstrap.py b/vds_bootstrap/vds_bootstrap.py -index 0df5023..12e127e 100755 ---- a/vds_bootstrap/vds_bootstrap.py -+++ b/vds_bootstrap/vds_bootstrap.py -@@ -225,7 +225,7 @@ class Deploy: - rc = True - - try: -- rc = deployUtil.yumSearch(VDSM_NAME) -+ rc = bool(deployUtil.yumListPackages(VDSM_NAME)) - except: - rc = False - logging.error("checkRegistration: Error searching for VDSM package!", -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index c80b487..1adf1a5 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -1039,22 +1039,6 @@ def yumListPackages(pkgName): - my.preconf.debuglevel = 0 # Remove yum noise - return my.pkgSack.searchNevra(name=pkgName) - -- --def yumSearch(pkgName): -- """ -- Returns True is package exists in yum's db. -- """ -- fReturn = False -- -- pkgs = yumListPackages(pkgName) -- if pkgs: -- fReturn = True -- logging.debug("yumSearch: found " + str(pkgName) + " entries: " + str(pkgs)) -- else: -- logging.debug("yumSearch: package " + str(pkgName) + " not found!") -- -- return fReturn -- - def yumSearchVersion(pkgName, ver, startWith=True): - """ - Returns True is package exists in yum's db with the given version. --- -1.7.1 - diff --git a/0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch b/0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch deleted file mode 100644 index d9b45d7..0000000 --- a/0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch +++ /dev/null @@ -1,95 +0,0 @@ -From 67309fc8a7a4edd4996490b64f51ce37f0ed2327 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 19 Jun 2012 00:33:22 +0300 -Subject: [PATCH 03/17] deployUtil.yumSearchVersion: compare versions sanely - -Change-Id: I0aa40c3395ca012a21f148f20125b54e3ba16d8a -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5469 -Reviewed-by: Mark Wu -Tested-by: Douglas Schilling Landgraf -Reviewed-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5544 -Tested-by: Federico Simoncelli -Reviewed-by: Federico Simoncelli ---- - vds_bootstrap/vds_bootstrap.py | 6 +++--- - vdsm_reg/deployUtil.py.in | 31 +++++++------------------------ - 2 files changed, 10 insertions(+), 27 deletions(-) - -diff --git a/vds_bootstrap/vds_bootstrap.py b/vds_bootstrap/vds_bootstrap.py -index 12e127e..9801459 100755 ---- a/vds_bootstrap/vds_bootstrap.py -+++ b/vds_bootstrap/vds_bootstrap.py -@@ -80,13 +80,13 @@ fedorabased = deployUtil.versionCompare(deployUtil.getOSVersion(), "16") >= 0 - - if rhel6based: - VDSM_NAME = "vdsm" -- VDSM_MIN_VER = VDSM_NAME + "-4.9" -+ VDSM_MIN_VER = "4.9" - KERNEL_VER = "2.6.32-.*.el6" - KERNEL_MIN_VER = 150 - MINIMAL_SUPPORTED_PLATFORM = "6.0" - else: - VDSM_NAME = "vdsm22" -- VDSM_MIN_VER = VDSM_NAME + "-4.5" -+ VDSM_MIN_VER = "4.5" - KERNEL_VER = "2.6.18-.*.el5" - KERNEL_MIN_VER = 159 - MINIMAL_SUPPORTED_PLATFORM = "5.5" -@@ -250,7 +250,7 @@ class Deploy: - rc = True - - try: -- rc = deployUtil.yumSearchVersion(VDSM_NAME, VDSM_MIN_VER, True) -+ rc = deployUtil.yumSearchVersion(VDSM_NAME, VDSM_MIN_VER) - except: - rc = False - logging.error("checkMajorVersion: Error searching for VDSM version!", -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 1adf1a5..1474196 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -1039,32 +1039,15 @@ def yumListPackages(pkgName): - my.preconf.debuglevel = 0 # Remove yum noise - return my.pkgSack.searchNevra(name=pkgName) - --def yumSearchVersion(pkgName, ver, startWith=True): -- """ -- Returns True is package exists in yum's db with the given version. -- Note: yum internal code has verEQ and verGT. We should use it ASAP. -- """ -- fReturn = False -+def yumSearchVersion(pkgName, ver): -+ "Return True if package exists in yum's db with the given version or higer" -+ import rpmUtils.miscutils - -- pkgs = yumListPackages(pkgName) -- if pkgs: -- for item in pkgs: -- if startWith: -- if str(item).startswith(ver): -- fReturn = True -- logging.debug("yumSearchVersion: pkg " + str(item) + " starts with: " + ver) -- else: -- logging.debug("yumSearchVersion: pkg " + str(item) + " does not start with: " + ver) -- else: -- if str(item) == ver: -- fReturn = True -- logging.debug("yumSearchVersion: pkg " + str(item) + " matches: " + ver) -- else: -- logging.debug("yumSearchVersion: pkg " + str(item) + " does not match: " + ver) -+ for pkg in yumListPackages(pkgName): -+ if rpmUtils.miscutils.compareVerOnly(pkg.ver, ver) >= 0: -+ return True - else: -- logging.debug("yumSearchVersion: package " + str(pkgName) + " not found!") -- -- return fReturn -+ return False - - ############################################################################################################# - # Host PKI functions. --- -1.7.1 - diff --git a/0004-Iterates-over-delete-candidates-networks-only-once.patch b/0004-Iterates-over-delete-candidates-networks-only-once.patch deleted file mode 100644 index 3cb42b4..0000000 --- a/0004-Iterates-over-delete-candidates-networks-only-once.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 165284de4e03fb72fb9e4ca811fbcc77618ff02d Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 4 Jun 2012 11:02:56 +0300 -Subject: [PATCH 04/17] Iterates over delete candidates networks only once - -Change-Id: Iec45c1cb3d76a70555e256f96c983e13a0518cbe -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5204 -Reviewed-by: Livnat Peer -Reviewed-by: Shu Ming -Tested-by: Dan Kenigsberg -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5546 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 26 ++++++++++++-------------- - 1 files changed, 12 insertions(+), 14 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index b37ff0f..3f2e5fe 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1010,26 +1010,23 @@ def setupNetworks(networks={}, bondings={}, **options): - networksAdded = [] - #bondingNetworks = {} # Reminder TODO - -- logger.info("Setting up network") -- logger.debug("Setting up network according to configuration: networks:%r, bondings:%r, options:%r" % (networks, bondings, options)) -+ logger.debug("Setting up network according to configuration: " -+ "networks:%r, bondings:%r, options:%r" % (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), -+ explicitBonding=options.get('explicitBonding', -+ False)) - - logger.debug("Applying...") - try: -- delnetworks = {} -- for network, networkAttrs in networks.iteritems(): -+ # Remove networks with 'remove' attribute -+ for network, networkAttrs in networks.items(): - if 'remove' in networkAttrs: -- delnetworks[network] = networkAttrs -- -- for network, networkAttrs in delnetworks.iteritems(): -- if networkAttrs.pop('remove', False): -- assert not networkAttrs -- -- logger.debug('Removing network %r'%network) -+ logger.debug("Removing network %r" % network) - delNetwork(network, configWriter=configWriter, force=force) - del networks[network] - -@@ -1041,12 +1038,13 @@ def setupNetworks(networks={}, bondings={}, **options): - d = dict(networkAttrs) - if 'bonding' in d: - d['nics'] = bondings[d['bonding']]['nics'] -- d['bondingOptions'] = bondings[d['bonding']].get('options', None) -+ d['bondingOptions'] = bondings[d['bonding']].get('options', -+ None) - else: - d['nics'] = [d.pop('nic')] - d['force'] = force - -- logger.debug('Adding network %r'%network) -+ logger.debug("Adding network %r" % network) - addNetwork(network, configWriter=configWriter, **d) - - if utils.tobool(options.get('connectivityCheck', True)): --- -1.7.1 - diff --git a/0005-options-translation-in-setupNetworks-is-not-relevant.patch b/0005-options-translation-in-setupNetworks-is-not-relevant.patch deleted file mode 100644 index a70cfca..0000000 --- a/0005-options-translation-in-setupNetworks-is-not-relevant.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 752dd81155caf00895d14fadc4aa1cbbc3e88364 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 4 Jun 2012 15:08:09 +0300 -Subject: [PATCH 05/17] 'options' translation in setupNetworks is not relevant - -Change-Id: I68871fe1a4112fd7223e794a1b67bf98e26c104c -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5205 -Reviewed-by: Dan Kenigsberg -Reviewed-by: Lei Li -Tested-by: Lei Li -Reviewed-by: Livnat Peer -Reviewed-on: http://gerrit.ovirt.org/5547 -Tested-by: Federico Simoncelli ---- - vdsm/API.py | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) - -diff --git a/vdsm/API.py b/vdsm/API.py -index c098b4b..70034aa 100644 ---- a/vdsm/API.py -+++ b/vdsm/API.py -@@ -1145,7 +1145,6 @@ class Global(object): - def setupNetworks(self, networks={}, bondings={}, options={}): - """Add a new network to this vds, replacing an old one.""" - -- self._translateOptionsToNew(options) - if not self._cif._networkSemaphore.acquire(blocking=False): - self.log.warn('concurrent network verb already executing') - return errCode['unavail'] --- -1.7.1 - diff --git a/0006-Minor-optimization-for-delNetwork.patch b/0006-Minor-optimization-for-delNetwork.patch deleted file mode 100644 index d142f96..0000000 --- a/0006-Minor-optimization-for-delNetwork.patch +++ /dev/null @@ -1,97 +0,0 @@ -From 4accdc21e59f573ec0135ceb0faeda1b452acb22 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 4 Jun 2012 20:23:28 +0300 -Subject: [PATCH 06/17] Minor optimization for delNetwork - -Change-Id: I66a37cb1100411af13197642bdb13ae745bc6e53 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5207 -Reviewed-by: Lei Li -Tested-by: Lei Li -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5548 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 31 +++++++++++++++++++------------ - 1 files changed, 19 insertions(+), 12 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 3f2e5fe..8d71375 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -736,22 +736,25 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - - if not utils.tobool(options.get('skipLibvirt', False)): - if network not in _netinfo.networks: -- raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, "Cannot delete network %r: It doesn't exist" % network) -+ raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, -+ "Cannot delete network %r: It doesn't exist" % network) - - nics, vlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(network) - bridged = _netinfo.networks[network]['bridged'] - else: - bridged = True - -- logging.info("Removing network %s with vlan=%s, bonding=%s, nics=%s. options=%s"%(network, vlan, bonding, nics, options)) -+ logging.info("Removing network %s with vlan=%s, bonding=%s, nics=%s," -+ "options=%s" % (network, vlan, bonding, nics, options)) - - if not utils.tobool(force): - if bonding: - validateBondingName(bonding) - if set(nics) != set(_netinfo.bondings[bonding]["slaves"]): -- raise ConfigNetworkError(ne.ERR_BAD_NIC, 'delNetwork: %s are not all nics enslaved to %s' % (nics, bonding)) -+ raise ConfigNetworkError(ne.ERR_BAD_NIC, -+ "delNetwork: %s are not all nics enslaved to %s" % \ -+ (nics, bonding)) - if vlan: -- #assertVlan(vlan) - validateVlanId(vlan) - if bridged: - assertBridgeClean(network, vlan, bonding, nics) -@@ -763,30 +766,34 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - configWriter.setNewMtu(network) - - removeLibvirtNetwork(network, log=False) -- # the deleted bridge should never be up at this stage. -+ # 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: -- raise ConfigNetworkError(ne.ERR_USED_BRIDGE, 'delNetwork: bridge %s still exists' % network) -+ raise ConfigNetworkError(ne.ERR_USED_BRIDGE, -+ "delNetwork: bridge %s still exists" % network) - - if network and bridged: - ifdown(network) - subprocess.call([constants.EXT_BRCTL, 'delbr', network]) - configWriter.removeBridge(network) -+ - if vlan: - vlandev = (bonding or nics[0]) + '.' + vlan - ifdown(vlandev) -- subprocess.call([constants.EXT_VCONFIG, 'rem', vlandev], stderr=subprocess.PIPE) -+ subprocess.call([constants.EXT_VCONFIG, 'rem', vlandev], -+ stderr=subprocess.PIPE) - configWriter.removeVlan(vlan, bonding or nics[0]) -+ - if bonding: - if not bridged or not bondingOtherUsers(network, vlan, bonding): - ifdown(bonding) -- if not bridged or not bondingOtherUsers(network, vlan, bonding): - configWriter.removeBonding(bonding) -+ - for nic in nics: -- if not bridged or not nicOtherUsers(network, vlan, bonding, nic): -+ nicUsers = nicOtherUsers(network, vlan, bonding, nic) -+ if not nicUsers: - ifdown(nic) -- if bridged and nicOtherUsers(network, vlan, bonding, nic): -- continue -- configWriter.removeNic(nic) -+ configWriter.removeNic(nic) - - def clientSeen(timeout): - start = time.time() --- -1.7.1 - diff --git a/0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch b/0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch deleted file mode 100644 index 93fd5ae..0000000 --- a/0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b66fdcfbfe9022aa6ec33df274a5a81a73d1af5f Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 4 Jun 2012 19:24:12 +0300 -Subject: [PATCH 07/17] Don't ignore bridgeless networks in ifaceUsers - -Change-Id: Id45b37683d52feebd1b31421c2a717695394147a -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5206 -Tested-by: Dan Kenigsberg -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5549 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 8 +++++--- - 1 files changed, 5 insertions(+), 3 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 8d71375..fc43d67 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -86,9 +86,11 @@ def ifaceUsers(iface): - "Returns a list of entities using the interface" - _netinfo = NetInfo() - users = set() -- for b, bdict in _netinfo.networks.iteritems(): -- if bdict['bridged'] and iface in bdict['ports']: -- users.add(b) -+ for n, ndict in _netinfo.networks.iteritems(): -+ if ndict['bridged'] and iface in ndict['ports']: -+ users.add(n) -+ elif not ndict['bridged'] and iface == ndict['interface']: -+ users.add(n) - for b, bdict in _netinfo.bondings.iteritems(): - if iface in bdict['slaves']: - users.add(b) --- -1.7.1 - diff --git a/0008-Minor-optimization-for-addNetwork.patch b/0008-Minor-optimization-for-addNetwork.patch deleted file mode 100644 index 4d711f4..0000000 --- a/0008-Minor-optimization-for-addNetwork.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 5bdaa7c0a1cc696ed4e1d492d9af576fd8c8e4eb Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Wed, 6 Jun 2012 09:25:03 +0300 -Subject: [PATCH 08/17] Minor optimization for addNetwork - -Change-Id: I5506140ccd065d76a77414593635598f26289829 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5208 -Reviewed-by: Lei Li -Tested-by: Lei Li -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5550 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 21 ++++++++------------- - 1 files changed, 8 insertions(+), 13 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index fc43d67..89b3047 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -613,32 +613,27 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - ifdown(nic) - - if bridged: -- configWriter.addBridge(network, ipaddr=ipaddr, netmask=netmask, mtu=mtu, -- gateway=gateway, **options) -+ configWriter.addBridge(network, ipaddr=ipaddr, netmask=netmask, -+ mtu=mtu, gateway=gateway, **options) - ifdown(network) - -- # since we have vlan device, it is connected to the bridge. other -- # interfaces should be connected to the bridge through vlan, and not directly. -- brName = network if bridged and not vlan else None -+ brName = network if bridged else None - - # nics must be activated in the same order of boot time to expose the correct - # MAC address. - for nic in nicSort(nics): -- if not bonding and bridged: -- configWriter.addNic(nic, bridge=brName, mtu=max(prevmtu, mtu)) -+ configWriter.addNic(nic, bonding=bonding, bridge=brName, mtu=max(prevmtu, mtu)) - ifup(nic) - if bonding: - configWriter.addBonding(bonding, bridge=brName, bondingOptions=bondingOptions, mtu=mtu) -- for nic in nics: -- configWriter.addNic(nic, bonding=bonding, mtu=max(prevmtu, mtu)) - ifup(bonding) -+ - if vlan: - iface += '.' + vlan -- configWriter.addVlan(vlan, bonding or nics[0], network=network if bridged else None, mtu=mtu, bridged=bridged) -- # since we have vlan device, it is connected to the network. other -- # interfaces should be connected to the network through vlan, and not -- # directly. -+ configWriter.addVlan(vlan, bonding or nics[0], network=brName, -+ mtu=mtu, bridged=bridged) - ifup((bonding or nics[0]) + '.' + vlan) -+ - if bridged: - if options.get('bootproto') == 'dhcp' and not utils.tobool(options.get('blockingdhcp')): - # wait for dhcp in another thread, so vdsm won't get stuck (BZ#498940) --- -1.7.1 - diff --git a/0009-Use-already-known-iface-in-addNetwork.patch b/0009-Use-already-known-iface-in-addNetwork.patch deleted file mode 100644 index 09ea6db..0000000 --- a/0009-Use-already-known-iface-in-addNetwork.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 16e43715e9731db46b4ea519eb4c0c1294bf18a4 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Tue, 12 Jun 2012 15:38:27 +0300 -Subject: [PATCH 09/17] Use already known iface in addNetwork - -Change-Id: I085792401a04d7695855e81b16b442e4c31ab706 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5283 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5551 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 89b3047..87b32ed 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -629,10 +629,10 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - ifup(bonding) - - if vlan: -- iface += '.' + vlan -- configWriter.addVlan(vlan, bonding or nics[0], network=brName, -+ configWriter.addVlan(vlan, iface, network=brName, - mtu=mtu, bridged=bridged) -- ifup((bonding or nics[0]) + '.' + vlan) -+ iface += '.' + vlan -+ ifup(iface) - - if bridged: - if options.get('bootproto') == 'dhcp' and not utils.tobool(options.get('blockingdhcp')): --- -1.7.1 - diff --git a/0010-Use-proper-MTU-on-bonding-when-add-network.patch b/0010-Use-proper-MTU-on-bonding-when-add-network.patch deleted file mode 100644 index 7a24e2d..0000000 --- a/0010-Use-proper-MTU-on-bonding-when-add-network.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 34a348e500b2c0f50f3de3095db8aa7d61f2953a Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Wed, 6 Jun 2012 14:16:37 +0300 -Subject: [PATCH 10/17] Use proper MTU on bonding when add network - -Change-Id: Id34f2462ddfc2c9f4a323235c79f919c0cce12a7 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5209 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5552 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 87b32ed..5353d0e 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -622,10 +622,13 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - # nics must be activated in the same order of boot time to expose the correct - # MAC address. - for nic in nicSort(nics): -- configWriter.addNic(nic, bonding=bonding, bridge=brName, mtu=max(prevmtu, mtu)) -+ configWriter.addNic(nic, bonding=bonding, bridge=brName, -+ mtu=max(prevmtu, mtu)) - ifup(nic) - if bonding: -- configWriter.addBonding(bonding, bridge=brName, bondingOptions=bondingOptions, mtu=mtu) -+ configWriter.addBonding(bonding, bridge=brName, -+ bondingOptions=bondingOptions, -+ mtu=max(prevmtu, mtu)) - ifup(bonding) - - if vlan: --- -1.7.1 - diff --git a/0011-Add-bridge-on-top-of-VLAN-if-exists.patch b/0011-Add-bridge-on-top-of-VLAN-if-exists.patch deleted file mode 100644 index a566e93..0000000 --- a/0011-Add-bridge-on-top-of-VLAN-if-exists.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 69af2fcbdedfe6eab77c4c748a911caa78366590 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Tue, 12 Jun 2012 16:03:04 +0300 -Subject: [PATCH 11/17] Add bridge on top of VLAN if exists - -In VLAN case we should attach bridge only to the VLAN -rather than to underlying NICs or bond - -Change-Id: I1c554853b5be9330933174da810b6d67c83eb96e -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5284 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5553 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 11 +++++++---- - 1 files changed, 7 insertions(+), 4 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 5353d0e..97aec7c 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -617,16 +617,19 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - mtu=mtu, gateway=gateway, **options) - ifdown(network) - -+ # For VLAN we should attach bridge only to the VLAN device -+ # rather than to underlying NICs or bond - brName = network if bridged else None -+ bridgeForNic = None if vlan else brName - -- # nics must be activated in the same order of boot time to expose the correct -- # MAC address. -+ # NICs must be activated in the same order of boot time -+ # to expose the correct MAC address. - for nic in nicSort(nics): -- configWriter.addNic(nic, bonding=bonding, bridge=brName, -+ configWriter.addNic(nic, bonding=bonding, bridge=bridgeForNic, - mtu=max(prevmtu, mtu)) - ifup(nic) - if bonding: -- configWriter.addBonding(bonding, bridge=brName, -+ configWriter.addBonding(bonding, bridge=bridgeForNic, - bondingOptions=bondingOptions, - mtu=max(prevmtu, mtu)) - ifup(bonding) --- -1.7.1 - diff --git a/0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch b/0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch deleted file mode 100644 index 2f2ae71..0000000 --- a/0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch +++ /dev/null @@ -1,30 +0,0 @@ -From b5198d7ea6325374ad166043cf8597a148870a14 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 11 Jun 2012 19:37:58 +0300 -Subject: [PATCH 12/17] BZ#830485 - Add netConfigDirty bit to getVdsCaps report - -Change-Id: Iba641a74d33157186ddc6ceb6196b531953c9c8b -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5257 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5554 -Tested-by: Federico Simoncelli ---- - vdsm/API.py | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) - -diff --git a/vdsm/API.py b/vdsm/API.py -index 70034aa..abb3510 100644 ---- a/vdsm/API.py -+++ b/vdsm/API.py -@@ -1073,6 +1073,7 @@ class Global(object): - Report host capabilities. - """ - c = caps.get() -+ c['netConfigDirty'] = str(self._cif._netConfigDirty) - - return {'status': doneCode, 'info': c} - --- -1.7.1 - diff --git a/0013-remove-flag-skipLibvirt.patch b/0013-remove-flag-skipLibvirt.patch deleted file mode 100644 index 5d9e8b7..0000000 --- a/0013-remove-flag-skipLibvirt.patch +++ /dev/null @@ -1,132 +0,0 @@ -From 325aa66a2c32a6889f199628f2aedfaba742cb00 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Wed, 13 Jun 2012 17:44:16 -0400 -Subject: [PATCH 13/17] remove flag skipLibvirt - -Currently, VDSM manage networks by it's own and uses libvirt to store the net definitions, not requiring any additional -flag as skipLibvirt. This patch will remove completely skipLibvirt flag. - -Change-Id: Id87c89f04912976797d629344238749a8562382b -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5262 -Reviewed-by: Shu Ming -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5555 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 29 ++++++++++------------------- - vdsm_reg/deployUtil.py.in | 5 ++--- - 2 files changed, 12 insertions(+), 22 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 97aec7c..effb279 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -238,8 +238,7 @@ class ConfigWriter(object): - s += 'NM_CONTROLLED=no\n' - BLACKLIST = ['TYPE', 'NAME', 'DEVICE', 'bondingOptions', - 'force', 'blockingdhcp', -- 'connectivityCheck', 'connectivityTimeout', -- 'skipLibvirt'] -+ 'connectivityCheck', 'connectivityTimeout'] - for k in set(kwargs.keys()).difference(set(BLACKLIST)): - if re.match('^[a-zA-Z_]\w*$', k): - s += '%s=%s\n' % (k.upper(), pipes.quote(kwargs[k])) -@@ -493,7 +492,7 @@ def validateVlanId(vlan): - - - def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, netmask, gateway, -- bondingOptions, bridged=True, skipLibvirt=False): -+ bondingOptions, bridged=True): - if (vlan or bonding) and not nics: - raise ConfigNetworkError(ne.ERR_BAD_PARAMS, 'vlan/bonding definition requires nics. got: %r'%(nics,)) - -@@ -502,12 +501,9 @@ def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, netmask - validateBridgeName(bridge) - if bridge in _netinfo.networks: - raise ConfigNetworkError(ne.ERR_USED_BRIDGE, 'Bridge already exists') -- elif not skipLibvirt: -+ - if bridge in _netinfo.getBridgelessNetworks(): - raise ConfigNetworkError(ne.ERR_USED_BRIDGE, 'network already exists') -- else: -- raise ConfigNetworkError(ne.ERR_BAD_PARAMS, -- 'bridgeless network can not be added when skip libvirt') - - # vlan - if vlan: -@@ -576,7 +572,6 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - gateway=None, force=False, configWriter=None, bondingOptions=None, bridged=True, **options): - nics = nics or () - _netinfo = NetInfo() -- skipLibvirt = utils.tobool(options.get('skipLibvirt', False)) - bridged = utils.tobool(bridged) - - if mtu: -@@ -588,7 +583,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - _addNetworkValidation(_netinfo, bridge=network if bridged else None, - vlan=vlan, bonding=bonding, nics=nics, ipaddr=ipaddr, - netmask=netmask, gateway=gateway, bondingOptions=bondingOptions, -- bridged=bridged, skipLibvirt=skipLibvirt) -+ bridged=bridged) - - logging.info("Adding network %s with vlan=%s, bonding=%s, nics=%s," - " bondingOptions=%s, mtu=%s, bridged=%s, options=%s", -@@ -650,8 +645,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - ifup(network) - - # add libvirt network -- if not skipLibvirt: -- createLibvirtNetwork(network, bridged, iface) -+ createLibvirtNetwork(network, bridged, iface) - - def createLibvirtNetwork(network, bridged=True, iface=None): - conn = libvirtconnection.get() -@@ -737,15 +731,12 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - - validateBridgeName(network) - -- if not utils.tobool(options.get('skipLibvirt', False)): -- if network not in _netinfo.networks: -- raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, -- "Cannot delete network %r: It doesn't exist" % network) -+ if network not in _netinfo.networks: -+ raise ConfigNetworkError(ne.ERR_BAD_BRIDGE, -+ "Cannot delete network %r: It doesn't exist" % network) - -- nics, vlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(network) -- bridged = _netinfo.networks[network]['bridged'] -- else: -- bridged = True -+ nics, vlan, bonding = _netinfo.getNicsVlanAndBondingForNetwork(network) -+ bridged = _netinfo.networks[network]['bridged'] - - logging.info("Removing network %s with vlan=%s, bonding=%s, nics=%s," - "options=%s" % (network, vlan, bonding, nics, options)) -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 1474196..2f240cc 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -894,7 +894,7 @@ def makeBridge(vdcName, vdsmDir): - #Delete existing bridge in oVirt - if fReturn and fIsOvirt: - try: -- out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_DEL), mgtBridge, vlan, bonding, nic] + ['skipLibvirt=True']) -+ out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_DEL), mgtBridge, vlan, bonding, nic]) - if ret: - if ret == 17: #ERR_BAD_BRIDGE - logging.debug("makeBridge Ignoring error of del existing bridge. out=" + out + "\nerr=" + str(err) + "\nret=" + str(ret)) -@@ -909,8 +909,7 @@ def makeBridge(vdcName, vdsmDir): - if fReturn: - try: - lstBridgeOptions.append('blockingdhcp=true') -- out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_ADD) , MGT_BRIDGE_NAME, vlan, bonding, nic] + lstBridgeOptions -- + ['skipLibvirt=True']) -+ out, err, ret = _logExec([os.path.join(vdsmDir, SCRIPT_NAME_ADD) , MGT_BRIDGE_NAME, vlan, bonding, nic] + lstBridgeOptions) - if ret: - fReturn = False - logging.debug("makeBridge Failed to add " + MGT_BRIDGE_NAME + " bridge out=" + out + "\nerr=" + str(err) + "\nret=" + str(ret)) --- -1.7.1 - diff --git a/0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch b/0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch deleted file mode 100644 index b091f0a..0000000 --- a/0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch +++ /dev/null @@ -1,140 +0,0 @@ -From ca7a6b1244f7a400bf5dc51a5d59662e5602534b Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Wed, 13 Jun 2012 12:18:02 +0300 -Subject: [PATCH 14/17] BZ#826873 - Allow to change bond without network attached to it - -Change-Id: I3770017d8e633ccf5f9cf9b41a93df57229c443e -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5312 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5556 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 64 ++++++++++++++++++++++++++++++++++++++++++++++++- - vdsm/netinfo.py | 4 +++ - 2 files changed, 67 insertions(+), 1 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index effb279..fce3e71 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -958,6 +958,52 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): - "Setup attached more than one network to bonding %s, some of which aren't vlans"%(bonding)) - - -+def _editBondings(bondings, configWriter): -+ """ Add/Edit bond interface """ -+ logger = logging.getLogger("_editBondings") -+ -+ _netinfo = NetInfo() -+ -+ for bond, bondAttrs in bondings.iteritems(): -+ logger.debug("Creating/Editing bond %s with attributes %s", -+ bond, bondAttrs) -+ if bond in _netinfo.bondings: -+ ifdown(bond) -+ # Take down all bond's NICs. -+ for nic in _netinfo.getNicsForBonding(bond): -+ ifdown(nic) -+ configWriter.removeNic(nic) -+ -+ # NICs must be activated in the same order of boot time -+ # to expose the correct MAC address. -+ for nic in nicSort(bondAttrs['nics']): -+ configWriter.addNic(nic, bonding=bond) -+ ifup(nic) -+ -+ configWriter.addBonding(bond, -+ bondingOptions=bondAttrs.get('options', None)) -+ ifup(bond) -+ -+def _removeBondings(bondings, configWriter): -+ """ Add/Edit bond interface """ -+ logger = logging.getLogger("_removeBondings") -+ -+ _netinfo = NetInfo() -+ -+ for bond, bondAttrs in bondings.items(): -+ if 'remove' in bondAttrs: -+ nics = _netinfo.getNicsForBonding(bond) -+ logger.debug("Removing bond %r with nics = %s", bond, nics) -+ ifdown(bond) -+ configWriter.removeBonding(bond) -+ -+ for nic in nics: -+ ifdown(nic) -+ configWriter.removeNic(nic) -+ -+ del bondings[bond] -+ -+ - def setupNetworks(networks={}, bondings={}, **options): - """Add/Edit/Remove configuration for networks and bondings. - -@@ -1009,7 +1055,6 @@ def setupNetworks(networks={}, bondings={}, **options): - _netinfo = NetInfo() - configWriter = ConfigWriter() - networksAdded = [] -- #bondingNetworks = {} # Reminder TODO - - logger.debug("Setting up network according to configuration: " - "networks:%r, bondings:%r, options:%r" % (networks, -@@ -1031,16 +1076,21 @@ def setupNetworks(networks={}, bondings={}, **options): - delNetwork(network, configWriter=configWriter, force=force) - del networks[network] - -+ handledBonds = set() - for network, networkAttrs in networks.items(): - if network in _netinfo.networks: - delNetwork(network, configWriter=configWriter, force=force) - else: - networksAdded.append(network) -+ - d = dict(networkAttrs) - if 'bonding' in d: - d['nics'] = bondings[d['bonding']]['nics'] - d['bondingOptions'] = bondings[d['bonding']].get('options', - None) -+ # Don't remove bondX from the bonding list here, -+ # because it may be in use for other networks -+ handledBonds.add(d['bonding']) - else: - d['nics'] = [d.pop('nic')] - d['force'] = force -@@ -1048,6 +1098,18 @@ def setupNetworks(networks={}, bondings={}, **options): - logger.debug("Adding network %r" % network) - addNetwork(network, configWriter=configWriter, **d) - -+ # Do not handle a bonding device twice. -+ # We already handled it before during addNetwork. -+ for bond in handledBonds: -+ 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) -+ - if utils.tobool(options.get('connectivityCheck', True)): - logger.debug('Checking connectivity...') - if not clientSeen(int(options.get('connectivityTimeout', -diff --git a/vdsm/netinfo.py b/vdsm/netinfo.py -index 05f8323..536b4c7 100644 ---- a/vdsm/netinfo.py -+++ b/vdsm/netinfo.py -@@ -339,6 +339,10 @@ class NetInfo(object): - if nic in bdict['slaves']: - yield b - -+ def getNicsForBonding(self, bond): -+ bondAttrs = self.bondings[bond] -+ return bondAttrs['slaves'] -+ - def getBondingForNic(self, nic): - bondings = list(self.getBondingsForNic(nic)) - if bondings: --- -1.7.1 - diff --git a/0015-BZ-830486-Allow-to-change-network-according-the-diff.patch b/0015-BZ-830486-Allow-to-change-network-according-the-diff.patch deleted file mode 100644 index 3fed28a..0000000 --- a/0015-BZ-830486-Allow-to-change-network-according-the-diff.patch +++ /dev/null @@ -1,47 +0,0 @@ -From d3c91bc345f27a78d17c836f04fe13f5d1be6856 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Sun, 10 Jun 2012 10:40:48 +0300 -Subject: [PATCH 15/17] BZ#830486 - Allow to change network according the diffs from previous state - -We may not receive any information about the bonding device if it is unchanged. -In this case vdsm shouldn't check the bond information of this network. - -Change-Id: I1ece66a351576d5789a8968ccda9e67f423b860c -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5211 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5557 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 15 +++++++++------ - 1 files changed, 9 insertions(+), 6 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index fce3e71..ab07da6 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1085,12 +1085,15 @@ def setupNetworks(networks={}, bondings={}, **options): - - d = dict(networkAttrs) - if 'bonding' in d: -- d['nics'] = bondings[d['bonding']]['nics'] -- d['bondingOptions'] = bondings[d['bonding']].get('options', -- None) -- # Don't remove bondX from the bonding list here, -- # because it may be in use for other networks -- handledBonds.add(d['bonding']) -+ # we may not receive any information -+ # about the bonding device if it is unchanged -+ if bondings: -+ d['nics'] = bondings[d['bonding']]['nics'] -+ d['bondingOptions'] = bondings[d['bonding']].get('options', -+ None) -+ # Don't remove bondX from the bonding list here, -+ # because it may be in use for other networks -+ handledBonds.add(d['bonding']) - else: - d['nics'] = [d.pop('nic')] - d['force'] = force --- -1.7.1 - diff --git a/0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch b/0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch deleted file mode 100644 index 8ca276b..0000000 --- a/0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 990be7c6e07646fb176d90f679baa691b28d279f Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Wed, 13 Jun 2012 16:10:58 +0300 -Subject: [PATCH 16/17] BZ#826467 - Allow to remove bond and attach network to NIC - -Change-Id: I0be3dafe6a0a65a09bf268c8c8c6ee6fd7ba1084 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5323 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5558 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 14 ++++++-------- - 1 files changed, 6 insertions(+), 8 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index ab07da6..0df6c8f 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1069,20 +1069,18 @@ def setupNetworks(networks={}, bondings={}, **options): - - logger.debug("Applying...") - try: -- # Remove networks with 'remove' attribute -- for network, networkAttrs in networks.items(): -- if 'remove' in networkAttrs: -- logger.debug("Removing network %r" % network) -- delNetwork(network, configWriter=configWriter, force=force) -- del networks[network] -- -- handledBonds = set() -+ # Remove edited networks and networks with 'remove' attribute - for network, networkAttrs in networks.items(): - if network in _netinfo.networks: -+ logger.debug("Removing network %r" % network) - delNetwork(network, configWriter=configWriter, force=force) -+ if 'remove' in networkAttrs: -+ del networks[network] - else: - networksAdded.append(network) - -+ handledBonds = set() -+ for network, networkAttrs in networks.iteritems(): - d = dict(networkAttrs) - if 'bonding' in d: - # we may not receive any information --- -1.7.1 - diff --git a/0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch b/0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch deleted file mode 100644 index 454538b..0000000 --- a/0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 0329fec019726434a3313cc2acbd5f23480f365b Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Tue, 19 Jun 2012 17:32:55 +0300 -Subject: [PATCH 17/17] Related to BZ#826873 - Allow to create bond without network - -Change-Id: Ic4bfababbc9b81d921b2e26be9e70d07aee7124e -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5487 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5559 -Tested-by: Federico Simoncelli ---- - vdsm/configNetwork.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 0df6c8f..8b831d6 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -950,7 +950,7 @@ def _validateNetworkSetup(networks={}, bondings={}, explicitBonding=False): - "Setup attached more than one network to nic %s, some of which aren't vlans"%(nic)) - - for bonding, bondingAttrs in bondings.iteritems(): -- networks = bondingAttrs['_networks'] -+ networks = bondingAttrs.get('_networks', {}) - if len(networks) > 1: - for network, networkAttrs in networks.iteritems(): - if not networkAttrs.get('vlan', None): --- -1.7.1 - diff --git a/0018-BZ-832577-node-can-t-be-approved.patch b/0018-BZ-832577-node-can-t-be-approved.patch deleted file mode 100644 index 1702ee5..0000000 --- a/0018-BZ-832577-node-can-t-be-approved.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 013b2208f20d1b7ce0b894fc54a41980c0afc62f Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Wed, 20 Jun 2012 15:48:03 -0400 -Subject: [PATCH 18/19] BZ#832577: node can't be approved - -Because of ovirt-node's readonly filesystem, directory creation at runtime has to be handled carefully. -/rhev/data-center used to be created by the vdsm rpm when it is installed. -It's now listed in vdsm.spec as %ghost which means it is *not* laid down by default. -At runtime, it fails to be created because of the read-only filesystem. - -Regression introduced by commit ee1e68d3416d8fd728df75c0a41dd3db48f9138d -Patch provided by: Mike Burns - -Change-Id: I3818661c886118d34620e5308434e57bad92913f -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5567 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - vdsm.spec.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm.spec.in b/vdsm.spec.in -index c567e65..3fd404e 100644 ---- a/vdsm.spec.in -+++ b/vdsm.spec.in -@@ -500,7 +500,7 @@ exit 0 - /lib/systemd/systemd-vdsmd - %{_unitdir}/vdsmd.service - %endif --%ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@ -+%dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@ - %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/hsm-tasks - %ghost %dir %attr(-, %{vdsm_user}, %{vdsm_group}) @vdsmrepo@/mnt - %dir %{_libexecdir}/%{vdsm_name} --- -1.7.10.2 - diff --git a/0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch b/0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch deleted file mode 100644 index 60aa0ea..0000000 --- a/0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 5982cb826a56ee322c7e5d6fbee479ff5b996561 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Sat, 23 Jun 2012 18:46:51 +0300 -Subject: [PATCH 19/19] BZ#824298 fix typo in keyword argument exc_info - -Change-Id: Iff2ba114298bc1223ae4969f5da0eb5a5ce8672e -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5617 -Reviewed-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5628 ---- - vdsm/configNetwork.py | 4 ++-- - vdsm/storage/image.py | 4 ++-- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 8b831d6..c535499 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1,4 +1,4 @@ --# Copyright 2011 Red Hat, Inc. -+# Copyright 2011-2012 Red Hat, Inc. - # - # 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 -@@ -673,7 +673,7 @@ def removeLibvirtNetwork(network, log=True): - except libvirt.libvirtError: - if log: - logging.debug('failed to remove libvirt network %s', netName, -- exec_info=True) -+ exc_info=True) - - def assertBridgeClean(bridge, vlan, bonding, nics): - brifs = os.listdir('/sys/class/net/%s/brif/' % bridge) -diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py -index 03c94dc..a868568 100644 ---- a/vdsm/storage/image.py -+++ b/vdsm/storage/image.py -@@ -1,5 +1,5 @@ - # --# Copyright 2009-2011 Red Hat, Inc. -+# Copyright 2009-2012 Red Hat, Inc. - # - # 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 -@@ -676,7 +676,7 @@ class Image: - raise - except Exception, e: - self.__cleanupMultimove(sdUUID=dstSdUUID, imgList=cleanup_candidates, postZero=postZero) -- self.log.error(e, exec_info=True) -+ self.log.error(e, exc_info=True) - raise se.CopyImageError("image=%s, src domain=%s, dst domain=%s: msg %s" % (imgUUID, srcSdUUID, dstSdUUID, str(e))) - - cleanup_candidates.append(imgUUID) --- -1.7.10.2 - diff --git a/0020-deployUtil-use-os.uname-instead-of-bin-uname.patch b/0020-deployUtil-use-os.uname-instead-of-bin-uname.patch deleted file mode 100644 index 02e9d3d..0000000 --- a/0020-deployUtil-use-os.uname-instead-of-bin-uname.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 1be9207d91f1f3df02161356f0057c24b6a230c3 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 19 Jun 2012 00:52:25 +0300 -Subject: [PATCH 20/25] deployUtil: use os.uname instead of /bin/uname - -simpler, quicker, and less error-prone. - -Change-Id: I7abc1f010bbf15b39d7590c4b55d1835c645a87f -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5636 -Tested-by: Douglas Schilling Landgraf -Reviewed-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5749 ---- - configure.ac | 1 - - vdsm_reg/deployUtil.py.in | 11 ++--------- - 2 files changed, 2 insertions(+), 10 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f3a609f..7b829f5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -177,7 +177,6 @@ AC_PATH_PROG([TC_PATH], [tc], [/sbin/tc]) - AC_PATH_PROG([TUNE2FS_PATH], [tune2fs], [/sbin/tune2fs]) - AC_PATH_PROG([UDEVADM_PATH], [udevadm], [/sbin/udevadm]) - AC_PATH_PROG([UMOUNT_PATH], [umount], [/bin/umount]) --AC_PATH_PROG([UNAME_PATH], [uname], [/bin/uname]) - AC_PATH_PROG([UNPERSIST_PATH], [unpersist], [/usr/sbin/unpersist]) - AC_PATH_PROG([VCONFIG_PATH], [vconfig], [/sbin/vconfig]) - AC_PATH_PROG([WGET_PATH], [wget], [/usr/bin/wget]) -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 2f240cc..7586aca 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -72,7 +72,6 @@ EX_RPM = '@RPM_PATH@' - EX_SED = '@SED_PATH@' - EX_SERVICE = '@SERVICE_PATH@' - EX_SYSTEMCTL = '@SYSTEMCTL_PATH@' --EX_UNAME = '@UNAME_PATH@' - EX_YUM = '@YUM_PATH@' - - # Other constants -@@ -400,15 +399,9 @@ def getOSVersion(): - return "Unknown OS" - - def getKernelVersion(): -- """ -- Return current kernel release. -- """ -- strReturn = '0' -- out, err, rc = _logExec([EX_UNAME, "-r"]) -- if not rc: -- strReturn = out -+ """Return current kernel version adn release.""" - -- return strReturn -+ return os.uname()[2] - - def updateKernelArgs(arg): - """ --- -1.7.10.2 - diff --git a/0021-deployUtil-slightly-saner-kernel-version-comparison.patch b/0021-deployUtil-slightly-saner-kernel-version-comparison.patch deleted file mode 100644 index 29fdb43..0000000 --- a/0021-deployUtil-slightly-saner-kernel-version-comparison.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 61672ca8a0d5140aa09ae79c5c0f7b962495a94e Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 19 Jun 2012 02:00:14 +0300 -Subject: [PATCH 21/25] deployUtil: slightly saner kernel version comparison - -Change-Id: If2348ce464943e873e31eb61d0aaaa8b936679b2 -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5637 -Reviewed-by: Douglas Schilling Landgraf -Tested-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/5750 ---- - vds_bootstrap/vds_bootstrap.py | 33 ++++++++------------------------- - vdsm_reg/deployUtil.py.in | 16 +++++++++++++--- - 2 files changed, 21 insertions(+), 28 deletions(-) - -diff --git a/vds_bootstrap/vds_bootstrap.py b/vds_bootstrap/vds_bootstrap.py -index 9801459..5ddc950 100755 ---- a/vds_bootstrap/vds_bootstrap.py -+++ b/vds_bootstrap/vds_bootstrap.py -@@ -48,7 +48,6 @@ import shutil - import logging - import logging.config - import random --import re - import ConfigParser - import socket - import tempfile -@@ -81,14 +80,12 @@ fedorabased = deployUtil.versionCompare(deployUtil.getOSVersion(), "16") >= 0 - if rhel6based: - VDSM_NAME = "vdsm" - VDSM_MIN_VER = "4.9" -- KERNEL_VER = "2.6.32-.*.el6" -- KERNEL_MIN_VER = 150 -+ KERNEL_MIN_VR = ("2.6.32", "150") - MINIMAL_SUPPORTED_PLATFORM = "6.0" - else: - VDSM_NAME = "vdsm22" - VDSM_MIN_VER = "4.5" -- KERNEL_VER = "2.6.18-.*.el5" -- KERNEL_MIN_VER = 159 -+ KERNEL_MIN_VR = ("2.6.18", "159") - MINIMAL_SUPPORTED_PLATFORM = "5.5" - - # Required packages -@@ -300,7 +297,6 @@ class Deploy: - """ - Check the compatibility of OS and kernel - """ -- kernel_ver = None - os_status = "FAIL" - kernel_status = "FAIL" - os_message = "Unsupported platform version" -@@ -329,34 +325,21 @@ class Deploy: - os_status = "OK" - - if self.rc: -- res = deployUtil.getKernelVersion() -- try: -- kernel_ver = res.split()[0] -- if re.match(KERNEL_VER, kernel_ver): -- kernel_ver = int(kernel_ver.split('-')[1].split('.')[0]) -- else: -- kernel_ver = 0 -- except: -- kernel_ver = 0 -- -- if fedorabased: -- kernel_status = "OK" -- kernel_message = "Skipped kernel version check" -- elif kernel_ver >= KERNEL_MIN_VER: -+ kernel_vr = deployUtil.getKernelVR() -+ if deployUtil.compareVR(kernel_vr, KERNEL_MIN_VR) >= 0: - kernel_status = "OK" -- kernel_message = "Supported kernel version: " + str(kernel_ver) -+ kernel_message = "Supported kernel version: " + str(kernel_vr) - else: - kernel_status = "FAIL" - kernel_message = ( -- "Unsupported kernel version: " + str(kernel_ver) + -- ". Minimal supported version: " + str(KERNEL_MIN_VER) -+ "Unsupported kernel version: " + str(kernel_vr) + -+ ". Minimal supported version: " + str(KERNEL_MIN_VR) - ) - self.rc = False - - if os_name is not None: - self._xmlOutput('OS', os_status, "type", os_name, os_message) -- if kernel_ver is not None: -- self._xmlOutput('KERNEL', kernel_status, "version", kernel_ver, kernel_message) -+ self._xmlOutput('KERNEL', kernel_status, "version", '-'.join(kernel_vr), kernel_message) - - return self.rc - -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 7586aca..6bd4b3d 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -398,10 +398,20 @@ def getOSVersion(): - logging.error('failed to parse os release from `%s`.', s, exc_info=True) - return "Unknown OS" - --def getKernelVersion(): -- """Return current kernel version adn release.""" -+def getKernelVR(): -+ """Return current kernel version and release.""" - -- return os.uname()[2] -+ components = os.uname()[2].split('-', 1) -+ if len(components) == 2: -+ return components -+ else: -+ return components[0], '0' -+ -+def compareVR(vr1, vr2): -+ import rpmUtils.miscutils -+ -+ return rpmUtils.miscutils.compareEVR((0, vr1[0], vr1[1]), -+ (0, vr2[0], vr2[1])) - - def updateKernelArgs(arg): - """ --- -1.7.10.2 - diff --git a/0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch b/0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch deleted file mode 100644 index 61d75a7..0000000 --- a/0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 44a2eba8d6c7a7ea9e78454388b859304398ec8d Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Wed, 27 Jun 2012 10:37:28 +0300 -Subject: [PATCH 22/25] BZ#835784 - Allow to create a network on top of - existing bond in additional to create a new bond and - network - -If we already have a bond0 with (eth1, eth2) and now we want to create -network "bridge_woVlan" on top of it and in additional we want to create -a new bond1 with (eth3, eth4) and create a network "bridge_woVlan_2" on -top of bond 1. -This patch will allow us to do it in the same setupNetwork command. - -Change-Id: I67d24d656934ea9dcb0a8209c6a375e19c23f82b -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5737 -Reviewed-on: http://gerrit.ovirt.org/5759 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - vdsm/configNetwork.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index c535499..d4e1177 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1085,7 +1085,7 @@ def setupNetworks(networks={}, bondings={}, **options): - if 'bonding' in d: - # we may not receive any information - # about the bonding device if it is unchanged -- if bondings: -+ if bondings.get(d['bonding']): - d['nics'] = bondings[d['bonding']]['nics'] - d['bondingOptions'] = bondings[d['bonding']].get('options', - None) --- -1.7.10.2 - diff --git a/0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch b/0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch deleted file mode 100644 index 0591e56..0000000 --- a/0023-BZ-833119-Allow-to-create-VLANed-network-on-top-of-e.patch +++ /dev/null @@ -1,77 +0,0 @@ -From 16d2eff4fc41a2a8c87923ed9d5d97cca3037144 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Wed, 20 Jun 2012 16:36:08 +0300 -Subject: [PATCH 23/25] BZ#833119 - Allow to create VLANed network on top of - existing bond - -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. - -Change-Id: If45aed68847f5a79380c629a70290a2c687cbd30 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5456 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5760 ---- - vdsm/configNetwork.py | 23 ++++++++++++++++------- - 1 file changed, 16 insertions(+), 7 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index d4e1177..8c4d36d 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -238,7 +238,8 @@ class ConfigWriter(object): - s += 'NM_CONTROLLED=no\n' - BLACKLIST = ['TYPE', 'NAME', 'DEVICE', 'bondingOptions', - 'force', 'blockingdhcp', -- 'connectivityCheck', 'connectivityTimeout'] -+ 'connectivityCheck', 'connectivityTimeout', -+ 'implicitBonding'] - for k in set(kwargs.keys()).difference(set(BLACKLIST)): - if re.match('^[a-zA-Z_]\w*$', k): - s += '%s=%s\n' % (k.upper(), pipes.quote(kwargs[k])) -@@ -491,10 +492,17 @@ def validateVlanId(vlan): - raise ConfigNetworkError(ne.ERR_BAD_VLAN, 'vlan id must be a number') - - --def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, netmask, gateway, -- bondingOptions, bridged=True): -- if (vlan or bonding) and not nics: -- raise ConfigNetworkError(ne.ERR_BAD_PARAMS, 'vlan/bonding definition requires nics. got: %r'%(nics,)) -+def _addNetworkValidation(_netinfo, bridge, vlan, bonding, nics, ipaddr, -+ netmask, gateway, bondingOptions, bridged=True, -+ implicitBonding=False): -+ # 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 -+ if bonding and implicitBonding: -+ pass -+ elif (vlan or bonding) and not nics: -+ raise ConfigNetworkError(ne.ERR_BAD_PARAMS, -+ 'vlan/bonding definition requires nics. got: %r' % (nics,)) - - # Check bridge - if bridged: -@@ -583,7 +591,7 @@ def addNetwork(network, vlan=None, bonding=None, nics=None, ipaddr=None, netmask - _addNetworkValidation(_netinfo, bridge=network if bridged else None, - vlan=vlan, bonding=bonding, nics=nics, ipaddr=ipaddr, - netmask=netmask, gateway=gateway, bondingOptions=bondingOptions, -- bridged=bridged) -+ bridged=bridged, **options) - - logging.info("Adding network %s with vlan=%s, bonding=%s, nics=%s," - " bondingOptions=%s, mtu=%s, bridged=%s, options=%s", -@@ -1097,7 +1105,8 @@ def setupNetworks(networks={}, bondings={}, **options): - d['force'] = force - - logger.debug("Adding network %r" % network) -- addNetwork(network, configWriter=configWriter, **d) -+ addNetwork(network, configWriter=configWriter, -+ implicitBonding=True, **d) - - # Do not handle a bonding device twice. - # We already handled it before during addNetwork. --- -1.7.10.2 - diff --git a/0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch b/0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch deleted file mode 100644 index ed2d15f..0000000 --- a/0024-BZ-833803-Avoid-bond-breaking-after-network-detach.patch +++ /dev/null @@ -1,72 +0,0 @@ -From 66cf76b0d2dc362bb698df2b0ec491a54dc55d5c Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Mon, 25 Jun 2012 17:46:43 +0300 -Subject: [PATCH 24/25] BZ#833803 - Avoid bond breaking after network detach - -The (relatively) new setupNetwork verb allows to remove a network -defined on top of an bonding device without break the bond itself. - -Change-Id: Idebd0cd0a9d54ceb3714a8cd82fe042ed2c05f2e -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5711 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5761 ---- - vdsm/configNetwork.py | 26 +++++++++++++++----------- - 1 file changed, 15 insertions(+), 11 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 8c4d36d..96dd452 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -734,7 +734,7 @@ def listNetworks(): - print "Bondings:", _netinfo.bondings.keys() - - def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, -- configWriter=None, **options): -+ configWriter=None, implicitBonding=True, **options): - _netinfo = NetInfo() - - validateBridgeName(network) -@@ -786,16 +786,19 @@ def delNetwork(network, vlan=None, bonding=None, nics=None, force=False, - stderr=subprocess.PIPE) - configWriter.removeVlan(vlan, bonding or nics[0]) - -- if bonding: -- if not bridged or not bondingOtherUsers(network, vlan, bonding): -- ifdown(bonding) -- configWriter.removeBonding(bonding) -+ # The (relatively) new setupNetwork verb allows to remove a network -+ # defined on top of an bonding device without break the bond itself. -+ if implicitBonding: -+ if bonding: -+ if not bridged or not bondingOtherUsers(network, vlan, bonding): -+ ifdown(bonding) -+ configWriter.removeBonding(bonding) - -- for nic in nics: -- nicUsers = nicOtherUsers(network, vlan, bonding, nic) -- if not nicUsers: -- ifdown(nic) -- configWriter.removeNic(nic) -+ for nic in nics: -+ nicUsers = nicOtherUsers(network, vlan, bonding, nic) -+ if not nicUsers: -+ ifdown(nic) -+ configWriter.removeNic(nic) - - def clientSeen(timeout): - start = time.time() -@@ -1081,7 +1084,8 @@ def setupNetworks(networks={}, bondings={}, **options): - for network, networkAttrs in networks.items(): - if network in _netinfo.networks: - logger.debug("Removing network %r" % network) -- delNetwork(network, configWriter=configWriter, force=force) -+ delNetwork(network, configWriter=configWriter, force=force, -+ implicitBonding=False) - if 'remove' in networkAttrs: - del networks[network] - else: --- -1.7.10.2 - diff --git a/0025-Handle-bond-properly-if-connectivity-check-fail.patch b/0025-Handle-bond-properly-if-connectivity-check-fail.patch deleted file mode 100644 index fe27672..0000000 --- a/0025-Handle-bond-properly-if-connectivity-check-fail.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 31eac2c98a865a94803785fa660b612d5231c5c4 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -Date: Tue, 26 Jun 2012 15:41:37 +0300 -Subject: [PATCH 25/25] Handle bond properly if connectivity check fail. - -We need to be able remove a new added network if connectivity check fail. -If a new network needs to be created on top of existing bond, -we will need to keep the bond on rollback flow, -else we will break the new created bond - -Change-Id: I4bb04f6f3b8d5cdbfd9af8904570af071af6d4f4 -Signed-off-by: Igor Lvovsky -Reviewed-on: http://gerrit.ovirt.org/5712 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5762 ---- - vdsm/configNetwork.py | 16 +++++++++++++--- - 1 file changed, 13 insertions(+), 3 deletions(-) - -diff --git a/vdsm/configNetwork.py b/vdsm/configNetwork.py -index 96dd452..af6c19d 100755 ---- a/vdsm/configNetwork.py -+++ b/vdsm/configNetwork.py -@@ -1065,7 +1065,13 @@ def setupNetworks(networks={}, bondings={}, **options): - try: - _netinfo = NetInfo() - configWriter = ConfigWriter() -- networksAdded = [] -+ networksAdded = set() -+ # keep set netsWithNewBonds to be able remove -+ # a new added network if connectivity check fail. -+ # If a new network needs to be created on top of existing bond, -+ # we will need to keep the bond on rollback flow, -+ # else we will break the new created bond. -+ netsWithNewBonds = set() - - logger.debug("Setting up network according to configuration: " - "networks:%r, bondings:%r, options:%r" % (networks, -@@ -1089,7 +1095,7 @@ def setupNetworks(networks={}, bondings={}, **options): - if 'remove' in networkAttrs: - del networks[network] - else: -- networksAdded.append(network) -+ networksAdded.add(network) - - handledBonds = set() - for network, networkAttrs in networks.iteritems(): -@@ -1104,6 +1110,9 @@ def setupNetworks(networks={}, bondings={}, **options): - # Don't remove bondX from the bonding list here, - # because it may be in use for other networks - handledBonds.add(d['bonding']) -+ # we create a new bond -+ if network in networksAdded: -+ netsWithNewBonds.add(network) - else: - d['nics'] = [d.pop('nic')] - d['force'] = force -@@ -1130,7 +1139,8 @@ def setupNetworks(networks={}, bondings={}, **options): - CONNECTIVITY_TIMEOUT_DEFAULT))): - logger.info('Connectivity check failed, rolling back') - for network in networksAdded: -- delNetwork(network, force=True) -+ delNetwork(network, force=True, -+ implicitBonding=network in netsWithNewBonds) - raise ConfigNetworkError(ne.ERR_LOST_CONNECTION, - 'connectivity check failed') - except: --- -1.7.10.2 - diff --git a/0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch b/0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch deleted file mode 100644 index 62d3f85..0000000 --- a/0026-BZ-806555-having-etc-ovirt-node-means-it-is-a-node.patch +++ /dev/null @@ -1,38 +0,0 @@ -From b1a0e712b394496544bbb62f9466a8aa75f4c669 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -Date: Tue, 26 Jun 2012 15:43:33 +0300 -Subject: [PATCH 26/26] BZ#806555 having /etc/ovirt-node-* means it is a node - -Not vice versa. - -This patch fixes http://gerrit.ovirt.org/3055 . - -Change-Id: Id13c5621a2ff1c8bdcfc1e40a27951efb0d75cfe -Signed-off-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/5713 -Reviewed-by: Michael Burns -Reviewed-by: Douglas Schilling Landgraf -Tested-by: Ofer Schreiber -Reviewed-on: http://gerrit.ovirt.org/5768 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm/caps.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vdsm/caps.py b/vdsm/caps.py -index 5950ee9..5c9fa78 100644 ---- a/vdsm/caps.py -+++ b/vdsm/caps.py -@@ -156,7 +156,7 @@ def _getIscsiIniName(): - def getos(): - if os.path.exists('/etc/rhev-hypervisor-release'): - return OSName.RHEVH -- elif len(glob.glob('/etc/ovirt-node-*-release')) == 0: -+ elif glob.glob('/etc/ovirt-node-*-release'): - return OSName.OVIRT - elif os.path.exists('/etc/fedora-release'): - return OSName.FEDORA --- -1.7.10.2 - diff --git a/0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch b/0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch deleted file mode 100644 index 17e09ab..0000000 --- a/0027-bump-libvirt-version-to-fix-readonly-lease-unsupport.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ada1caae80ef463d511395ccbd0cb773b3e8b8b6 Mon Sep 17 00:00:00 2001 -From: lvroyce -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 -Reviewed-on: http://gerrit.ovirt.org/5787 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - 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 deleted file mode 100644 index c133b68..0000000 --- a/0028-BZ-832199-move-selinux-from-init-to-spec.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 16ad84b47fac0e325073e1b08e99a364c7850699 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -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 -Reviewed-on: http://gerrit.ovirt.org/5614 -Reviewed-by: Dan Kenigsberg ---- - 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@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 deleted file mode 100644 index 41d95ee..0000000 --- a/0029-BZ-838097-_addNetworkValidation-do-not-explode-if-ST.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 34f080dd8b7456248ed2e2693030cf736e097606 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -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 -Reviewed-on: http://gerrit.ovirt.org/5885 -Reviewed-by: Igor Lvovsky -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 deleted file mode 100644 index 4cc9980..0000000 --- a/0030-ovirt_functions-fix-elif-statement.patch +++ /dev/null @@ -1,39 +0,0 @@ -From fe88d1834032776638fc41c9fc96123923e1432a Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -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 -Reviewed-on: http://gerrit.ovirt.org/6072 -Reviewed-by: Dan Kenigsberg ---- - 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 deleted file mode 100644 index df21615..0000000 --- a/0031-BZ-837443-removeBridge-drop-remove-interface.patch +++ /dev/null @@ -1,44 +0,0 @@ -From f1792cfb33bff5ef5c9a8c1f938ff92b00d192a8 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -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 -Reviewed-on: http://gerrit.ovirt.org/5914 -Reviewed-by: Igor Lvovsky -Reviewed-by: Dan Kenigsberg -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 deleted file mode 100644 index 77acbcb..0000000 --- a/0032-BZ-837443-replace-the-netinfo-import.patch +++ /dev/null @@ -1,199 +0,0 @@ -From a2e8aa85f270d5bd2390b07ac82710fa398c755b Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -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 -Reviewed-on: http://gerrit.ovirt.org/6205 -Reviewed-by: Dan Kenigsberg ---- - 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 = '''%s - ''' % (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 deleted file mode 100644 index 7973f79..0000000 --- a/0033-configNetwork-fix-NetInfo-call.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ce31be09f8e1ae3decaa5219d6ffdfb9a39115f9 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -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 -Reviewed-on: http://gerrit.ovirt.org/6206 -Reviewed-by: Dan Kenigsberg ---- - 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 deleted file mode 100644 index 0ca179c..0000000 --- a/0034-BZ-837443-removeVlan-drop-remove-interface.patch +++ /dev/null @@ -1,55 +0,0 @@ -From 229e294cf3649e03df7b9d876a918c9604ebbdc5 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -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 -Reviewed-on: http://gerrit.ovirt.org/6090 -Reviewed-by: Igor Lvovsky -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -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 deleted file mode 100644 index 14f4411..0000000 --- a/0035-BZ-837443-remove-bridge-before-add-VDSM-bridge.patch +++ /dev/null @@ -1,64 +0,0 @@ -From dbe23c6eb50b6dc59738dceb0ece78221cadcfd3 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -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 -Reviewed-on: http://gerrit.ovirt.org/6016 -Reviewed-by: Igor Lvovsky -Reviewed-by: Mark Wu -Reviewed-by: Dan Kenigsberg -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 deleted file mode 100644 index cdbdac7..0000000 --- a/0036-BZ-836954-Allow-to-break-bond-and-create-a-new-netwo.patch +++ /dev/null @@ -1,47 +0,0 @@ -From ee31f19b5340506bc73d9f2fc27366d5241c3ca2 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -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 -Reviewed-on: http://gerrit.ovirt.org/5841 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/6210 -Tested-by: Dan Kenigsberg ---- - 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 deleted file mode 100644 index c7fd1a2..0000000 --- a/0037-BZ-837054-Do-not-detach-network-from-the-bond-during.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 3060b9110bb37ee2b05356b37fde4d79b1e46c5f Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -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 -Reviewed-on: http://gerrit.ovirt.org/5970 -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/6213 -Tested-by: Dan Kenigsberg ---- - 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 deleted file mode 100644 index c8e2ef5..0000000 --- a/0038-Remove-redundant-explicitBonding-parameter-from-setu.patch +++ /dev/null @@ -1,115 +0,0 @@ -From 5cb2be8ed2406928525072360c3a2571229415f9 Mon Sep 17 00:00:00 2001 -From: Igor Lvovsky -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 -Reviewed-on: http://gerrit.ovirt.org/5840 -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg -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= - bonding="" | nic="" - (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=["" , "", ...] - options="" - -- OR -- -@@ -1060,20 +1052,12 @@ def setupNetworks(networks={}, bondings={}, **options): - force=0|1 - connectivityCheck=0|1 - connectivityTimeout= -- 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 deleted file mode 100644 index 8af3bae..0000000 --- a/0039-configNet-clear-up-atomicBackup-arg.patch +++ /dev/null @@ -1,41 +0,0 @@ -From df7e06353bcd1c48304884384e5d8575747a3b7a Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -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 -Reviewed-on: http://gerrit.ovirt.org/5953 -Reviewed-by: Igor Lvovsky -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 deleted file mode 100644 index 367e3a5..0000000 --- a/0040-configNet-atomicBackup-remove-new-files-upon-restore.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 72580d30893de15fea9af0050e989bc6d33e3216 Mon Sep 17 00:00:00 2001 -From: Dan Kenigsberg -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 -Reviewed-on: http://gerrit.ovirt.org/5952 -Reviewed-by: Igor Lvovsky -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/0041-BZ-842948-deployUtil-safely-remove-bridge.patch b/0041-BZ-842948-deployUtil-safely-remove-bridge.patch deleted file mode 100644 index 8741a36..0000000 --- a/0041-BZ-842948-deployUtil-safely-remove-bridge.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 15d46e0809e27eb39fde58fb47a0b3914f1d0c90 Mon Sep 17 00:00:00 2001 -From: Douglas Schilling Landgraf -Date: Tue, 31 Jul 2012 19:36:53 -0400 -Subject: [PATCH 41/41] BZ#842948: deployUtil - safely remove bridge - -deployUtil calls /usr/share/vdsm/delNetwork to remove previously created bridge. -This patch will add ovirtfunctions.ovirt_safe_delete_config() to safely remove -bridge config files in oVirt Node. - -Change-Id: I6e9b00ee4a38ebe7d5011e36bd9d3f7362cf26cd -Signed-off-by: Douglas Schilling Landgraf -Reviewed-on: http://gerrit.ovirt.org/6798 -Reviewed-by: Dan Kenigsberg ---- - vdsm_reg/deployUtil.py.in | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) - -diff --git a/vdsm_reg/deployUtil.py.in b/vdsm_reg/deployUtil.py.in -index 6bd4b3d..62aef01 100644 ---- a/vdsm_reg/deployUtil.py.in -+++ b/vdsm_reg/deployUtil.py.in -@@ -904,6 +904,8 @@ def makeBridge(vdcName, vdsmDir): - else: - fReturn = False - logging.debug("makeBridge Failed to del existing bridge. out=" + out + "\nerr=" + str(err) + "\nret=" + str(ret)) -+ else: -+ ovirtfunctions.ovirt_safe_delete_config(IFACE_CONFIG + mgtBridge) - except: - fReturn = False - logging.debug("makeBridge Failed to del existing bridge. out=" + out + "\nerr=" + str(err) + "\nret=" + str(ret)) --- -1.7.7.6 - diff --git a/0042-Ship-the-version-file-with-the-tarballs.patch b/0042-Ship-the-version-file-with-the-tarballs.patch deleted file mode 100644 index 905e8a5..0000000 --- a/0042-Ship-the-version-file-with-the-tarballs.patch +++ /dev/null @@ -1,147 +0,0 @@ -From 0b3cd04300005c995d20306446a2ab804d74b6be Mon Sep 17 00:00:00 2001 -From: Federico Simoncelli -Date: Fri, 17 Aug 2012 05:23:38 -0400 -Subject: [PATCH] Ship the version file with the tarballs - -Shipping the VERSION file allows running the autoreconf tool also from a -tarball package (no need of the entire git repository). - -In this patch: -* generate and ship the VERSION file -* move, unify (and ship) version.sh and release.sh in pkg-version -* use the VERSION file when the git repository is not available - (eg: tarball) - -Signed-off-by: Federico Simoncelli -Change-Id: I8b72a1740803a9401e4b5a4504a4faa07c29f2b9 -Reviewed-on: http://gerrit.ovirt.org/7295 -Reviewed-by: Douglas Schilling Landgraf -Reviewed-by: Alon Bar-Lev -Reviewed-by: Dan Kenigsberg -Tested-by: Dan Kenigsberg ---- - Makefile.am | 13 +++++++++++-- - build-aux/pkg-version | 39 +++++++++++++++++++++++++++++++++++++++ - configure.ac | 4 ++-- - VERSION | 1 + - 4 files changed, 52 insertions(+), 34 deletions(-) - create mode 100755 build-aux/pkg-version - create mode 100644 VERSION - delete mode 100755 build-aux/release.sh - delete mode 100755 build-aux/version.sh - -diff --git a/Makefile.am b/Makefile.am -index ab9b240..2b6d273 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -25,6 +25,7 @@ include $(top_srcdir)/build-aux/Makefile.subs - # This is an *exception*, we ship also vdsm.spec so it's possible to build the - # rpm from the tarball. - EXTRA_DIST = \ -+ build-aux/pkg-version \ - vdsm.spec \ - vdsm.spec.in - -@@ -80,11 +81,11 @@ rpm: dist - rpmbuild -ta $(if $(BUILDID),--define="extra_release .$(BUILDID)") \ - $(WITH_HOOKS) $(DIST_ARCHIVES) - --dist-hook: gen-ChangeLog -+dist-hook: gen-VERSION gen-ChangeLog -+.PHONY: gen-VERSION gen-ChangeLog - - # Generate the ChangeLog file and insert it into the directory - # we're about to use to create a tarball. --.PHONY: gen-ChangeLog - gen-ChangeLog: - if test -d .git; then \ - $(top_srcdir)/build-aux/gitlog-to-changelog \ -@@ -92,3 +93,11 @@ gen-ChangeLog: - rm -f $(distdir)/ChangeLog; \ - mv $(distdir)/cl-t $(distdir)/ChangeLog; \ - fi -+ -+gen-VERSION: -+ if test -d .git; then \ -+ $(top_srcdir)/build-aux/pkg-version --full \ -+ > $(distdir)/ve-t; \ -+ rm -f $(distdir)/VERSION; \ -+ mv $(distdir)/ve-t $(distdir)/VERSION; \ -+ fi -diff --git a/build-aux/pkg-version b/build-aux/pkg-version -new file mode 100755 -index 0000000..a8d9d77 ---- /dev/null -+++ b/build-aux/pkg-version -@@ -0,0 +1,39 @@ -+#!/bin/sh -+ -+# tags and output versions: -+# - v4.9.0 => 4.9.0 (upstream clean) -+# - v4.9.0-1 => 4.9.0 (downstream clean) -+# - v4.9.0-2-g34e62f => 4.9.0 (upstream dirty) -+# - v4.9.0-1-2-g34e62f => 4.9.0 (downstream dirty) -+AWK_VERSION=' -+ BEGIN { FS="-" } -+ /^v[0-9]/ { -+ sub(/^v/,"") ; print $1 -+ }' -+ -+# tags and output releases: -+# - v4.9.0 => 0 (upstream clean) -+# - v4.9.0-1 => 1 (downstream clean) -+# - v4.9.0-2-g34e62f1 => 0.2.git34e62f1 (upstream dirty) -+# - v4.9.0-1-2-g34e62f1 => 1.2.git34e62f1 (downstream dirty) -+AWK_RELEASE=' -+ BEGIN { FS="-"; OFS="." } -+ /^v[0-9]/ { -+ if (NF == 1) print 0 -+ else if (NF == 2) print $2 -+ else if (NF == 3) print 0, $2, "git" substr($3, 2) -+ else if (NF == 4) print $2, $3, "git" substr($4, 2) -+ }' -+ -+PKG_VERSION=`cat VERSION 2> /dev/null || git describe --match "v[0-9]*"` -+ -+if test "x$1" == "x--full"; then -+ echo $PKG_VERSION | tr -d '[:space:]' -+elif test "x$1" == "x--version"; then -+ echo $PKG_VERSION | awk "$AWK_VERSION" | tr -cd '[:alnum:].' -+elif test "x$1" == "x--release"; then -+ echo $PKG_VERSION | awk "$AWK_RELEASE" | tr -cd '[:alnum:].' -+else -+ echo "usage: $0 [--full|--version|--release]" -+ exit 1 -+fi -diff --git a/configure.ac b/configure.ac -index 7b829f5..cb1dc56 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -20,7 +20,7 @@ - - # Autoconf initialization - AC_INIT([vdsm], -- [m4_esyscmd([build-aux/version.sh])], -+ [m4_esyscmd([build-aux/pkg-version --version])], - [vdsm-devel@lists.fedorahosted.org]) - AC_CONFIG_AUX_DIR([build-aux]) - -@@ -28,7 +28,7 @@ m4_include([m4/ax_python_module.m4]) - - # Package release - AC_SUBST([PACKAGE_RELEASE], -- [m4_esyscmd([build-aux/release.sh])]) -+ [m4_esyscmd([build-aux/pkg-version --release])]) - - # Testing for version and release - AS_IF([test "x$PACKAGE_VERSION" = x], -diff --git a/VERSION b/VERSION -new file mode 100644 -index 0000000..bbc89f8 ---- /dev/null -+++ b/VERSION -@@ -0,0 +1,1 @@ -+v4.10.0 --- -1.7.1 - diff --git a/0043-Use-the-recommended-alignment-instead-of-using-pages.patch b/0043-Use-the-recommended-alignment-instead-of-using-pages.patch deleted file mode 100644 index d62de9d..0000000 --- a/0043-Use-the-recommended-alignment-instead-of-using-pages.patch +++ /dev/null @@ -1,59 +0,0 @@ -From b4f0985266f5fba817602e8af9ad900425c5a853 Mon Sep 17 00:00:00 2001 -From: Saggi Mizrahi -Date: Mon, 24 Sep 2012 01:28:38 +0200 -Subject: [PATCH] Use the recommended alignment instead of using pagesize - -Page size is the usual recommended alignment but when it isn't using it -can cause memory corruption. - -Change-Id: If9da41a2f74d3cea7300df9606c78eebcc9927a9 -Signed-off-by: Saggi Mizrahi -Reviewed-on: http://gerrit.ovirt.org/8143 -Tested-by: Noam Slomianko -Reviewed-by: Dan Kenigsberg -Reviewed-on: http://gerrit.ovirt.org/8174 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm/storage/fileUtils.py | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/vdsm/storage/fileUtils.py b/vdsm/storage/fileUtils.py -index 020f16d..511dff9 100644 ---- a/vdsm/storage/fileUtils.py -+++ b/vdsm/storage/fileUtils.py -@@ -45,9 +45,10 @@ NFS_OPTIONS = "".join(config.get('irs', 'nfs_mount_options').split()) - - log = logging.getLogger('fileUtils') - --PAGESIZE = libc.getpagesize() - CharPointer = ctypes.POINTER(ctypes.c_char) - -+_PC_REC_XFER_ALIGN = 17 -+ - class TarCopyFailed(RuntimeError): pass - - def tarCopy(src, dst, exclude=[]): -@@ -71,7 +72,8 @@ def isStaleHandle(path): - os.listdir(path) - except OSError as ex: - if ex.errno in (errno.EIO, errno.ESTALE): -- return True -+ return True -+ - # We could get contradictory results because of - # soft mounts - if (exists or st) and ex.errno == errno.ENOENT: -@@ -262,7 +264,8 @@ class DirectFile(object): - ppbuff = ctypes.pointer(pbuff) - # Because we usually have fixed sizes for our reads, caching - # buffers might give a slight performance boost. -- rc = libc.posix_memalign(ppbuff, PAGESIZE, size) -+ alignment = libc.fpathconf(self.fileno(), _PC_REC_XFER_ALIGN) -+ rc = libc.posix_memalign(ppbuff, alignment, size) - if rc: - raise OSError(rc, "Could not allocate aligned buffer") - try: --- -1.7.11.4 - diff --git a/0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch b/0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch deleted file mode 100644 index edcbaae..0000000 --- a/0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch +++ /dev/null @@ -1,50 +0,0 @@ -From c219c4455bb93d9f136849b58ceb0255e407fdbe Mon Sep 17 00:00:00 2001 -From: Saggi Mizrahi -Date: Thu, 4 Oct 2012 13:14:21 +0200 -Subject: [PATCH] Use buffer size in multiplies of the recommended transfer - size - -Using the recommended transfer size fixes the memory corruption for NFS. - -Bug-Id: http://bugzilla.redhat.com/845660 -Change-Id: Iadea310039b30073197b7ad90afb930c460bda17 -Signed-off-by: Saggi Mizrahi -Reviewed-on: http://gerrit.ovirt.org/8356 -Reviewed-by: Dan Kenigsberg -Tested-by: Jason Brooks -Reviewed-on: http://gerrit.ovirt.org/8369 -Reviewed-by: Federico Simoncelli -Tested-by: Federico Simoncelli ---- - vdsm/storage/fileUtils.py | 8 ++++++++ - 1 file changed, 8 insertions(+) - -diff --git a/vdsm/storage/fileUtils.py b/vdsm/storage/fileUtils.py -index 511dff9..ccc2bfe 100644 ---- a/vdsm/storage/fileUtils.py -+++ b/vdsm/storage/fileUtils.py -@@ -48,6 +48,7 @@ log = logging.getLogger('fileUtils') - CharPointer = ctypes.POINTER(ctypes.c_char) - - _PC_REC_XFER_ALIGN = 17 -+_PC_REC_MIN_XFER_SIZE = 16 - - class TarCopyFailed(RuntimeError): pass - -@@ -265,6 +266,13 @@ class DirectFile(object): - # Because we usually have fixed sizes for our reads, caching - # buffers might give a slight performance boost. - alignment = libc.fpathconf(self.fileno(), _PC_REC_XFER_ALIGN) -+ minXferSize = libc.fpathconf(self.fileno(), _PC_REC_MIN_XFER_SIZE) -+ chunks, remainder = divmod(size, minXferSize) -+ if remainder > 0: -+ chunks += 1 -+ -+ size = chunks * minXferSize -+ - rc = libc.posix_memalign(ppbuff, alignment, size) - if rc: - raise OSError(rc, "Could not allocate aligned buffer") --- -1.7.11.4 - diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..9273e84 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +vdsm fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1676186 diff --git a/sources b/sources deleted file mode 100644 index 87c07ec..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -e8ab5eccdea0b4a4da2e812174971393 vdsm-4.10.0.tar.gz diff --git a/vdsm.spec b/vdsm.spec deleted file mode 100644 index 2793579..0000000 --- a/vdsm.spec +++ /dev/null @@ -1,1108 +0,0 @@ -# Packages names -%global vdsm_name vdsm -%global vdsm_bootstrap vdsm-bootstrap -%global vdsm_reg vdsm-reg - -# Upstream release -#% global vdsm_release e952471 -#% global vdsm_relvtag .git%{vdsm_release} -#% global vdsm_relttag -%{vdsm_release} - -# Required users and groups -%global vdsm_user vdsm -%global vdsm_group kvm -%global qemu_group qemu -%global snlk_group sanlock -%global snlk_user sanlock - -# Fedora specific configuration -%global with_hooks 1 - -# Required paths -%global _polkitdir %{_localstatedir}/lib/polkit-1/localauthority/10-vendor.d - -# Default to skipping autoreconf. Distros can change just this one line -# (or provide a command-line override) if they backport any patches that -# touch configure.ac or Makefile.am. -%{!?enable_autotools:%define enable_autotools 1} - -Name: %{vdsm_name} -Version: 4.10.0 -Release: 11%{?vdsm_relvtag}%{?dist}%{?extra_release} -Summary: Virtual Desktop Server Manager - -Group: Applications/System -License: GPLv2+ -Url: http://www.ovirt.org/wiki/Vdsm -# The source for this package was pulled from upstream's vcs. -# Use the following commands to generate the tarball: -# git clone http://gerrit.ovirt.org/p/vdsm -# cd vdsm -# git reset --hard {vdsm_release} -# ./autogen.sh --system -# make VERSION={version}-{vdsm_release} dist -Source0: %{vdsm_name}-%{version}%{?vdsm_relttag}.tar.gz - -Patch0: 0001-deployUtil.yumFind-rename-and-simplify-semantics.patch -Patch1: 0002-drop-deployUtil.yumSearch.patch -Patch2: 0003-deployUtil.yumSearchVersion-compare-versions-sanely.patch -Patch3: 0004-Iterates-over-delete-candidates-networks-only-once.patch -Patch4: 0005-options-translation-in-setupNetworks-is-not-relevant.patch -Patch5: 0006-Minor-optimization-for-delNetwork.patch -Patch6: 0007-Don-t-ignore-bridgeless-networks-in-ifaceUsers.patch -Patch7: 0008-Minor-optimization-for-addNetwork.patch -Patch8: 0009-Use-already-known-iface-in-addNetwork.patch -Patch9: 0010-Use-proper-MTU-on-bonding-when-add-network.patch -Patch10: 0011-Add-bridge-on-top-of-VLAN-if-exists.patch -Patch11: 0012-BZ-830485-Add-netConfigDirty-bit-to-getVdsCaps-repor.patch -Patch12: 0013-remove-flag-skipLibvirt.patch -Patch13: 0014-BZ-826873-Allow-to-change-bond-without-network-attac.patch -Patch14: 0015-BZ-830486-Allow-to-change-network-according-the-diff.patch -Patch15: 0016-BZ-826467-Allow-to-remove-bond-and-attach-network-to.patch -Patch16: 0017-Related-to-BZ-826873-Allow-to-create-bond-without-ne.patch -Patch17: 0018-BZ-832577-node-can-t-be-approved.patch -Patch18: 0019-BZ-824298-fix-typo-in-keyword-argument-exc_info.patch -Patch19: 0020-deployUtil-use-os.uname-instead-of-bin-uname.patch -Patch20: 0021-deployUtil-slightly-saner-kernel-version-comparison.patch -Patch21: 0022-BZ-835784-Allow-to-create-a-network-on-top-of-existi.patch -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 -Patch40: 0041-BZ-842948-deployUtil-safely-remove-bridge.patch -Patch41: 0042-Ship-the-version-file-with-the-tarballs.patch -Patch42: 0043-Use-the-recommended-alignment-instead-of-using-pages.patch -Patch43: 0044-Use-buffer-size-in-multiplies-of-the-recommended-tra.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: python -BuildRequires: python-devel -BuildRequires: pyflakes -BuildRequires: python-nose -BuildRequires: python-pep8 - -# BuildRequires needed by the tests during the build -BuildRequires: python-ethtool -BuildRequires: libvirt-python -BuildRequires: pyparted - -# Autotools BuildRequires -%if 0%{?enable_autotools} -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: gettext-devel -BuildRequires: libtool -%endif - -%if !0%{?rhel} -BuildRequires: systemd-units -%endif - -Requires: which -Requires: sudo >= 1.7.3 -Requires: logrotate >= 3.8.0 -Requires: xz -Requires: ntp -Requires: python-ethtool -Requires: nfs-utils dmidecode -Requires: lvm2 >= 2.02.95 -Requires: sanlock >= 2.1, sanlock-python - -%if 0%{?rhel} -Requires: python -# Update the qemu-kvm requires when block_stream will be included -Requires: qemu-kvm >= 2:0.12.1.2-2.227 -Requires: qemu-img >= 2:0.12.1.2-2.227 -Requires: libvirt >= 0.9.10-20 -Requires: libvirt-python, libvirt-lock-sanlock -Requires: iscsi-initiator-utils >= 6.2.0.872-15 -Requires: device-mapper-multipath >= 0.4.9-52 -Requires: e2fsprogs >= 1.41.12-11 -%else -# Subprocess and thread bug was found on python 2.7.2 -Requires: python >= 2.7.3 -Requires: qemu-kvm >= 2:0.15.0-4 -Requires: qemu-img >= 2:0.15.0-4 -#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 -Requires: e2fsprogs >= 1.41.14 -%endif - -Requires: psmisc >= 22.6-15 -Requires: fence-agents -Requires: bridge-utils -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} -Requires: selinux-policy-targeted >= 3.7.19-80.el6 -Requires: pyparted -Requires(post): /usr/sbin/saslpasswd2 - -%description -The VDSM service is required by a Virtualization Manager to manage the -Linux hosts. VDSM manages and monitors the host's storage, memory and -networks as well as virtual machine creation, other host administration -tasks, statistics gathering, and log collection. - -%package cli -Summary: VDSM command line interface -BuildArch: noarch - -Requires: %{name}-python = %{version}-%{release} -Requires: %{name}-xmlrpc = %{version}-%{release} - -%description cli -Call VDSM commands from the command line. Used for testing and debugging. - -%package xmlrpc -Summary: VDSM xmlrpc API -BuildArch: noarch - -Requires: %{name}-python = %{version}-%{release} - -%description xmlrpc -An XMLRPC interface for interacting with vdsmd. Primary control interface for -ovirt-engine and vdsClient. - -%package rest -Summary: VDSM REST API -BuildArch: noarch - -Requires: %{name}-python = %{version}-%{release} -Requires: python-cherrypy python-cheetah - -%description rest -A REST interface for interacting with vdsmd. - -%package bootstrap -Summary: VDSM bootstrapping package -BuildArch: noarch - -%description bootstrap -VDSM bootstrapping package. Used for delivering the bootstrap code onto the -Virtualization Manager. - -%package reg -Summary: VDSM registration package -BuildArch: noarch - -Requires: %{name} = %{version}-%{release} -Requires: traceroute - -%description reg -VDSM registration package. Used to register a Linux host to a Virtualization -Manager. - -%package python -Summary: VDSM python libraries - -%description python -Shared libraries beween the various VDSM packages. - -%package debug-plugin -Summary: VDSM Debug Plugin -Requires: vdsm -Requires: %{name}-xmlrpc = %{version}-%{release} -BuildArch: noarch - -%description debug-plugin -Used by the trained monkeys at Red Hat to insert chaos and mayhem in to VDSM. - -%package tests -Summary: VDSM Test Suite -Requires: vdsm = %{version}-%{release} -BuildArch: noarch - -%description tests -A test suite for verifying the functionality of a running vdsm instance - -%package hook-vhostmd -Summary: VDSM hook set for interaction with vhostmd -Requires: vhostmd -BuildArch: noarch - -%description hook-vhostmd -VDSM hook to use vhostmd per VM according to Virtualization Manager requests. - -%package hook-faqemu -Summary: Fake qemu process for VDSM quality assurance -BuildArch: noarch - -%description hook-faqemu -VDSM hook used for testing VDSM with multiple fake virtual machines without -running real guests. - -%package hook-directlun -Summary: Direct LUN support for VDSM -BuildArch: noarch - -%description hook-directlun -VDSM hook enable user to add storage LUN for VDSM -without the sharing and storage handling of VDSM. - -%package hook-fileinject -Summary: Allow uploading file to VMs disk -BuildArch: noarch - -%description hook-fileinject -Hook is getting target file name and its content and -create that file in target machine. - -%package hook-floppy -Summary: Allow adding floppy to VM -BuildArch: noarch - -%description hook-floppy -Allow adding floppy to VM - -%package hook-hostusb -Summary: Allow attaching USB device from host -BuildArch: noarch - -%description hook-hostusb -Hook is getting vendor and product id of USB device -disconnect it from host and attach it to VM - -%package hook-hugepages -Summary: Huge pages enable user to handle VM with 2048KB page files. -BuildArch: noarch - -%description hook-hugepages -Hook is getting number of huge pages reserve them for the VM, -and enable user to handle VM with 2048KB page files. - -%package hook-isolatedprivatevlan -Summary: Isolated network environment for VMs -BuildArch: noarch - -%description hook-isolatedprivatevlan -limit VM traffic to a specific gateway by its mac address, -hook prevent VM from spoofing its mac or ip address -by using libvirt filter -and by adding custom filter: isolatedprivatevlan-vdsm.xml - -%package hook-numa -Summary: numa sopport for VDSM -BuildArch: noarch - -%description hook-numa -Hooks is getting number/rage of numa nodes and numa mode, -and update the VM xml. - -%package hook-pincpu -Summary: Hook pin VM so specific CPUs -BuildArch: noarch - -%description hook-pincpu -pincpu is hook for VDSM. -pincpu enable to pin virtual machine to a specific CPUs. - -%package hook-promisc -Summary: Network interface promiscuous mode support for VDSM -BuildArch: noarch - -%description hook-promisc -VDSM promiscuous mode let user define a VM interface that will capture -all network traffic. - -%package hook-qos -Summary: QoS network in/out traffic support for VDSM -BuildArch: noarch - -%description hook-qos -Hook adds QoS in/out traffic to VMs interfaces - -%package hook-scratchpad -Summary: One time disk creation for VDSM -BuildArch: noarch - -%description hook-scratchpad -scratchpad hook for VDSM -Hook creates a disk for a VM onetime usage, -the disk will be erased when the VM destroyed. -VM cannot be migrated when using scratchpad hook - -%package hook-smartcard -Summary: Smartcard support for Spice protocol in VDSM -BuildArch: noarch - -%description hook-smartcard -Smartcard hook add support for spice in VDSM. -Smartcard hook enable user to use its smartcard inside virtual machines. - -%package hook-smbios -Summary: Adding custom smbios entries to libvirt domain via VDSM -BuildArch: noarch - -%description hook-smbios -Adding custom smbios entries to libvirt domain via VDSM -such as: vendor, version, date and release - -%package hook-sriov -Summary: sr-iov support for VDSM -BuildArch: noarch - -%description hook-sriov -sr-iov hook enable to add virtual functions exposed by the device -directly to a virtual machine. - -%package hook-vmdisk -Summary: External disk support for VDSM -BuildArch: noarch - -%description hook-vmdisk -Hook adds additional disk image for a VM (raw or qcow2) - -%package gluster -Summary: Gluster Plugin for VDSM -BuildArch: noarch - -Requires: %{name} = %{version}-%{release} -Requires: glusterfs glusterfs-server glusterfs-fuse - -%description gluster -Gluster plugin enables VDSM to serve Gluster functionalities. - -%prep -%setup -q -n %{vdsm_name}-%{version}%{?vdsm_relttag} - -%patch0 -p1 -b .patch0 -%patch1 -p1 -b .patch1 -%patch2 -p1 -b .patch2 -%patch3 -p1 -b .patch3 -%patch4 -p1 -b .patch4 -%patch5 -p1 -b .patch5 -%patch6 -p1 -b .patch6 -%patch7 -p1 -b .patch7 -%patch8 -p1 -b .patch8 -%patch9 -p1 -b .patch9 -%patch10 -p1 -b .patch10 -%patch11 -p1 -b .patch11 -%patch12 -p1 -b .patch12 -%patch13 -p1 -b .patch13 -%patch14 -p1 -b .patch14 -%patch15 -p1 -b .patch15 -%patch16 -p1 -b .patch16 -%patch17 -p1 -b .patch17 -%patch18 -p1 -b .patch18 -%patch19 -p1 -b .patch19 -%patch20 -p1 -b .patch20 -%patch21 -p1 -b .patch21 -%patch22 -p1 -b .patch22 -%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 -%patch40 -p1 -b .patch40 -%patch41 -p1 -b .patch41 -%{__chmod} +x build-aux/pkg-version # required by patch41 -%patch42 -p1 -b .patch42 -%patch43 -p1 -b .patch43 - -%build -%if 0%{?enable_autotools} -autoreconf -if -%endif -%configure %{?with_hooks:--enable-hooks} -make -# Setting software_version and software_revision in dsaversion.py -baserelease=`echo "%{release}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` -baseversion=`echo "%{version}" | sed 's/\([0-9]\+\(\.[0-9]\+\)\?\).*/\1/'` -sed -i -e 's/^software_version =.*/software_version = "'"${baseversion}"'"/' \ - -e 's/^software_revision =.*/software_revision = "'"${baserelease}"'"/' vdsm/dsaversion.py - -%install -rm -rf %{buildroot} -make DESTDIR=%{buildroot} install - -# Install the respawn utility -install -Dm 0755 vdsm/respawn \ - %{buildroot}%{_datadir}/%{vdsm_name}/respawn - -# Install the lvm rules -install -Dm 0644 vdsm/storage/12-vdsm-lvm.rules \ - %{buildroot}/lib/udev/rules.d/12-vdsm-lvm.rules - -install -Dm 0644 vdsm/limits.conf \ - %{buildroot}/etc/security/limits.d/99-vdsm.conf - -%if 0%{?rhel} -# Install the SysV init scripts -install -Dm 0755 vdsm/vdsmd.init %{buildroot}%{_initrddir}/vdsmd -install -Dm 0755 vdsm_reg/vdsm-reg.init %{buildroot}%{_initrddir}/vdsm-reg - -# 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 -%else -# Install the configuration sample -install -Dm 0644 vdsm/vdsm.conf.sample \ - %{buildroot}%{_sysconfdir}/vdsm/vdsm.conf - -# Install the systemd scripts -install -Dm 0755 vdsm/vdsmd.init %{buildroot}/lib/systemd/systemd-vdsmd -install -Dm 0644 vdsm/vdsmd.service %{buildroot}%{_unitdir}/vdsmd.service -install -Dm 0755 vdsm_reg/vdsm-reg.init \ - %{buildroot}/lib/systemd/systemd-vdsm-reg -install -Dm 0644 vdsm_reg/vdsm-reg.service \ - %{buildroot}%{_unitdir}/vdsm-reg.service -# Install the polkit for libvirt -install -Dm 0644 vdsm/vdsm-libvirt-access.pkla \ - %{buildroot}%{_polkitdir}/10-vdsm-libvirt-access.pkla -%endif - -%check -# Disabling the nose tests until they'll all succeed in koji. -# make check is failing on F-18+ due to pep8 issues. See RHBZ # 837014 -# make check NOSE_EXCLUDE=".*" - -%clean -rm -rf %{buildroot} - -%pre -/usr/bin/getent passwd %{vdsm_user} >/dev/null || \ - /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} - -# 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 - /usr/sbin/saslpasswd2 -p -a libvirt vdsm@rhevh < \ - /etc/pki/vdsm/keys/libvirt_password -fi - -# generate the vdsm certificates (if missing) -%{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh - -%if 0%{?rhel} -if [ "$1" -eq 1 ] ; then - /sbin/chkconfig --add vdsmd -fi -%else -if [ "$1" -eq 1 ] ; then - /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || : - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi -exit 0 -%endif - -%preun -%if 0%{?rhel} -if [ "$1" -eq 0 ] -then - /sbin/service vdsmd stop > /dev/null 2>&1 || : - /sbin/chkconfig --del vdsmd - - /bin/sed -i '/# by vdsm$/d' \ - /etc/libvirt/libvirtd.conf \ - /etc/libvirt/qemu.conf \ - /etc/sysconfig/libvirtd \ - /etc/sysctl.conf - - /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \ - /etc/sysctl.conf - - /usr/sbin/semanage boolean -m -S targeted -F /dev/stdin << _EOF -virt_use_nfs=0 -virt_use_sanlock=0 -_EOF - - 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@rhevh - - if /sbin/initctl status libvirtd >/dev/null 2>/dev/null ; then - /sbin/initctl stop libvirtd >/dev/null 2>/dev/null - rm -f /etc/init/libvirtd.conf - - /sbin/chkconfig libvirtd on - /sbin/service libvirtd start >/dev/null - fi -fi -%else -if [ "$1" -eq 0 ]; then - /bin/systemctl --no-reload disable vdsmd.service > /dev/null 2>&1 || : - /bin/systemctl stop vdsmd.service > /dev/null 2>&1 || : -fi -exit 0 -%endif - -%postun -%if 0%{?rhel} -if [ "$1" -ge 1 ]; then - /sbin/service vdsmd condrestart > /dev/null 2>&1 -fi -exit 0 -%else -if [ "$1" -ge 1 ] ; then - /bin/systemctl try-restart vdsmd.service >/dev/null 2>&1 || : -fi -exit 0 -%endif - -%if 0%{?rhel} -%triggerun -- libvirt -if [ "$2" -eq "0" ]; then - /sbin/initctl stop libvirtd > /dev/null 2>&1 || : -fi - -%triggerpostun -- libvirt -if [ "$2" -ge "1" ]; then - /sbin/initctl restart libvirtd > /dev/null 2>&1 || : -fi -%endif - -%post reg -%if 0%{?rhel} -if [ "$1" -eq 1 ] ; then - /sbin/chkconfig --add vdsm-reg -fi -%else -if [ "$1" -eq 1 ] ; then - /bin/systemctl enable vdsmd-reg.service >/dev/null 2>&1 || : - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi -exit 0 -%endif - -%preun reg -%if 0%{?rhel} -if [ "$1" -eq 0 ] -then - /sbin/service vdsm-reg stop > /dev/null 2>&1 || : - /sbin/chkconfig --del vdsm-reg -fi -%else -if [ "$1" -eq 0 ]; then - /bin/systemctl --no-reload disable vdsmd-reg.service > /dev/null 2>&1 || : - /bin/systemctl stop vdsmd-reg.service > /dev/null 2>&1 || : -fi -exit 0 -%endif - -%files -%defattr(-, root, root, -) -%doc COPYING README vdsm/vdsm.conf.sample -%if 0%{?rhel} -%{_initrddir}/vdsmd -%else -/lib/systemd/systemd-vdsmd -%{_unitdir}/vdsmd.service -%endif -%dir %attr(-, %{vdsm_user}, %{vdsm_group}) /rhev/data-center -%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 %{_datadir}/%{vdsm_name} -%dir %{_datadir}/%{vdsm_name}/storage -%{_datadir}/%{vdsm_name}/alignmentScan.py* -%{_datadir}/%{vdsm_name}/blkid.py* -%{_datadir}/%{vdsm_name}/caps.py* -%{_datadir}/%{vdsm_name}/clientIF.py* -%{_datadir}/%{vdsm_name}/API.py* -%{_datadir}/%{vdsm_name}/hooking.py* -%{_datadir}/%{vdsm_name}/hooks.py* -%{_datadir}/%{vdsm_name}/libvirtev.py* -%{_datadir}/%{vdsm_name}/libvirtvm.py* -%{_datadir}/%{vdsm_name}/lsblk.py* -%{_datadir}/%{vdsm_name}/md_utils.py* -%{_datadir}/%{vdsm_name}/mk_sysprep_floppy -%{_datadir}/%{vdsm_name}/parted_utils.py* -%{_datadir}/%{vdsm_name}/mkimage.py* -%{_datadir}/%{vdsm_name}/supervdsm.py* -%{_datadir}/%{vdsm_name}/supervdsmServer.py* -%{_datadir}/%{vdsm_name}/vmChannels.py* -%{_datadir}/%{vdsm_name}/tc.py* -%{_datadir}/%{vdsm_name}/vdsm -%{_datadir}/%{vdsm_name}/vdsm-restore-net-config -%{_datadir}/%{vdsm_name}/vdsm-store-net-config -%{_datadir}/%{vdsm_name}/vm.py* -%{_datadir}/%{vdsm_name}/write-net-config -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/logger.conf -%config(noreplace) %{_sysconfdir}/logrotate.d/vdsm -%config(noreplace) %{_sysconfdir}/modprobe.d/vdsm.conf -%config(noreplace) %{_sysconfdir}/rwtab.d/vdsm -%{_sysconfdir}/sudoers.d/50_vdsm -%{_sysconfdir}/cron.hourly/vdsm-logrotate -%{_sysconfdir}/cron.d/vdsm-libvirt-logrotate -%{_datadir}/%{vdsm_name}/guestIF.py* -%{_datadir}/%{vdsm_name}/logUtils.py* -%{_datadir}/%{vdsm_name}/dsaversion.py* -%{_datadir}/%{vdsm_name}/pthread.py* -%{_datadir}/%{vdsm_name}/betterThreading.py* -%{_libexecdir}/%{vdsm_name}/persist-vdsm-hooks -%{_libexecdir}/%{vdsm_name}/unpersist-vdsm-hook -%{_libexecdir}/%{vdsm_name}/ovirt_functions.sh -%{_libexecdir}/%{vdsm_name}/vdsm-gencerts.sh -%{_datadir}/%{vdsm_name}/storage/__init__.py* -%{_datadir}/%{vdsm_name}/storage/blockSD.py* -%{_datadir}/%{vdsm_name}/storage/blockVolume.py* -%{_datadir}/%{vdsm_name}/storage/devicemapper.py* -%{_datadir}/%{vdsm_name}/storage/dispatcher.py* -%{_datadir}/%{vdsm_name}/storage/domainMonitor.py* -%{_datadir}/%{vdsm_name}/storage/fileSD.py* -%{_datadir}/%{vdsm_name}/storage/fileUtils.py* -%{_datadir}/%{vdsm_name}/storage/fileVolume.py* -%{_datadir}/%{vdsm_name}/storage/fuser.py* -%{_datadir}/%{vdsm_name}/storage/hba.py* -%{_datadir}/%{vdsm_name}/storage/hsm.py* -%{_datadir}/%{vdsm_name}/storage/image.py* -%{_datadir}/%{vdsm_name}/storage/iscsiadm.py* -%{_datadir}/%{vdsm_name}/storage/iscsi.py* -%{_datadir}/%{vdsm_name}/storage/localFsSD.py* -%{_datadir}/%{vdsm_name}/storage/lvm.py* -%{_datadir}/%{vdsm_name}/storage/misc.py* -%{_datadir}/%{vdsm_name}/storage/mount.py* -%{_datadir}/%{vdsm_name}/storage/multipath.py* -%{_datadir}/%{vdsm_name}/storage/nfsSD.py* -%{_datadir}/%{vdsm_name}/storage/outOfProcess.py* -%{_datadir}/%{vdsm_name}/storage/persistentDict.py* -%{_datadir}/%{vdsm_name}/storage/processPool.py* -%{_datadir}/%{vdsm_name}/storage/resourceFactories.py* -%{_datadir}/%{vdsm_name}/storage/resourceManager.py* -%{_datadir}/%{vdsm_name}/storage/safelease.py* -%{_datadir}/%{vdsm_name}/storage/sdc.py* -%{_datadir}/%{vdsm_name}/storage/sd.py* -%{_datadir}/%{vdsm_name}/storage/securable.py* -%{_datadir}/%{vdsm_name}/storage/sp.py* -%{_datadir}/%{vdsm_name}/storage/storageConstants.py* -%{_datadir}/%{vdsm_name}/storage/storage_exception.py* -%{_datadir}/%{vdsm_name}/storage/storage_mailbox.py* -%{_datadir}/%{vdsm_name}/storage/storageServer.py* -%{_datadir}/%{vdsm_name}/storage/sync.py* -%{_datadir}/%{vdsm_name}/storage/taskManager.py* -%{_datadir}/%{vdsm_name}/storage/task.py* -%{_datadir}/%{vdsm_name}/storage/threadLocal.py* -%{_datadir}/%{vdsm_name}/storage/threadPool.py* -%{_datadir}/%{vdsm_name}/storage/volume.py* -%{_libexecdir}/%{vdsm_name}/safelease -%{_libexecdir}/%{vdsm_name}/spmprotect.sh -%{_libexecdir}/%{vdsm_name}/spmstop.sh -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_cont -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_cont -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_pause -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_pause -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_hibernate -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_hibernate -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_dehibernate -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_dehibernate -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_source -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_migrate_destination -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vm_set_ticket -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vm_set_ticket -%dir %{_libexecdir}/%{vdsm_name}/hooks/before_vdsm_start -%dir %{_libexecdir}/%{vdsm_name}/hooks/after_vdsm_stop -%{_datadir}/%{vdsm_name}/configNetwork.py* -%{_datadir}/%{vdsm_name}/addNetwork -%{_datadir}/%{vdsm_name}/delNetwork -%{_datadir}/%{vdsm_name}/respawn -%{_datadir}/%{vdsm_name}/get-conf-item -%{_datadir}/%{vdsm_name}/set-conf-item -%{_datadir}/%{vdsm_name}/kaxmlrpclib.py* -%{_datadir}/%{vdsm_name}/dumpStorageTable.py* -%{_datadir}/%{vdsm_name}/ksm.py* -%{_datadir}/%{vdsm_name}/neterrors.py* -%{python_sitelib}/sos/plugins/vdsm.py* -/lib/udev/rules.d/12-vdsm-lvm.rules -/etc/security/limits.d/99-vdsm.conf -%{_mandir}/man8/vdsmd.8* -%if 0%{?rhel} -%dir %{_localstatedir}/log/core -%else -%{_polkitdir}/10-vdsm-libvirt-access.pkla -%endif - -%defattr(-, %{vdsm_user}, %{qemu_group}, -) -%dir %{_localstatedir}/lib/libvirt/qemu/channels - -%defattr(-, %{vdsm_user}, %{vdsm_group}, -) -%dir %{_sysconfdir}/pki/%{vdsm_name} -%dir %{_sysconfdir}/pki/%{vdsm_name}/keys -%dir %{_sysconfdir}/pki/%{vdsm_name}/certs -%config(noreplace) %{_sysconfdir}/pki/%{vdsm_name}/keys/libvirt_password -%dir %{_localstatedir}/lib/%{vdsm_name} -%dir %{_localstatedir}/lib/%{vdsm_name}/netconfback -%ghost %dir %{_localstatedir}/run/%{vdsm_name} -%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 - -%files python -%defattr(-, root, root, -) -%{_bindir}/vdsm-tool -%if !0%{?rhel} -%config(noreplace) %{_sysconfdir}/%{vdsm_name}/vdsm.conf -%endif -%{python_sitelib}/%{vdsm_name}/__init__.py* -%{python_sitelib}/%{vdsm_name}/config.py* -%{python_sitelib}/%{vdsm_name}/constants.py* -%{python_sitelib}/%{vdsm_name}/define.py* -%{python_sitelib}/%{vdsm_name}/exception.py* -%{python_sitelib}/%{vdsm_name}/libvirtconnection.py* -%{python_sitelib}/%{vdsm_name}/netinfo.py* -%{python_sitelib}/%{vdsm_name}/qemuImg.py* -%{python_sitelib}/%{vdsm_name}/SecureXMLRPCServer.py* -%{python_sitelib}/%{vdsm_name}/utils.py* -%{python_sitelib}/%{vdsm_name}/vdscli.py* -%{python_sitelib}/%{vdsm_name}/betterPopen/__init__.py* -%{python_sitelib}/%{vdsm_name}/betterPopen/createprocess.so -%{python_sitelib}/%{vdsm_name}/tool/__init__.py* - -%files tests -%doc %{_datadir}/%{vdsm_name}/tests/README -%defattr(-, root, root, -) -%{_datadir}/%{vdsm_name}/tests/*.py* -%{_datadir}/%{vdsm_name}/tests/run_tests.sh -%{_datadir}/%{vdsm_name}/tests/cpu_info.out -%{_datadir}/%{vdsm_name}/tests/netmaskconversions -%{_datadir}/%{vdsm_name}/tests/functional/*.py* - -%files hook-vhostmd -%defattr(-, root, root, -) -%doc COPYING -%{_sysconfdir}/sudoers.d/50_vdsm_hook_vhostmd -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vhostmd -%{_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 - -%if 0%{?with_hooks} -%files hook-directlun -%defattr(-, vdsm, kvm, -) -%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_directlun -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_directlun -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_directlun -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_directlun - -%files hook-fileinject -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_fileinject - -%files hook-floppy -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_floppy -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_floppy - -%files hook-hostusb -%defattr(-, vdsm, kvm, -) -%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_hostusb -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hostusb -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_hostusb -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hostusb - -%files hook-hugepages -%defattr(-, vdsm, kvm, -) -%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_hugepages -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_hugepages -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_destination/50_hugepages -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_hugepages - -%files hook-isolatedprivatevlan -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_isolatedprivatevlan -%config(noreplace) %{_sysconfdir}/libvirt/nwfilter/isolatedprivatevlan-vdsm.xml - -%files hook-numa -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_numa - -%files hook-pincpu -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_pincpu - -%files hook-promisc -%defattr(-, vdsm, kvm, -) -%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_promisc -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_start/50_promisc -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_destroy/50_promisc - -%files hook-qos -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_qos - -%files hook-scratchpad -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_scratchpad -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_scratchpad -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_scratchpad - -%files hook-smartcard -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smartcard - -%files hook-smbios -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_smbios - -%files hook-sriov -%defattr(-, vdsm, kvm, -) -%attr (440,root,root) %{_sysconfdir}/sudoers.d/50_vdsm_hook_sriov -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_sriov -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/after_vm_destroy/50_sriov -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_migrate_source/50_sriov - -%files hook-vmdisk -%defattr(-, vdsm, kvm, -) -%attr (755,vdsm,kvm) %{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/50_vmdisk -%endif - -%files debug-plugin -%defattr(-, root, root, -) -%{_datadir}/%{vdsm_name}/vdsmDebugPlugin.py* -%{_datadir}/%{vdsm_name}/debugPluginClient.py* - -%files cli -%defattr(-, root, root, -) -%doc COPYING -%{_bindir}/vdsClient -%{_datadir}/%{vdsm_name}/vdsClient.py* -%{_datadir}/%{vdsm_name}/vdsClientGluster.py* -%{_sysconfdir}/bash_completion.d/vdsClient -%{_mandir}/man1/vdsClient.1* - -%files xmlrpc -%defattr(-, root, root, -) -%{_datadir}/%{vdsm_name}/BindingXMLRPC.py* - -%files rest -%defattr(-, root, root, -) -%{_datadir}/%{vdsm_name}/rest/__init__.py* -%{_datadir}/%{vdsm_name}/rest/BindingREST.py* -%{_datadir}/%{vdsm_name}/rest/Dispatcher.py* -%{_datadir}/%{vdsm_name}/rest/Controller.py* -%{_datadir}/%{vdsm_name}/rest/templates/*.x -%{_datadir}/%{vdsm_name}/rest/templates/api.xsd -%{_datadir}/%{vdsm_name}/rest/templates/rsdl.xml - -%files bootstrap -%defattr(-, root, root, -) -%doc COPYING -%{_datadir}/%{vdsm_bootstrap}/vds_bootstrap.py* -%{_datadir}/%{vdsm_bootstrap}/deployUtil.py* -%{_datadir}/%{vdsm_bootstrap}/vds_bootstrap_complete.py* - -%files reg -%defattr(-, root, root, -) -%doc COPYING -%dir %{_sysconfdir}/%{vdsm_reg} -%dir %{_datadir}/%{vdsm_reg} -%config(noreplace) %{_sysconfdir}/logrotate.d/vdsm-reg -%config(noreplace) %{_sysconfdir}/%{vdsm_reg}/vdsm-reg.conf -%config(noreplace) %{_sysconfdir}/%{vdsm_reg}/logger.conf -%ghost %dir /data -%ghost %dir %attr(0775, root, root) /data/updates -%if 0%{?rhel} -%{_initrddir}/vdsm-reg -%else -/lib/systemd/systemd-vdsm-reg -%{_unitdir}/vdsm-reg.service -%endif -%{_datadir}/%{vdsm_reg}/vdsm-reg-setup -%{_datadir}/%{vdsm_reg}/define.py* -%{_datadir}/%{vdsm_reg}/vdsm-complete -%{_datadir}/%{vdsm_reg}/vdsm-gen-cert -%{_datadir}/%{vdsm_reg}/vdsm-upgrade -%{_datadir}/%{vdsm_reg}/config.py* -%{_datadir}/%{vdsm_reg}/deployUtil.py* -%attr(0755, -, -) %{_datadir}/%{vdsm_reg}/register-to-engine.py* -%{_datadir}/%{vdsm_reg}/createDaemon.py* -%{python_sitelib}/ovirt_config_setup/engine.py* -%{_datadir}/%{vdsm_reg}/save-config -%{_sysconfdir}/ovirt-config-boot.d/vdsm-config -%{_sysconfdir}/ovirt-commandline.d/vdsm-reg -%{_sysconfdir}/cron.hourly/vdsm-reg-logrotate -%{_mandir}/man8/vdsm-reg.8* - -%defattr(-, %{vdsm_user}, %{vdsm_group},-) -%dir %{_var}/log/%{vdsm_reg} - -%files hook-faqemu -%defattr(-, root, root, -) -%doc COPYING -%{_libexecdir}/%{vdsm_name}/vdsm-faqemu -%{_libexecdir}/%{vdsm_name}/hooks/before_vm_start/10_faqemu - -%files gluster -%defattr(-, root, root, -) -%dir %{_datadir}/%{vdsm_name}/gluster -%doc COPYING -%{_datadir}/%{vdsm_name}/gluster/__init__.py* -%{_datadir}/%{vdsm_name}/gluster/api.py* -%{_datadir}/%{vdsm_name}/gluster/cli.py* -%{_datadir}/%{vdsm_name}/gluster/exception.py* -%{_datadir}/%{vdsm_name}/gluster/hostname.py* - -%changelog -* Sat Oct 20 2012 Peter Robinson 4.10.0-11 -- Merge F17 changes into F18+ and disable make check due to pep8 issues -- Add pyparted dependency - -* Thu Oct 4 2012 Federico Simoncelli 4.10.0-10 -- BZ#845660 Use buffer size in multiplies of the recommended transfer size - -* Mon Sep 24 2012 Federico Simoncelli 4.10.0-9 -- BZ#845660 Use the recommended alignment instead of using pagesize - -* Tue Sep 11 2012 Federico Simoncelli 4.10.0-8 -- add the autotools support - -* Fri Aug 17 2012 Federico Simoncelli 4.10.0-7 -- enable all the vdsm hooks - -* Wed Aug 1 2012 Federico Simoncelli 4.10.0-6 -- BZ#842948: deployUtil - safely remove bridge - -* Tue Jul 17 2012 Federico Simoncelli 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 - -* Fri Jun 29 2012 Federico Simoncelli 4.10.0-4 -- deployUtil: use os.uname instead of /bin/uname -- deployUtil: slightly saner kernel version comparison -- BZ#835784 - Allow to create a network on top of existing bond in additional - to create a new bond and network -- BZ#833119 - Allow to create VLANed network on top of existing bond -- BZ#833803 - Avoid bond breaking after network detach -- Handle bond properly if connectivity check fail. -- BZ#806555 having /etc/ovirt-node-* means it is a node - -* Tue Jun 26 2012 Federico Simoncelli 4.10.0-3 -- BZ#832577: node can't be approved -- BZ#824298 fix typo in keyword argument exc_info - -* Wed Jun 20 2012 Federico Simoncelli 4.10.0-2 -- deployUtil.yumFind: rename and simplify semantics -- drop deployUtil.yumSearch -- deployUtil.yumSearchVersion: compare versions sanely -- Iterates over delete candidates networks only once -- 'options' translation in setupNetworks is not relevant -- Minor optimization for delNetwork -- Don't ignore bridgeless networks in ifaceUsers -- Minor optimization for addNetwork -- Use already known iface in addNetwork -- Use proper MTU on bonding when add network -- Add bridge on top of VLAN if exists -- BZ#830485 - Add netConfigDirty bit to getVdsCaps report -- remove flag skipLibvirt -- BZ#826873 - Allow to change bond without network attached to it -- BZ#830486 - Allow to change network according the diffs from previous state -- BZ#826467 - Allow to remove bond and attach network to NIC -- Related to BZ#826873 - Allow to create bond without network - -* Mon Jun 11 2012 Federico Simoncelli 4.10.0-1 -- vdsm-4.10.0 - -* Mon Jun 4 2012 Federico Simoncelli 4.9.6-2.gite952471 -- BZ#822158 Report version-release in a short format - -* Mon Jun 4 2012 Federico Simoncelli 4.9.6-1.gite952471 -- vdsm-4.9.6-ge952471 - -* Mon May 28 2012 Federico Simoncelli 4.9.6-0.git1b07249 -- vdsm-4.9.6-g1b07249 - -* Tue Feb 28 2012 Dan Kenigsberg - 4.9.4-0.gb3642e5 -- vdsm-4.9.4-0.gb3642e5 - -* Wed Jan 25 2012 Dan Kenigsberg - 4.9.3.2-0 -- vdsm-4.9.3.2 -- Reverts "BZ#773666 - Fix HSM flows should not change rw permissions." - -* Mon Jan 16 2012 Federico Simoncelli - 4.9.3.1-0 -- vdsm-4.9.3.1 - -* Fri Jan 13 2012 Dan Kenigsberg - 4.9.2-1.git1d7b929 -- vdsm-4.9.2-g1d7b929 - -* Tue Jan 10 2012 Federico Simoncelli - 4.9.2-0.git951b41d -- vdsm-4.9.2-g951b41d - -* Fri Dec 02 2011 Federico Simoncelli - 4.9.1-2.git931a43e -- add the revision control comments to the specfile - -* Wed Nov 30 2011 Federico Simoncelli - 4.9.1-1.git6ee166c -- require iscsi-initiator-utils >= 6.2.0.872-14 bz442980 -- fix the rpmlint errors - -* Wed Oct 12 2011 Federico Simoncelli - 4.9.0-0 -- Initial upstream release - -* Thu Nov 02 2006 Simon Grinberg - 0.0-1 -- Initial build