Project

General

Profile

Bug #40827 ยป run-tox-mgr-dashboard.log

Laura Paduano, 07/19/2019 06:14 AM

 
============================= test session starts ==============================
platform linux2 -- Python 2.7.12, pytest-3.3.2, py-1.5.2, pluggy-0.6.0
rootdir: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard, inifile:
plugins: faulthandler-1.0.1, cov-2.5.1
collected 254 items

services/ceph_service.py .. [ 0%]
services/rbd.py .. [ 1%]
services/rgw_client.py .. [ 2%]
tests/helper.py . [ 2%]
tests/test_access_control.py ........................................... [ 19%]
...... [ 22%]
tests/test_api_auditing.py ........ [ 25%]
tests/test_controllers.py .................... [ 33%]
tests/test_docs.py ........ [ 36%]
tests/test_erasure_code_profile.py .... [ 37%]
tests/test_exceptions.py ............ [ 42%]
tests/test_feature_toggles.py .. [ 43%]
tests/test_ganesha.py ............ [ 48%]
tests/test_grafana.py ..... [ 50%]
tests/test_iscsi.py ....................... [ 59%]
tests/test_notification.py .... [ 60%]
tests/test_osd.py ... [ 61%]
tests/test_pool.py .F... [ 63%]
tests/test_prometheus.py ................ [ 70%]
tests/test_rbd_mirroring.py .... [ 71%]
tests/test_rest_client.py ........ [ 74%]
tests/test_rest_tasks.py ........ [ 77%]
tests/test_rgw.py ...... [ 80%]
tests/test_rgw_client.py .. [ 81%]
tests/test_settings.py .............. [ 86%]
tests/test_sso.py ..... [ 88%]
tests/test_task.py ............... [ 94%]
tests/test_tools.py ........... [ 98%]
tools.py ... [100%]

generated xml file: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/junit.py27-cov.xml


=================================== FAILURES ===================================
_______________________ PoolControllerTest.test_creation _______________________

self = <dashboard.tests.test_pool.PoolControllerTest testMethod=test_creation>
send_command = <MagicMock name='send_command' id='140045972011984'>
_get = <MagicMock name='_get' id='140045970666192'>

@mock.patch('dashboard.controllers.pool.Pool._get')
@mock.patch('dashboard.services.ceph_service.CephService.send_command')
def test_creation(self, send_command, _get):
_get.side_effect = [{
'pool_name': 'test-pool',
'pg_num': 64,
'pg_num_target': 63,
'pg_placement_num': 64,
'pg_placement_num_target': 63
}, {
'pool_name': 'test-pool',
'pg_num': 64,
'pg_num_target': 64,
'pg_placement_num': 64,
'pg_placement_num_target': 64
}]
NotificationQueue.start_queue()
TaskManager.init()
def _send_cmd(*args, **kwargs): # pylint: disable=unused-argument
time.sleep(3)
send_command.side_effect = _send_cmd
self._task_post('/api/pool', {
'pool': 'test-pool',
'pool_type': 1,
'pg_num': 64
> }, 10)

tests/test_pool.py:54:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/__init__.py:213: in _task_post
self._task_request('POST', url, data, timeout)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <dashboard.tests.test_pool.PoolControllerTest testMethod=test_creation>
method = 'POST', url = '/api/pool'
data = {'pg_num': 64, 'pool': 'test-pool', 'pool_type': 1}, timeout = 10

def _task_request(self, method, url, data, timeout):
self._request(url, method, data)
if self.status != '202 Accepted':
logger.info("task finished immediately")
return
res = self.jsonBody()
self.assertIsInstance(res, dict)
self.assertIn('name', res)
self.assertIn('metadata', res)
task_name = res['name']
task_metadata = res['metadata']
# pylint: disable=protected-access
class Waiter(threading.Thread):
def __init__(self, task_name, task_metadata, tc):
super(Waiter, self).__init__()
self.task_name = task_name
self.task_metadata = task_metadata
self.ev = threading.Event()
self.abort = False
self.res_task = None
self.tc = tc
def run(self):
running = True
while running and not self.abort:
logger.info("task (%s, %s) is still executing", self.task_name,
self.task_metadata)
time.sleep(1)
self.tc._get('/api/task?name={}'.format(self.task_name))
res = self.tc.jsonBody()
for task in res['finished_tasks']:
if task['metadata'] == self.task_metadata:
# task finished
running = False
self.res_task = task
self.ev.set()
thread = Waiter(task_name, task_metadata, self)
thread.start()
status = thread.ev.wait(timeout)
if not status:
# timeout expired
thread.abort = True
thread.join()
raise Exception("Waiting for task ({}, {}) to finish timed out"
> .format(task_name, task_metadata))
E Exception: Waiting for task (pool/create, {u'pool_name': u'test-pool'}) to finish timed out

tests/__init__.py:193: Exception
---------------------------- Captured stderr setup -----------------------------
INFO:cherrypy.error:[19/Jul/2019:04:52:53] ENGINE Listening for SIGUSR1.
INFO:cherrypy.error:[19/Jul/2019:04:52:53] ENGINE Listening for SIGHUP.
INFO:cherrypy.error:[19/Jul/2019:04:52:53] ENGINE Listening for SIGTERM.
INFO:cherrypy.test.helper:Python version used to run this test script: 2.7.12
INFO:cherrypy.test.helper:CherryPy version: 13.1.0
INFO:cherrypy.test.helper:HTTP server version: HTTP/1.1
INFO:cherrypy.test.helper:PID: 5827
INFO:dashboard:Initializing controller: Pool -> /api/pool
INFO:dashboard:Initializing controller: Task -> /api/task
DEBUG:dashboard:Mapped [/api/pool] to Pool:create restricted to POST
DEBUG:dashboard:Mapped [/api/pool] to Pool:list restricted to GET
DEBUG:dashboard:Mapped [/api/pool/_info] to Pool:_info restricted to GET
DEBUG:dashboard:Mapped [/api/pool/{pool_name}] to Pool:delete restricted to DELETE
DEBUG:dashboard:Mapped [/api/pool/{pool_name}] to Pool:get restricted to GET
DEBUG:dashboard:Mapped [/api/pool/{pool_name}] to Pool:set restricted to PUT
DEBUG:dashboard:Mapped [/api/pool/{pool_name}/configuration] to Pool:configuration restricted to GET
DEBUG:dashboard:Mapped [/api/task] to Task:list restricted to GET
INFO:cherrypy.error:[19/Jul/2019:04:52:53] ENGINE Bus STARTING
INFO:cherrypy.error:[19/Jul/2019:04:52:53] ENGINE Serving on http://127.0.0.1:54583
INFO:cherrypy.error:[19/Jul/2019:04:52:53] ENGINE Bus STARTED
------------------------------ Captured log setup ------------------------------
_cplogging.py 223 INFO [19/Jul/2019:04:52:53] ENGINE Listening for SIGUSR1.
_cplogging.py 223 INFO [19/Jul/2019:04:52:53] ENGINE Listening for SIGHUP.
_cplogging.py 223 INFO [19/Jul/2019:04:52:53] ENGINE Listening for SIGTERM.
helper.py 201 INFO Python version used to run this test script: 2.7.12
helper.py 202 INFO CherryPy version: 13.1.0
helper.py 207 INFO HTTP server version: HTTP/1.1
helper.py 208 INFO PID: 5827
__init__.py 580 INFO Initializing controller: Pool -> /api/pool
__init__.py 580 INFO Initializing controller: Task -> /api/task
__init__.py 318 DEBUG Mapped [/api/pool] to Pool:create restricted to POST
__init__.py 318 DEBUG Mapped [/api/pool] to Pool:list restricted to GET
__init__.py 318 DEBUG Mapped [/api/pool/_info] to Pool:_info restricted to GET
__init__.py 318 DEBUG Mapped [/api/pool/{pool_name}] to Pool:delete restricted to DELETE
__init__.py 318 DEBUG Mapped [/api/pool/{pool_name}] to Pool:get restricted to GET
__init__.py 318 DEBUG Mapped [/api/pool/{pool_name}] to Pool:set restricted to PUT
__init__.py 318 DEBUG Mapped [/api/pool/{pool_name}/configuration] to Pool:configuration restricted to GET
__init__.py 318 DEBUG Mapped [/api/task] to Task:list restricted to GET
_cplogging.py 223 INFO [19/Jul/2019:04:52:53] ENGINE Bus STARTING
_cplogging.py 223 INFO [19/Jul/2019:04:52:53] ENGINE Serving on http://127.0.0.1:54583
_cplogging.py 223 INFO [19/Jul/2019:04:52:53] ENGINE Bus STARTED
----------------------------- Captured stderr call -----------------------------
DEBUG:dashboard:starting notification queue
DEBUG:dashboard:TM: created Task(ns=pool/create, md={'pool_name': u'test-pool'})
INFO:dashboard:TM: running Task(ns=pool/create, md={'pool_name': u'test-pool'})
DEBUG:dashboard:TEX: executing task Task(ns=pool/create, md={'pool_name': u'test-pool'})
DEBUG:dashboard:notification queue started
DEBUG:dashboard:NQ: processing queue: 0
INFO:cherrypy.access.140045972012112:127.0.0.1 - - [19/Jul/2019:04:52:55] "POST /api/pool HTTP/1.1" 202 63 "" ""
INFO:dashboard:task (pool/create, {u'pool_name': u'test-pool'}) is still executing
ERROR:cherrypy.error.140045972012112:[19/Jul/2019:04:52:56] HTTP
Traceback (most recent call last):
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 631, in respond
self._do_respond(path_info)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 690, in _do_respond
response.body = self.handler()
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 221, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/_cptools.py", line 237, in wrap
return self.newhandler(innerfunc, *args, **kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/services/exception.py", line 88, in dashboard_exception_handler
return handler(*args, **kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 60, in __call__
return self.callable(*self.args, **self.kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/controllers/__init__.py", line 649, in inner
ret = func(*args, **kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/controllers/__init__.py", line 842, in wrapper
return func(*vpath, **params)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/controllers/task.py", line 14, in list
e, f = progress.get_progress_tasks()
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/services/progress.py", line 22, in get_progress_tasks
for ev in progress_events['events']:
TypeError: 'Mock' object has no attribute '__getitem__'
_cplogging.py 223 ERROR [19/Jul/2019:04:52:56] HTTP
Traceback (most recent call last):
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 631, in respond
self._do_respond(path_info)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 690, in _do_respond
response.body = self.handler()
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 221, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/_cptools.py", line 237, in wrap
return self.newhandler(innerfunc, *args, **kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/services/exception.py", line 88, in dashboard_exception_handler
return handler(*args, **kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 60, in __call__
return self.callable(*self.args, **self.kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/controllers/__init__.py", line 649, in inner
ret = func(*args, **kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/controllers/__init__.py", line 842, in wrapper
return func(*vpath, **params)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/controllers/task.py", line 14, in list
e, f = progress.get_progress_tasks()
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/services/progress.py", line 22, in get_progress_tasks
for ev in progress_events['events']:
TypeError: 'Mock' object has no attribute '__getitem__'
INFO:cherrypy.access.140045972012112:127.0.0.1 - - [19/Jul/2019:04:52:56] "GET /api/task?name=pool/create HTTP/1.1" 500 2257 "" ""
Exception in thread Thread-158:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/tests/__init__.py", line 178, in run
for task in res['finished_tasks']:
KeyError: 'finished_tasks'

DEBUG:dashboard:EX: successfully finished task: Task(ns=pool/create, md={'pool_name': u'test-pool'})
DEBUG:dashboard:TK: execution of Task(ns=pool/create, md={'pool_name': u'test-pool'}) finished in: 7.00597214699 s
DEBUG:dashboard:NQ: processing queue: 1
INFO:dashboard:TM: finished Task(ns=pool/create, md={'pool_name': u'test-pool'})
------------------------------ Captured log call -------------------------------
tools.py 274 DEBUG starting notification queue
tools.py 435 DEBUG TM: created Task(ns=pool/create, md={'pool_name': u'test-pool'})
tools.py 437 INFO TM: running Task(ns=pool/create, md={'pool_name': u'test-pool'})
tools.py 540 DEBUG TEX: executing task Task(ns=pool/create, md={'pool_name': u'test-pool'})
tools.py 373 DEBUG notification queue started
tools.py 376 DEBUG NQ: processing queue: 0
_cplogging.py 310 INFO 127.0.0.1 - - [19/Jul/2019:04:52:55] "POST /api/pool HTTP/1.1" 202 63 "" ""
__init__.py 174 INFO task (pool/create, {u'pool_name': u'test-pool'}) is still executing
_cplogging.py 223 ERROR [19/Jul/2019:04:52:56] HTTP
Traceback (most recent call last):
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 631, in respond
self._do_respond(path_info)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/_cprequest.py", line 690, in _do_respond
response.body = self.handler()
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/lib/encoding.py", line 221, in __call__
self.body = self.oldhandler(*args, **kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/_cptools.py", line 237, in wrap
return self.newhandler(innerfunc, *args, **kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/services/exception.py", line 88, in dashboard_exception_handler
return handler(*args, **kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/local/lib/python2.7/site-packages/cherrypy/_cpdispatch.py", line 60, in __call__
return self.callable(*self.args, **self.kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/controllers/__init__.py", line 649, in inner
ret = func(*args, **kwargs)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/controllers/__init__.py", line 842, in wrapper
return func(*vpath, **params)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/controllers/task.py", line 14, in list
e, f = progress.get_progress_tasks()
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/services/progress.py", line 22, in get_progress_tasks
for ev in progress_events['events']:
TypeError: 'Mock' object has no attribute '__getitem__'
_cplogging.py 310 INFO 127.0.0.1 - - [19/Jul/2019:04:52:56] "GET /api/task?name=pool/create HTTP/1.1" 500 2257 "" ""
tools.py 521 DEBUG EX: successfully finished task: Task(ns=pool/create, md={'pool_name': u'test-pool'})
tools.py 610 DEBUG TK: execution of Task(ns=pool/create, md={'pool_name': u'test-pool'}) finished in: 7.00597214699 s
tools.py 376 DEBUG NQ: processing queue: 1
tools.py 413 INFO TM: finished Task(ns=pool/create, md={'pool_name': u'test-pool'})
==================== 1 failed, 253 passed in 73.19 seconds =====================
ERROR: InvocationError: '/home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-cov/bin/py.test --cov=. --cov-report= --junitxml=junit.py27-cov.xml --doctest-modules controllers/rbd.py services/ tests/ tools.py'
py27-lint create: /home/jenkins-build/build/workspace/ceph-pull-requests/build/dashboard/py27-lint
py27-lint installed: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
py27-lint runtests: PYTHONHASHSEED='3188287647'
    (1-1/1)