Project

General

Profile

Actions

Bug #23184

closed

rbd workunit return 0 response code for fail

Added by Anonymous about 6 years ago. Updated almost 6 years ago.

Status:
Can't reproduce
Priority:
Normal
Assignee:
Jason Dillaman
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Expected: rbd workunit test return non-zero response code for fail which breaks ci integration:

Actual: rbd workunit test return 0 response code for fail which breaks ci integration:

======================================================================
ERROR: test_rbd.TestImage.test_metadata
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/cephuser/cephtest/ceph/src/test/pybind/test_rbd.py", line 831, in test_metadata
    assert_raises(KeyError, self.image.metadata_get, "key1")
  File "/usr/lib64/python2.7/unittest/case.py", line 513, in assertRaises
    callableObj(*args, **kwargs)
  File "rbd.pyx", line 2687, in rbd.Image.metadata_get (/builddir/build/BUILD/ceph-12.2.1/build/src/pybind/rbd/pyrex/rbd.c:25130)
AttributeError: 'rbd.Image' object has no attribute 'key'

----------------------------------------------------------------------
Ran 101 tests in 659.568s

FAILED (SKIP=8, errors=1)

2018-02-19 14:45:43,783 - test_workunit - INFO - Workunit completed successfully
2018-02-19 14:45:43,783 - __main__ - INFO - Test <module 'test_workunit' from '/home/jenkins-build/workspace/ceph-ansible-sanity-3.x/tests/test_workunit.py'> passed

Affected:
we propagate test status by return code in our ci scripts :

ec = client.exit_status
if ec == 0:
log.info("Workunit completed successfully")
else:
log.info("Error during workunit")
return ec

Thus failures can be missed without manual log review

Actions

Also available in: Atom PDF