Change in vdsm[master]: drop a few unused external scripts
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: drop a few unused external scripts
......................................................................
drop a few unused external scripts
Change-Id: I8763f965befce98df30c439cd1a41c5880a56556
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M lib/vdsm/constants.py.in
M vdsm/sudoers.vdsm.in
2 files changed, 0 insertions(+), 9 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/20/14220/1
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index e7e2f83..f7ed9d6 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -76,8 +76,6 @@
#
# External programs (sorted, please keep in order).
#
-EXT_ADDNETWORK = '@VDSMDIR@/addNetwork'
-
EXT_BLKID = '@BLKID_PATH@'
EXT_BLOCKDEV = '@BLOCKDEV_PATH@'
EXT_BRCTL = '@BRCTL_PATH@'
@@ -87,11 +85,8 @@
EXT_CP = '@CP_PATH@'
EXT_DD = '@DD_PATH@'
-EXT_DELNETWORK = '@VDSMDIR@/delNetwork'
EXT_DMIDECODE = '@DMIDECODE_PATH@'
EXT_DMSETUP = '@DMSETUP_PATH@'
-
-EXT_EDITNETWORK = '@VDSMDIR@/editNetwork'
EXT_FENCE_PREFIX = os.path.dirname('@FENCE_AGENT_PATH@') + '/fence_'
EXT_FSCK = '@FSCK_PATH@'
diff --git a/vdsm/sudoers.vdsm.in b/vdsm/sudoers.vdsm.in
index 9a78a3a..996f59a 100644
--- a/vdsm/sudoers.vdsm.in
+++ b/vdsm/sudoers.vdsm.in
@@ -1,8 +1,4 @@
Cmnd_Alias VDSM_LIFECYCLE = \
- @VDSMDIR@/addNetwork, \
- @VDSMDIR@/delNetwork, \
- @VDSMDIR@/editNetwork, \
- @VDSMDIR@/vdsm-store-net-config, \
@DMIDECODE_PATH@, \
@VDSMDIR@/mk_sysprep_floppy, \
@SERVICE_PATH@ ksmtuned *, \
--
To view, visit http://gerrit.ovirt.org/14220
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8763f965befce98df30c439cd1a41c5880a56556
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years
Change in vdsm[master]: netconf/ifcfg: remove only backup files
by Douglas Schilling Landgraf
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: netconf/ifcfg: remove only backup files
......................................................................
netconf/ifcfg: remove only backup files
clearBackups() removes the entire directory /var/lib/vdsm/netconfback/.
Because of that, TPS test (rpm -V vdsm) has failed.
This patch, will remove all files/directoies inside /var/lib/vdsm/netconfback/
and keep this directory.
Change-Id: Ie0144aef836011f5f3abf35086d349e25ca83683
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=958009
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M vdsm/netconf/ifcfg.py
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/99/14599/1
diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py
index e25f536..03be24c 100644
--- a/vdsm/netconf/ifcfg.py
+++ b/vdsm/netconf/ifcfg.py
@@ -455,7 +455,11 @@
@classmethod
def clearBackups(cls):
""" Clear backup files """
- shutil.rmtree(netinfo.NET_CONF_BACK_DIR, ignore_errors=True)
+ for f in glob.glob(netinfo.NET_CONF_BACK_DIR + "*"):
+ if os.path.isdir(f):
+ shutil.rmtree(f)
+ else:
+ os.remove(f)
@classmethod
def ifcfgPorts(cls, network):
--
To view, visit http://gerrit.ovirt.org/14599
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0144aef836011f5f3abf35086d349e25ca83683
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
11 years
Change in vdsm[master]: jsonRpcTests.ReactorTests.test is broken
by Dan Kenigsberg
Dan Kenigsberg has uploaded a new change for review.
Change subject: jsonRpcTests.ReactorTests.test is broken
......................................................................
jsonRpcTests.ReactorTests.test is broken
And I'm tired of its in-gerrit errors
http://jenkins.ovirt.org/job/vdsm_unit_tests_gerrit_el/1355/console
Change-Id: I8cdfc3edb4fd3f795ddd39e0581cffbcd549a383
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/jsonRpcTests.py
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/04/14604/1
diff --git a/tests/jsonRpcTests.py b/tests/jsonRpcTests.py
index 22aa2f8..31ade58 100644
--- a/tests/jsonRpcTests.py
+++ b/tests/jsonRpcTests.py
@@ -72,6 +72,9 @@
@expandPermutations
class ReactorTests(TestCaseBase):
+ @brokentest("We sometime see: "
+ "AssertionError: Data is not as expected "
+ "'Lorem ipsu...o eiusmod ' != 'Lorem ipsu... eiusmod t'")
@permutations(REACTOR_TYPE_PERMUTATIONS)
def test(self, reactorType):
data = dummyTextGenerator(((2 ** 10) * 200))
--
To view, visit http://gerrit.ovirt.org/14604
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8cdfc3edb4fd3f795ddd39e0581cffbcd549a383
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
11 years
Change in vdsm[master]: Moving panic function to utils and set panic mock for tests
by ybronhei@redhat.com
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Moving panic function to utils and set panic mock for tests
......................................................................
Moving panic function to utils and set panic mock for tests
The patch moves panic function to vdsm utils for general use.
During tests panic call will raise assertionError.
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
Change-Id: Ia2ae7ba76d6a935c0f8c8854bedce985376ed219
---
M lib/vdsm/utils.py
M tests/testrunner.py
M tests/utilsTests.py
M vdsm/storage/misc.py
M vdsm/storage/sp.py
M vdsm/supervdsm.py
6 files changed, 25 insertions(+), 10 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/27/14427/1
diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py
index cfec8cc..f1a31b6 100644
--- a/lib/vdsm/utils.py
+++ b/lib/vdsm/utils.py
@@ -36,6 +36,7 @@
import glob
import io
import logging
+import sys
import os
import pwd
import select
@@ -813,3 +814,9 @@
raise
time.sleep(sleep)
+
+
+def panic(msg):
+ logging.error("Panic: %s", msg, exc_info=True)
+ os.killpg(0, 9)
+ sys.exit(-3)
diff --git a/tests/testrunner.py b/tests/testrunner.py
index bbbb127..012dbe7 100644
--- a/tests/testrunner.py
+++ b/tests/testrunner.py
@@ -38,6 +38,15 @@
from testValidation import SlowTestsPlugin, StressTestsPlugin
+
+# Mock panic() for tests. Instead of exit, raising AssertionError for tests
+def panicMock(msg):
+ msg = "Panic: %s" % (msg)
+ raise AssertionError(msg)
+
+from vdsm import utils
+utils.panic = panicMock
+
import zombieReaper
zombieReaper.registerSignalHandler()
diff --git a/tests/utilsTests.py b/tests/utilsTests.py
index dcc78ed..758bc8a 100644
--- a/tests/utilsTests.py
+++ b/tests/utilsTests.py
@@ -75,3 +75,8 @@
self.assertEquals(e.errno, errno.ENOENT)
self.assertTrue(NAME in e.strerror,
msg='%s not in %s' % (NAME, e.strerror))
+
+
+class GeneralUtilsTests(TestCaseBase):
+ def testPanic(self):
+ self.assertRaises(AssertionError, utils.panic, "panic test")
diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py
index b500f25..7c735b6 100644
--- a/vdsm/storage/misc.py
+++ b/vdsm/storage/misc.py
@@ -159,12 +159,6 @@
return result
-def panic(msg):
- log.error("Panic: %s", msg, exc_info=True)
- os.killpg(0, 9)
- sys.exit(-3)
-
-
execCmdLogger = enableLogSkip(logging.getLogger('Storage.Misc.excCmd'),
ignoreSourceFiles=[__file__],
logSkipName="Storage.Misc.excCmd")
diff --git a/vdsm/storage/sp.py b/vdsm/storage/sp.py
index 39ea182..ed79808 100644
--- a/vdsm/storage/sp.py
+++ b/vdsm/storage/sp.py
@@ -32,7 +32,7 @@
from imageRepository.formatConverter import DefaultFormatConverter
-from vdsm import constants
+from vdsm import constants, utils
import storage_mailbox
import blockSD
import fileSD
@@ -388,7 +388,7 @@
try:
blockSD.BlockStorageDomain.doUnmountMaster(master)
except se.StorageDomainMasterUnmountError as e:
- misc.panic("unmount %s failed - %s" % (master, e))
+ utils.panic("unmount %s failed - %s" % (master, e))
else:
cls.log.debug("master `%s` is not mounted, skipping", master)
@@ -429,7 +429,7 @@
stopFailed = True
if stopFailed:
- misc.panic("Unrecoverable errors during SPM stop process.")
+ utils.panic("Unrecoverable errors during SPM stop process.")
self.spmRole = SPM_FREE
diff --git a/vdsm/supervdsm.py b/vdsm/supervdsm.py
index 720be05..b69d6ea 100644
--- a/vdsm/supervdsm.py
+++ b/vdsm/supervdsm.py
@@ -201,7 +201,7 @@
# more time than expected.
utils.retry(self._connect, Exception, timeout=60, tries=3)
except:
- misc.panic("Couldn't connect to supervdsm")
+ utils.panic("Couldn't connect to supervdsm")
def __getattr__(self, name):
return ProxyCaller(self, name)
--
To view, visit http://gerrit.ovirt.org/14427
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2ae7ba76d6a935c0f8c8854bedce985376ed219
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
11 years