Hello Ayal Baron, Timothy Asir, Saggi Mizrahi, Federico Simoncelli, Dan Kenigsberg,
I'd like you to do a code review. Please visit
http://gerrit.ovirt.org/8689
to review the following change.
Change subject: Change in error message format
......................................................................
Change in error message format
out, err or rc is added to error message only if its non-empty.
Change-Id: Idb948bb212ae866600aabad2190ff52f2cbc05bf
Signed-off-by: Bala.FA <barumuga(a)redhat.com>
---
M vdsm/gluster/exception.py
1 file changed, 14 insertions(+), 6 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/89/8689/1
diff --git a/vdsm/gluster/exception.py b/vdsm/gluster/exception.py
index 6d94ae3..98f6c33 100644
--- a/vdsm/gluster/exception.py
+++ b/vdsm/gluster/exception.py
@@ -46,12 +46,20 @@
self.err = err
def __str__(self):
- return '%s\nerror: %s%s%sreturn code: %s' % \
- (self.message,
- ('\n'.join(self.out) + '\n') if self.out else '',
- ('\n'.join(self.err) + '\n') if self.err else '',
- '\n' if not (self.out or self.err) else '',
- self.rc)
+ o = '\n'.join(self.out)
+ e = '\n'.join(self.err)
+ if o and e:
+ m = o + '\n' + e
+ else:
+ m = o or e
+
+ s = self.message
+ if m:
+ s += '\nerror: ' + m
+ if self.rc:
+ s += '\nreturn code: %s' % self.rc
+
+ return s
def response(self):
return {'status': {'code': self.code, 'message': str(self),
--
To view, visit http://gerrit.ovirt.org/8689
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb948bb212ae866600aabad2190ff52f2cbc05bf
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Bala.FA <barumuga(a)redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Timothy Asir <tjeyasin(a)redhat.com>
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Refresh mounts in same thread with the initialization of hsm
......................................................................
Refresh mounts in same thread with the initialization of hsm
Using external thread for refreshStorage can cause a race in working on
mount during the refresh process.
Verifing links and recovering tasks should be done before enabling
creation of new procedures.
Bug-Id: https://bugzilla.redhat.com/show_bug.cgi?id=872270i
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
Change-Id: If5bd7bd588f68c9eaaccbf9004ad238d0e49c9c3
---
M vdsm/storage/hsm.py
1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/05/9005/1
diff --git a/vdsm/storage/hsm.py b/vdsm/storage/hsm.py
index 0c9160c..682a1bd 100644
--- a/vdsm/storage/hsm.py
+++ b/vdsm/storage/hsm.py
@@ -345,10 +345,12 @@
self.log.warn("Failed to clean Storage Repository.", exc_info=True)
fileUtils.createdir(self.tasksDir)
- # TBD: Should this be run in connectStoragePool? Should tasksDir exist under pool link as well (for hsm tasks)
+ # TBD: Should this be run in connectStoragePool?
+ # Should tasksDir exist under pool link as well (for hsm tasks)
self.taskMng.loadDumpedTasks(self.tasksDir)
self.taskMng.recoverDumpedTasks()
+ def connectPools():
_poolsTmpDir = config.get('irs', 'pools_data_dir')
dirList = os.listdir(_poolsTmpDir)
for spUUID in dirList:
@@ -361,7 +363,12 @@
except Exception:
self.log.error("Unexpected error", exc_info=True)
- threading.Thread(target=storageRefresh).start()
+ # This part should be in same thread to prevent race on mounted path,
+ # otherwise, storageRefresh can unlink path that is used by another
+ # thread that was initiated in the same time and tried to use the
+ # same link.
+ storageRefresh()
+ connectPools()
def _hsmSchedule(self, name, func, *args):
self.taskMng.scheduleJob("hsm", self.tasksDir, vars.task, name, func, *args)
--
To view, visit http://gerrit.ovirt.org/9005
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If5bd7bd588f68c9eaaccbf9004ad238d0e49c9c3
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>
Saggi Mizrahi has uploaded a new change for review.
Change subject: Set up better threading in tests to make sure it happens correctly
......................................................................
Set up better threading in tests to make sure it happens correctly
Change-Id: Ibc1c7fca8e59feb4f772b2aa5e45e3d6d00b8531
Signed-off-by: Saggi Mizrahi <smizrahi(a)redhat.com>
---
M tests/testrunner.py
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/93/8793/1
diff --git a/tests/testrunner.py b/tests/testrunner.py
index cdbc9d3..3fc2512 100644
--- a/tests/testrunner.py
+++ b/tests/testrunner.py
@@ -27,6 +27,14 @@
from nose import core
from nose import result
+# Monkey patch better threading
+import threading
+import betterThreading
+
+# Make pyflakes happy
+threading.__name__
+betterThreading.__name__
+
from testValidation import SlowTestsPlugin
PERMUTATION_ATTR = "_permutations_"
--
To view, visit http://gerrit.ovirt.org/8793
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc1c7fca8e59feb4f772b2aa5e45e3d6d00b8531
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Saggi Mizrahi <smizrahi(a)redhat.com>
Federico Simoncelli has uploaded a new change for review.
Change subject: fileVolume: make getVSize a real classmethod
......................................................................
fileVolume: make getVSize a real classmethod
Until now fileVolume even if declared as classmethod it was actually
relying on producing the object to obtain the required information. This
patch makes it a real classmethod, which is particularly useful to be
used also with an half-baked volume.
Bug-Url: https://bugzilla.redhat.com/871811
Signed-off-by: Federico Simoncelli <fsimonce(a)redhat.com>
Change-Id: I336d4e763da4ddc3c0dd8eacb68e84305995e6ab
---
M vdsm/storage/fileVolume.py
1 file changed, 5 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/95/8995/1
diff --git a/vdsm/storage/fileVolume.py b/vdsm/storage/fileVolume.py
index f19fa26..e2f4e85 100644
--- a/vdsm/storage/fileVolume.py
+++ b/vdsm/storage/fileVolume.py
@@ -460,7 +460,11 @@
@classmethod
def getVSize(cls, sdobj, imgUUID, volUUID, bs=512):
- return sdobj.produceVolume(imgUUID, volUUID).getVolumeSize(bs)
+ imagePath = image.Image(sdobj._getRepoPath()).getImageDir(
+ sdobj.sdUUID, imgUUID)
+ volPath = os.path.join(imagePath, volUUID)
+ stSize = oop.getProcessPool(sdobj.sdUUID).os.stat(volPath).st_size
+ return int(stSize / bs)
@classmethod
def getVTrueSize(cls, sdobj, imgUUID, volUUID, bs=512):
--
To view, visit http://gerrit.ovirt.org/8995
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I336d4e763da4ddc3c0dd8eacb68e84305995e6ab
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <fsimonce(a)redhat.com>
Douglas Schilling Landgraf has uploaded a new change for review.
Change subject: configure.ac: pyflakes/python-pep8 reduce to warn
......................................................................
configure.ac: pyflakes/python-pep8 reduce to warn
Replace error message for warning message if build
system doesn't contain pyflakes and python-pep8
packages installed.
Change-Id: Ife89071bcbd0b2b4a50166080575f09e0048cec7
Signed-off-by: Douglas Schilling Landgraf <dougsland(a)redhat.com>
---
M configure.ac
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/39/8939/1
diff --git a/configure.ac b/configure.ac
index 450f714..7cb12ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,13 +100,13 @@
# Checking for pyflakes
AC_PATH_PROG([PYFLAKES], [pyflakes])
if test "x$PYFLAKES" = "x"; then
- AC_MSG_ERROR([pyflakes not found, please install it.])
+ AC_MSG_WARN([pyflakes not found])
fi
# Checking for pep8
AC_PATH_PROG([PEP8], [pep8])
if test "x$PEP8" = "x"; then
- AC_MSG_ERROR([python-pep8 not found, please install it.])
+ AC_MSG_WARN([python-pep8 not found])
fi
# Checking for python-devel
--
To view, visit http://gerrit.ovirt.org/8939
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife89071bcbd0b2b4a50166080575f09e0048cec7
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Douglas Schilling Landgraf <dougsland(a)redhat.com>
Dan Kenigsberg has uploaded a new change for review.
Change subject: doh! fix the former commit
......................................................................
doh! fix the former commit
I've decorated the class instead of the test method :-(
Change-Id: I5d99275ee7cf04e8464f4718c765bca901178e8c
Signed-off-by: Dan Kenigsberg <danken(a)redhat.com>
---
M tests/miscTests.py
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/84/8984/1
diff --git a/tests/miscTests.py b/tests/miscTests.py
index 93a20cd..eeb14d4 100644
--- a/tests/miscTests.py
+++ b/tests/miscTests.py
@@ -70,9 +70,9 @@
proc.wait()
-@brokentest('Test sometimes fail, when misc.getCmdArgs() returns '
- 'the empty tuple right after process creation')
class GetCmdArgsTests(TestCaseBase):
+ @brokentest('Test sometimes fail, when misc.getCmdArgs() returns '
+ 'the empty tuple right after process creation')
def test(self):
args = ("sleep", "4")
sproc = misc.execCmd(args, sync=False, sudo=False)
--
To view, visit http://gerrit.ovirt.org/8984
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d99275ee7cf04e8464f4718c765bca901178e8c
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Dan Kenigsberg <danken(a)redhat.com>
Greg Padgett has uploaded a new change for review.
Change subject: Don't ignore nfs_mount_options in vdsm.conf
......................................................................
Don't ignore nfs_mount_options in vdsm.conf
The nfs_mount_options configuration setting in vdsm.conf was ignored.
The options will now be processed, but options passed to VDSM from the
backend will take priority.
Change-Id: I3c1d13bfd98a9b41b9728bdcb7f01b3161c26bd8
Signed-off-by: Greg Padgett <gpadgett(a)redhat.com>
---
M vdsm/storage/fileUtils.py
M vdsm/storage/storageServer.py
2 files changed, 7 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/5368/1
--
To view, visit http://gerrit.ovirt.org/5368
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c1d13bfd98a9b41b9728bdcb7f01b3161c26bd8
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <gpadgett(a)redhat.com>