Change in vdsm[master]: Avoid redundant check for volume create rollback.
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: Avoid redundant check for volume create rollback.
......................................................................
Avoid redundant check for volume create rollback.
The same check will be called during volume delete.
In addition removing createVolumeRollbackError, code 228.
Change-Id: I77e9a1e6c38cbd35f99aecf1422d874fff21449b
Related-to: BZ#960952
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/storage_exception.py
M vdsm/storage/volume.py
2 files changed, 3 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/64/15764/1
diff --git a/vdsm/storage/storage_exception.py b/vdsm/storage/storage_exception.py
index ed2566b..92cf9b8 100644
--- a/vdsm/storage/storage_exception.py
+++ b/vdsm/storage/storage_exception.py
@@ -304,9 +304,9 @@
message = "Cannot prepare illegal volume"
-class createVolumeRollbackError(StorageException):
- code = 228
- message = "Failure create volume rollback"
+# class createVolumeRollbackError(StorageException):
+# code = 228
+# message = "Failure create volume rollback"
class createVolumeSizeError(StorageException):
diff --git a/vdsm/storage/volume.py b/vdsm/storage/volume.py
index 36e8d30..1c81d87 100644
--- a/vdsm/storage/volume.py
+++ b/vdsm/storage/volume.py
@@ -371,9 +371,6 @@
"volUUID=%s imageDir=%s" %
(repoPath, sdUUID, imgUUID, volUUID, imageDir))
vol = sdCache.produce(sdUUID).produceVolume(imgUUID, volUUID)
- # Avoid rollback if volume has children
- if len(vol.getChildrenList()):
- raise se.createVolumeRollbackError(volUUID)
pvol = vol.getParentVolume()
# Remove volume
vol.delete(postZero=False, force=True)
--
To view, visit http://gerrit.ovirt.org/15764
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I77e9a1e6c38cbd35f99aecf1422d874fff21449b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
9 years, 12 months
Change in vdsm[ovirt-3.3]: image: produce volume in order to shrink after merge
by ykaplan@redhat.com
Hello Ayal Baron,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/19983
to review the following change.
Change subject: image: produce volume in order to shrink after merge
......................................................................
image: produce volume in order to shrink after merge
Create of new volume in case of raw base volume,
causes us to work on a stale object when shrinking
the merged volume.
Change-Id: I5b0969c3144b51ff22a7f5eb756563cf178ffb36
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1015071
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/19883
Reviewed-by: Ayal Baron <abaron(a)redhat.com>
---
M vdsm/storage/image.py
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/83/19983/1
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index da3e42d..08eca25 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -1002,8 +1002,8 @@
# Step 3: Rename successor as to _remove_me__successor
tmpUUID = self.deletedVolumeName(srcVol.volUUID)
- # Step 4: Rename successor_MERGE to successor
srcVol.rename(tmpUUID)
+ # Step 4: Rename successor_MERGE to successor
newVol.rename(srcVolParams['volUUID'])
# Step 5: Rebase children 'unsafely' on top of new volume
@@ -1132,8 +1132,10 @@
self.log.error("Failure to remove subchain %s -> %s in image %s",
ancestor, successor, imgUUID, exc_info=True)
+ newVol = sdDom.produceVolume(imgUUID=srcVolParams['imgUUID'],
+ volUUID=srcVolParams['volUUID'])
try:
- srcVol.shrinkToOptimalSize()
+ newVol.shrinkToOptimalSize()
except qemuImg.QImgError:
self.log.warning("Auto shrink after merge failed", exc_info=True)
--
To view, visit http://gerrit.ovirt.org/19983
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b0969c3144b51ff22a7f5eb756563cf178ffb36
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
9 years, 12 months
Change in vdsm[master]: image: Return the new volume after merge
by ykaplan@redhat.com
Yeela Kaplan has uploaded a new change for review.
Change subject: image: Return the new volume after merge
......................................................................
image: Return the new volume after merge
Create of new volume in case of raw base volume,
causes us to work on a stale object when shrinking
the merged volume.
Returning the volume object in other two scenarios in
order to protect us from changes made to the volume
object in the future.
Change-Id: I5b0969c3144b51ff22a7f5eb756563cf178ffb36
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1015071
Signed-off-by: Yeela Kaplan <ykaplan(a)redhat.com>
---
M vdsm/storage/image.py
1 file changed, 7 insertions(+), 7 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/83/19883/1
diff --git a/vdsm/storage/image.py b/vdsm/storage/image.py
index da3e42d..785f379 100644
--- a/vdsm/storage/image.py
+++ b/vdsm/storage/image.py
@@ -881,7 +881,7 @@
chain.remove(srcVolParams['volUUID'])
self.__teardownSubChain(sdDom.sdUUID, srcVolParams['imgUUID'], chain)
- return chain
+ return chain, srcVol
def _baseCowVolumeMerge(self, sdDom, srcVolParams, volParams, newSize,
chain):
@@ -951,7 +951,7 @@
chain.remove(srcVolParams['volUUID'])
self.__teardownSubChain(sdDom.sdUUID, srcVolParams['imgUUID'], chain)
- return chain
+ return chain, srcVol
def _baseRawVolumeMerge(self, sdDom, srcVolParams, volParams, chain):
"""
@@ -1002,8 +1002,8 @@
# Step 3: Rename successor as to _remove_me__successor
tmpUUID = self.deletedVolumeName(srcVol.volUUID)
- # Step 4: Rename successor_MERGE to successor
srcVol.rename(tmpUUID)
+ # Step 4: Rename successor_MERGE to successor
newVol.rename(srcVolParams['volUUID'])
# Step 5: Rebase children 'unsafely' on top of new volume
@@ -1025,7 +1025,7 @@
vol in chain if srcVol.volUUID != srcVolParams['volUUID']]
rmChain.append(tmpUUID)
- return rmChain
+ return rmChain, newVol
def subChainSizeCalc(self, ancestor, successor, vols):
"""
@@ -1094,7 +1094,7 @@
# The ancestor isn't a base volume of the chain.
self.log.info("Internal volume merge: src = %s dst = %s",
srcVol.getVolumePath(), dstVol.getVolumePath())
- chainToRemove = self._internalVolumeMerge(
+ chainToRemove, srcVol = self._internalVolumeMerge(
sdDom, srcVolParams, volParams, reqSize, chain)
# The ancestor is actually a base volume of the chain.
# We have 2 cases here:
@@ -1103,13 +1103,13 @@
elif volParams['volFormat'] == volume.RAW_FORMAT:
self.log.info("merge with convert: src = %s dst = %s",
srcVol.getVolumePath(), dstVol.getVolumePath())
- chainToRemove = self._baseRawVolumeMerge(
+ chainToRemove, srcVol = self._baseRawVolumeMerge(
sdDom, srcVolParams, volParams,
[vols[vName] for vName in chain])
else:
self.log.info("4 steps merge: src = %s dst = %s",
srcVol.getVolumePath(), dstVol.getVolumePath())
- chainToRemove = self._baseCowVolumeMerge(
+ chainToRemove, srcVol = self._baseCowVolumeMerge(
sdDom, srcVolParams, volParams, reqSize, chain)
# This is unrecoverable point, clear all recoveries
--
To view, visit http://gerrit.ovirt.org/19883
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b0969c3144b51ff22a7f5eb756563cf178ffb36
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yeela Kaplan <ykaplan(a)redhat.com>
9 years, 12 months
Change in vdsm[ovirt-3.3.0]: vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks
by Dan Kenigsberg
Hello Vinzenz Feenstra, Michal Skrivanek, Martin Polednik,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/19950
to review the following change.
Change subject: vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks
......................................................................
vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks
_getUnderlyingDriveInfo() is broken by design. It has no reliable means
to match Engine-requested devices with libvirt-produced ones. As a
heuristic, it uses the device's as matching key. However, before this
patch, it failed to extract the path from the xml definition of gluster
disks.
Bug-Url: https://bugzilla.redhat.com/1007980
Change-Id: I4459916cab24d735c067a6eb7020d4f43505fc97
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/19906
Reviewed-by: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Reviewed-by: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Reviewed-by: Martin Polednik <mpoledni(a)redhat.com>
Tested-by: Martin Polednik <mpoledni(a)redhat.com>
---
M vdsm/vm.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/50/19950/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index f0690b7..662eacc 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -4579,7 +4579,8 @@
sources = x.getElementsByTagName('source')
if sources:
devPath = (sources[0].getAttribute('file') or
- sources[0].getAttribute('dev'))
+ sources[0].getAttribute('dev') or
+ sources[0].getAttribute('name'))
else:
devPath = ''
--
To view, visit http://gerrit.ovirt.org/19950
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4459916cab24d735c067a6eb7020d4f43505fc97
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3.0
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoledni(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
9 years, 12 months
Change in vdsm[ovirt-3.3]: vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks
by Dan Kenigsberg
Hello Vinzenz Feenstra, Michal Skrivanek, Martin Polednik,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/19949
to review the following change.
Change subject: vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks
......................................................................
vm.Vm._getUnderlyingDriveInfo: extract path of gluster disks
_getUnderlyingDriveInfo() is broken by design. It has no reliable means
to match Engine-requested devices with libvirt-produced ones. As a
heuristic, it uses the device's as matching key. However, before this
patch, it failed to extract the path from the xml definition of gluster
disks.
Bug-Url: https://bugzilla.redhat.com/1007980
Change-Id: I4459916cab24d735c067a6eb7020d4f43505fc97
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
Reviewed-on: http://gerrit.ovirt.org/19906
Reviewed-by: Vinzenz Feenstra <vfeenstr(a)redhat.com>
Reviewed-by: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Reviewed-by: Martin Polednik <mpoledni(a)redhat.com>
Tested-by: Martin Polednik <mpoledni(a)redhat.com>
---
M vdsm/vm.py
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/49/19949/1
diff --git a/vdsm/vm.py b/vdsm/vm.py
index 4333170..d73671b 100644
--- a/vdsm/vm.py
+++ b/vdsm/vm.py
@@ -4562,7 +4562,8 @@
sources = x.getElementsByTagName('source')
if sources:
devPath = (sources[0].getAttribute('file') or
- sources[0].getAttribute('dev'))
+ sources[0].getAttribute('dev') or
+ sources[0].getAttribute('name'))
else:
devPath = ''
--
To view, visit http://gerrit.ovirt.org/19949
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4459916cab24d735c067a6eb7020d4f43505fc97
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.3
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Martin Polednik <mpoledni(a)redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek(a)redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr(a)redhat.com>
9 years, 12 months
Change in vdsm[master]: gluster: remove unwanted error codes
by barumuga@redhat.com
Hello Timothy Asir, Saggi Mizrahi, Aravinda VK, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/19922
to review the following change.
Change subject: gluster: remove unwanted error codes
......................................................................
gluster: remove unwanted error codes
This patch fixes to remove unwanted error codes which are no longer
needed.
Change-Id: I20284121a14b1e0f9f2d7c56c2f867eb71791bfd
Signed-off-by: Bala.FA <barumuga(a)redhat.com>
---
M vdsm/gluster/exception.py
1 file changed, 0 insertions(+), 45 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/22/19922/1
diff --git a/vdsm/gluster/exception.py b/vdsm/gluster/exception.py
index 1d9399f..20c157e 100644
--- a/vdsm/gluster/exception.py
+++ b/vdsm/gluster/exception.py
@@ -356,51 +356,6 @@
message = "Volume tasks list failed"
-class GlusterTaskNotFoundException(GlusterVolumeException):
- code = 4162
- message = "Task not found"
-
- def __init__(self, taskId):
- self.taskId = taskId
- s = 'task id: %s' % taskId
- self.err = [s]
-
-
-class GlusterTaskActionNotFoundException(GlusterVolumeException):
- code = 4163
- message = "Task action not found"
-
- def __init__(self, taskId, action):
- self.taskId = taskId
- self.action = action
- s = 'Action %s not found for task %s' % (action, taskId)
- self.err = [s]
-
-
-class GlusterTaskActionUnsupportedException(GlusterVolumeException):
- code = 4164
- message = "Task action unsupported"
-
- def __init__(self, taskId, taskType, action):
- self.taskId = taskId
- self.taskType = taskType
- self.action = action
- s = 'Unsupported action %s for task %s and type %s' % \
- (action, taskId, taskType)
- self.err = [s]
-
-
-class GlusterTaskTypeUnknownException(GlusterVolumeException):
- code = 4165
- message = "Task type unknown"
-
- def __init__(self, taskId, taskType):
- self.taskId = taskId
- self.taskType = taskType
- s = 'Unknown task type %s for task %s' % (taskId, taskType)
- self.err = [s]
-
-
# Host
class GlusterHostException(GlusterException):
code = 4400
--
To view, visit http://gerrit.ovirt.org/19922
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I20284121a14b1e0f9f2d7c56c2f867eb71791bfd
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Aravinda VK <avishwan(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin(a)redhat.com>
9 years, 12 months
Change in vdsm[master]: Bogus rpm availability jenkins job test
by asegurap@redhat.com
Antoni Segura Puimedon has uploaded a new change for review.
Change subject: Bogus rpm availability jenkins job test
......................................................................
Bogus rpm availability jenkins job test
Change-Id: I43ea5ffb9fcde3cf28906906bd10fdda58cbbdde
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M vdsm.spec.in
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/62/19962/1
diff --git a/vdsm.spec.in b/vdsm.spec.in
index 0b1727f..b49649f 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -169,7 +169,7 @@
Requires: fence-agents
%endif
# Subprocess and thread bug was found on python 2.7.2
-Requires: python >= 2.7.3
+Requires: python >= 2.7.9
Requires: qemu-kvm >= 2:0.15.0-4
Requires: qemu-img >= 2:0.15.0-4
Requires: python-ethtool >= 0.8-1
--
To view, visit http://gerrit.ovirt.org/19962
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I43ea5ffb9fcde3cf28906906bd10fdda58cbbdde
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>
9 years, 12 months
Change in vdsm[master]: tests: Let dummy interfaces destroied after cleaning up netw...
by wudxw@linux.vnet.ibm.com
Mark Wu has uploaded a new change for review.
Change subject: tests: Let dummy interfaces destroied after cleaning up networks.
......................................................................
tests: Let dummy interfaces destroied after cleaning up networks.
If dummy interfaces are destroied before cleaning up newtowrks, it
will fail to restore network with this error:
'Missing required nics for bonding device.'
Change-Id: I8dd6c75794244069b035676ea67641f8a3d3964f
Signed-off-by: Mark Wu <wudxw(a)linux.vnet.ibm.com>
---
M tests/functional/dummy.py
M tests/functional/networkTests.py
M tests/functional/utils.py
3 files changed, 3 insertions(+), 58 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/09/19609/1
diff --git a/tests/functional/dummy.py b/tests/functional/dummy.py
index f285cc4..74d8c94 100644
--- a/tests/functional/dummy.py
+++ b/tests/functional/dummy.py
@@ -21,6 +21,7 @@
from nose.plugins.skip import SkipTest
+from utils import restoreNetConfig
from vdsm.ipwrapper import linkAdd, linkDel, addrAdd, linkSet, IPRoute2Error
@@ -88,6 +89,7 @@
dummies = [create() for _ in range(num)]
yield dummies
except Exception:
+ restoreNetConfig()
raise
finally:
for dummy in dummies:
diff --git a/tests/functional/networkTests.py b/tests/functional/networkTests.py
index beb5ae7..87ab8d0 100644
--- a/tests/functional/networkTests.py
+++ b/tests/functional/networkTests.py
@@ -28,7 +28,7 @@
import dummy
from dummy import dummyIf
-from utils import cleanupNet, restoreNetConfig, SUCCESS, VdsProxy, cleanupRules
+from utils import restoreNetConfig, SUCCESS, VdsProxy, cleanupRules
from vdsm.ipwrapper import (ruleAdd, ruleDel, routeAdd, routeDel, routeExists,
ruleExists, Route, Rule)
@@ -104,7 +104,6 @@
def setUp(self):
self.vdsm_net = VdsProxy()
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -139,7 +138,6 @@
self.vdsm_net.vlanExists(BONDING_NAME + '.' +
networks[vlan_net]['vlan']))
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -160,7 +158,6 @@
self.assertEqual(status, SUCCESS, msg)
self.assertFalse(self.vdsm_net.networkExists(NETWORK_NAME))
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -192,7 +189,6 @@
{BONDING_NAME: {'remove': True}}, {'connectivityCheck': False})
self.assertEqual(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -211,7 +207,6 @@
self.assertEqual(status, SUCCESS, msg)
self.assertFalse(self.vdsm_net.networkExists(NETWORK_NAME))
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -229,7 +224,6 @@
self.assertEqual(status, SUCCESS, msg)
self.assertFalse(self.vdsm_net.networkExists(NETWORK_NAME))
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -244,14 +238,12 @@
bridged})
self.assertEqual(status, neterrors.ERR_BAD_BONDING, msg)
- @cleanupNet
def testFailWithInvalidBridgeName(self):
invalid_bridge_names = ('a' * 16, 'a b', 'a\tb', 'a.b', 'a:b')
for bridge_name in invalid_bridge_names:
status, msg = self.vdsm_net.addNetwork(bridge_name)
self.assertEqual(status, neterrors.ERR_BAD_BRIDGE, msg)
- @cleanupNet
def testFailWithInvalidIpConfig(self):
invalid_ip_configs = (dict(IPADDR='1.2.3.4'), dict(NETMASK='1.2.3.4'),
dict(GATEWAY='1.2.3.4'),
@@ -267,7 +259,6 @@
opts=ipconfig)
self.assertEqual(status, neterrors.ERR_BAD_ADDR, msg)
- @cleanupNet
@permutations([[True], [False]])
def testFailWithInvalidNic(self, bridged):
status, msg = self.vdsm_net.addNetwork(NETWORK_NAME,
@@ -276,7 +267,6 @@
self.assertEqual(status, neterrors.ERR_BAD_NIC, msg)
- @cleanupNet
@permutations([[True], [False]])
def testFailWithInvalidParams(self, bridged):
status, msg = self.vdsm_net.addNetwork(NETWORK_NAME, VLAN_ID,
@@ -288,7 +278,6 @@
opts={'bridged': bridged})
self.assertEqual(status, neterrors.ERR_BAD_PARAMS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -319,7 +308,6 @@
self.vdsm_net.delNetwork(netVlan)
self.assertEquals(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -338,7 +326,6 @@
self.vdsm_net.delNetwork(NETWORK_NAME)
self.assertEquals(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -373,7 +360,6 @@
nics=nics)
self.assertEqual(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -393,7 +379,6 @@
nics=nics)
self.assertEqual(status, SUCCESS, msg)
- @cleanupNet
@RequireDummyMod
@ValidateRunningAsRoot
def testQosNetwork(self):
@@ -416,7 +401,6 @@
self.assertEqual(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -439,7 +423,6 @@
status, msg = self.vdsm_net.delNetwork(NETWORK_NAME)
self.assertEqual(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -455,7 +438,6 @@
status, msg = self.vdsm_net.delNetwork(NETWORK_NAME)
self.assertEqual(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -465,7 +447,6 @@
opts={'bridged': bridged})
self.assertEqual(status, neterrors.ERR_BAD_BRIDGE, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -476,7 +457,6 @@
opts={'bridged': bridged})
self.assertEqual(status, neterrors.ERR_BAD_BRIDGE, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -498,7 +478,6 @@
{}, {})
self.assertEqual(status, SUCCESS, msg)
- @cleanupNet
@RequireDummyMod
@ValidateRunningAsRoot
def testSetupNetworksConvertVlanNetBridgeness(self):
@@ -560,7 +539,6 @@
self.assertFalse(
self.vdsm_net.vlanExists(nic + '.' + tag))
- @cleanupNet
@RequireDummyMod
@ValidateRunningAsRoot
def testSetupNetworksNetCompatibilityBondSingleBridge(self):
@@ -626,7 +604,6 @@
self.assertFalse(self.vdsm_net.bondExists(
BONDING_NAME, nics=nics))
- @cleanupNet
@RequireDummyMod
@ValidateRunningAsRoot
def testSetupNetworksNetCompatibilityBondSingleBridgeless(self):
@@ -699,7 +676,6 @@
netNameVlanBridged))
self.assertFalse(self.vdsm_net.bondExists(BONDING_NAME, nics))
- @cleanupNet
@RequireDummyMod
@ValidateRunningAsRoot
def testSetupNetworksNetCompatibilityNicSingleBridge(self):
@@ -760,7 +736,6 @@
self.assertEquals(status, SUCCESS, msg)
self.assertFalse(self.vdsm_net.networkExists(NETWORK_NAME))
- @cleanupNet
@RequireDummyMod
@ValidateRunningAsRoot
def testSetupNetworksNetCompatibilityNicSingleBridgeless(self):
@@ -829,7 +804,6 @@
self.assertFalse(self.vdsm_net.networkExists(
netNameVlanBridged, bridged=True))
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -876,7 +850,6 @@
bondings, {})
self.assertEquals(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -952,7 +925,6 @@
self.assertEquals(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -990,7 +962,6 @@
{}, {})
self.assertEquals(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -1024,7 +995,6 @@
{})
self.assertEquals(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -1076,7 +1046,6 @@
{})
self.assertEquals(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
def testSetupNetworksAddBadParams(self, bridged):
attrs = dict(vlan=VLAN_ID, bridged=bridged)
@@ -1085,7 +1054,6 @@
self.assertNotEqual(status, SUCCESS, msg)
- @cleanupNet
@RequireDummyMod
@ValidateRunningAsRoot
def testDelNetworkBondAccumulation(self):
@@ -1104,7 +1072,6 @@
self.assertFalse(self.vdsm_net.bondExists(bigBond, nics))
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -1145,7 +1112,6 @@
self.assertEquals(status, SUCCESS, msg)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -1171,7 +1137,6 @@
macAddress2 = _getBondHwAddress(nics[1], nics[0])
self.assertEquals(macAddress1, macAddress2)
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -1198,7 +1163,6 @@
self.vdsm_net.save_config()
- @cleanupNet
@permutations([[True], [False]])
@RequireDummyMod
@ValidateRunningAsRoot
@@ -1258,7 +1222,6 @@
self.assertFalse(routeExists(route))
@permutations([[True], [False]])
- @cleanupNet
@RequireDummyMod
@ValidateRunningAsRoot
def testStaticSourceRouting(self, bridged=True):
@@ -1300,7 +1263,6 @@
for rule in rules:
self.assertFalse(ruleExists(rule))
- @cleanupNet
@RequireDummyMod
@ValidateRunningAsRoot
def testAddVlanedBridgeless(self):
@@ -1348,7 +1310,6 @@
{}, {})
self.assertEqual(status, SUCCESS, msg)
- @cleanupNet
@RequireDummyMod
@ValidateRunningAsRoot
def testAddVlanedBridgeless_oneCommand(self):
diff --git a/tests/functional/utils.py b/tests/functional/utils.py
index 70e54a2..8e2e8b1 100644
--- a/tests/functional/utils.py
+++ b/tests/functional/utils.py
@@ -38,24 +38,6 @@
)
-def cleanupNet(func):
- """
- Restored a previously persisted network config
- in case of a test failure, traceback is kept.
- Assumes root privileges.
- """
-
- @wraps(func)
- def wrapper(*args, **kwargs):
- try:
- func(*args, **kwargs)
- except Exception:
- # cleanup
- restoreNetConfig()
- raise
- return wrapper
-
-
def restoreNetConfig():
cmd_service = [service.cmd, "vdsm-restore-net-config", "restart"]
utils.execCmd(cmd_service, sudo=True)
--
To view, visit http://gerrit.ovirt.org/19609
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8dd6c75794244069b035676ea67641f8a3d3964f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw(a)linux.vnet.ibm.com>
9 years, 12 months
Change in vdsm[master]: gluster: fix missing error code error during jenkins build
by tjeyasin@redhat.com
Hello Ayal Baron, Bala.FA, Saggi Mizrahi, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/19956
to review the following change.
Change subject: gluster: fix missing error code error during jenkins build
......................................................................
gluster: fix missing error code error during jenkins build
Remove unused error codes:
4162, 4163, 4164, 4165
from vdsm/gluster/exception.py
Change-Id: I3364743666c4291ad3f7b72e82fdce89255c7e1a
Signed-off-by: Timothy Asir <tjeyasin(a)redhat.com>
---
M vdsm/gluster/exception.py
1 file changed, 0 insertions(+), 45 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/56/19956/1
diff --git a/vdsm/gluster/exception.py b/vdsm/gluster/exception.py
index 1d9399f..20c157e 100644
--- a/vdsm/gluster/exception.py
+++ b/vdsm/gluster/exception.py
@@ -356,51 +356,6 @@
message = "Volume tasks list failed"
-class GlusterTaskNotFoundException(GlusterVolumeException):
- code = 4162
- message = "Task not found"
-
- def __init__(self, taskId):
- self.taskId = taskId
- s = 'task id: %s' % taskId
- self.err = [s]
-
-
-class GlusterTaskActionNotFoundException(GlusterVolumeException):
- code = 4163
- message = "Task action not found"
-
- def __init__(self, taskId, action):
- self.taskId = taskId
- self.action = action
- s = 'Action %s not found for task %s' % (action, taskId)
- self.err = [s]
-
-
-class GlusterTaskActionUnsupportedException(GlusterVolumeException):
- code = 4164
- message = "Task action unsupported"
-
- def __init__(self, taskId, taskType, action):
- self.taskId = taskId
- self.taskType = taskType
- self.action = action
- s = 'Unsupported action %s for task %s and type %s' % \
- (action, taskId, taskType)
- self.err = [s]
-
-
-class GlusterTaskTypeUnknownException(GlusterVolumeException):
- code = 4165
- message = "Task type unknown"
-
- def __init__(self, taskId, taskType):
- self.taskId = taskId
- self.taskType = taskType
- s = 'Unknown task type %s for task %s' % (taskId, taskType)
- self.err = [s]
-
-
# Host
class GlusterHostException(GlusterException):
code = 4400
--
To view, visit http://gerrit.ovirt.org/19956
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3364743666c4291ad3f7b72e82fdce89255c7e1a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Timothy Asir <tjeyasin(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
9 years, 12 months
Change in vdsm[master]: Fix getStorageDomainInfo() logic.
by ewarszaw@redhat.com
Eduardo has uploaded a new change for review.
Change subject: Fix getStorageDomainInfo() logic.
......................................................................
Fix getStorageDomainInfo() logic.
Making repoStats pool independent.
Change-Id: I8b0b2ad3dca19cf203d937c1a9f6a12ab0f1095f
Signed-off-by: Eduardo <ewarszaw(a)redhat.com>
---
M vdsm/storage/hsm.py
1 file changed, 18 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/71/14671/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index c90ea07..9a44795 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -2664,17 +2664,26 @@
# BC) so it's not that horrible. In any case please
# remove this when we can stop supporting this API.
info.update({'lver': -1, 'spm_id': -1, 'master_ver': 0})
- if dom.getDomainRole() == sd.MASTER_DOMAIN:
- # make sure it's THE master
+ if info['role'] == sd.MASTER_DOMAIN:
try:
- pool = self.getPool(dom.getPools()[0])
- if pool.masterDomain.sdUUID == sdUUID:
- poolInfo = pool.getInfo()
- for key in ['lver', 'spm_id', 'master_ver']:
- info[key] = poolInfo['info'][key]
+ pool = self.getPool(info['pool'][0])
+ except IndexError:
+ self.log.error("Domain %s is marked as master but is not "
+ "attached to any pool", sdUUID, exc_info=True)
except se.StoragePoolUnknown:
- # Its pool is not connected
- pass
+ self.log.error("Domain %s, marked as master, is attached to "
+ "pool %s but this host is connected to pool %s",
+ sdUUID, pool.spUUID)
+ else:
+ # make sure it's THE master of this pool
+ if pool.masterDomain.sdUUID != sdUUID:
+ self.log.error("Domain %s is marked as master but actual "
+ "master is %s",
+ sdUUID, pool.masterDomain.sdUUID)
+ else:
+ poolInfo = pool.getInfo()
+ for key in ('lver', 'spm_id', 'master_ver'):
+ info[key] = poolInfo['info'][key]
return dict(info=info)
--
To view, visit http://gerrit.ovirt.org/14671
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b0b2ad3dca19cf203d937c1a9f6a12ab0f1095f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Eduardo <ewarszaw(a)redhat.com>
9 years, 12 months