Nir Soffer has uploaded a new change for review.
Change subject: misc: Replace assert with AssetionError ......................................................................
misc: Replace assert with AssetionError
The code was wrongly assumed that asserts are always available. When running in optimized mode, the check would be skipped, leading to disastrous results.
The assert was correct in that this is something that should never happen, unless someone is using the barrier incorrectly, or there is a bug in the code.
Change-Id: I68f57e393423dc4faf58763a036220849a968e70 Signed-off-by: Nir Soffer nsoffer@redhat.com --- M vdsm/storage/misc.py 1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/34363/1
diff --git a/vdsm/storage/misc.py b/vdsm/storage/misc.py index ab2b4fd..5abcdcb 100644 --- a/vdsm/storage/misc.py +++ b/vdsm/storage/misc.py @@ -696,7 +696,9 @@
def exit(self): with self._cond: - assert self._busy, "Attempt to exit a barrier without entering" + if not self._busy: + raise AssertionError("Attempt to exit a barrier without " + "entering") self._busy = False self._cond.notifyAll()
oVirt Jenkins CI Server has posted comments on this change.
Change subject: misc: Replace assert with AssetionError ......................................................................
Patch Set 1:
Build Failed
http://jenkins.ovirt.org/job/vdsm_master_unit-tests_created/13072/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_pep8_gerrit/12914/ : SUCCESS
http://jenkins.ovirt.org/job/vdsm_master_unit_tests_gerrit_el/12124/ : FAILURE
Nir Soffer has posted comments on this change.
Change subject: misc: Replace assert with AssetionError ......................................................................
Patch Set 1:
ping?
vdsm-patches@lists.fedorahosted.org