Bug #47141
Updated by Sebastian Wagner over 3 years ago
https://jenkins.ceph.com/job/ceph-pull-requests/58466/consoleFull
<pre>
43/204 Test #1: run-tox-mgr ...............................***Failed 93.99 sec
Requirement already satisfied: tox in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (3.19.0)
Requirement already satisfied: filelock>=3.0.0 in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from tox) (3.0.12)
Requirement already satisfied: toml>=0.9.4 in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from tox) (0.10.1)
Requirement already satisfied: importlib-metadata<2,>=0.12; python_version < "3.8" in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from tox) (1.7.0)
Requirement already satisfied: py>=1.4.17 in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from tox) (1.9.0)
Requirement already satisfied: six>=1.14.0 in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from tox) (1.15.0)
Requirement already satisfied: virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0 in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from tox) (20.0.31)
Requirement already satisfied: pluggy>=0.12.0 in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from tox) (0.13.1)
Requirement already satisfied: packaging>=14 in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from tox) (20.4)
Requirement already satisfied: zipp>=0.5 in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from importlib-metadata<2,>=0.12; python_version < "3.8"->tox) (3.1.0)
Requirement already satisfied: appdirs<2,>=1.4.3 in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox) (1.4.4)
Requirement already satisfied: importlib-resources>=1.0; python_version < "3.7" in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox) (3.0.0)
Requirement already satisfied: distlib<1,>=0.3.1 in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from virtualenv!=20.0.0,!=20.0.1,!=20.0.2,!=20.0.3,!=20.0.4,!=20.0.5,!=20.0.6,!=20.0.7,>=16.0.0->tox) (0.3.1)
Requirement already satisfied: pyparsing>=2.0.2 in /home/jenkins-build/build/workspace/ceph-pull-requests/build/mgr-virtualenv/lib/python3.6/site-packages (from packaging>=14->tox) (2.4.7)
.tox create: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/.tox/.tox
.tox installdeps: cython, tox >= 3.19.0
py3 create: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/.tox/py3
py3 installdeps: cython, -rrequirements.txt
py3 installed: -f /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/wheelhouse,apipkg==1.5,attrs==20.1.0,cachetools==4.1.1,-e git+https://github.com/ceph/ceph.git@6e6b6567b1792a59b4689649a150e4f8acfd35a0#egg=ceph&subdirectory=src/python-common,certifi==2020.6.20,cffi==1.14.2,chardet==3.0.4,coverage==5.2.1,cryptography==3.0,Cython==0.29.21,execnet==1.7.1,google-auth==1.20.1,idna==2.10,importlib-metadata==1.7.0,iniconfig==1.0.1,Jinja2==2.11.2,kubernetes==11.0.0,MarkupSafe==1.1.1,more-itertools==8.4.0,oauthlib==3.1.0,packaging==20.4,pluggy==0.13.1,prettytable==0.7.2,py==1.9.0,pyasn1==0.4.8,pyasn1-modules==0.2.8,pycparser==2.20,pyfakefs==4.1.0,pyOpenSSL==19.1.0,pyparsing==2.4.7,pytest==6.0.1,pytest-cov==2.7.1,python-dateutil==2.8.1,PyYAML==5.3.1,remoto==1.2.0,requests==2.24.0,requests-mock==1.8.0,requests-oauthlib==1.3.0,rsa==4.6,six==1.15.0,toml==0.10.1,urllib3==1.25.10,websocket-client==0.57.0,zipp==3.1.0
py3 run-test-pre: PYTHONHASHSEED='556338825'
py3 run-test: commands[0] | pytest --doctest-modules mgr_util.py tests/ cephadm/ orchestrator/ insights/ pg_autoscaler/ progress/ snap_schedule
============================= test session starts ==============================
platform linux -- Python 3.6.9, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
cachedir: .tox/py3/.pytest_cache
rootdir: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr
plugins: pyfakefs-4.1.0, requests-mock-1.8.0, cov-2.7.1
collected 965 items
mgr_util.py ..... [ 0%]
cephadm/schedule.py .. [ 0%]
cephadm/tests/test_cephadm.py .......................................... [ 5%]
...FF...... [ 6%]
cephadm/tests/test_completion.py .............. [ 7%]
cephadm/tests/test_migration.py .... [ 8%]
cephadm/tests/test_osd_removal.py ...................................... [ 12%]
.. [ 12%]
cephadm/tests/test_scheduling.py ....................................... [ 16%]
........................................................................ [ 23%]
........................................................................ [ 31%]
........................................................................ [ 38%]
........................................................................ [ 46%]
........................................................................ [ 53%]
........................................................................ [ 61%]
........................................................................ [ 68%]
........................................................................ [ 75%]
........................................................................ [ 83%]
................................. [ 86%]
cephadm/tests/test_services.py . [ 86%]
cephadm/tests/test_spec.py ........................................ [ 91%]
cephadm/tests/test_template.py . [ 91%]
cephadm/tests/test_upgrade.py .. [ 91%]
cephadm/tests/test_utils.py . [ 91%]
orchestrator/_interface.py sss.. [ 92%]
orchestrator/module.py . [ 92%]
orchestrator/tests/test_orchestrator.py ................. [ 93%]
insights/tests/test_health.py ......... [ 94%]
pg_autoscaler/tests/test_autoscaler.py .. [ 95%]
progress/test_progress.py .. [ 95%]
snap_schedule/tests/fs/test_schedule.py ................................ [ 98%]
.............. [100%]
=================================== FAILURES ===================================
________________ TestCephadm.test_apply_save[spec11-apply_nfs] _________________
self = <cephadm.tests.test_cephadm.TestCephadm object at 0x7fa41ebdb390>
spec = NFSServiceSpec({'placement': PlacementSpec(count=1, hosts=[HostPlacementSpec(hostname='test', network='', name='')]), ...pe': 'nfs', 'service_id': 'name', 'unmanaged': False, 'preview_only': False, 'pool': 'pool', 'namespace': 'namespace'})
meth = <function CephadmOrchestrator.apply_nfs at 0x7fa41f0b6048>
cephadm_module = <cephadm.module.CephadmOrchestrator object at 0x7fa3cc617e48>
@pytest.mark.parametrize(
"spec, meth",
[
(ServiceSpec('mgr'), CephadmOrchestrator.apply_mgr),
(ServiceSpec('crash'), CephadmOrchestrator.apply_crash),
(ServiceSpec('prometheus'), CephadmOrchestrator.apply_prometheus),
(ServiceSpec('grafana'), CephadmOrchestrator.apply_grafana),
(ServiceSpec('node-exporter'), CephadmOrchestrator.apply_node_exporter),
(ServiceSpec('alertmanager'), CephadmOrchestrator.apply_alertmanager),
(ServiceSpec('rbd-mirror'), CephadmOrchestrator.apply_rbd_mirror),
(ServiceSpec('mds', service_id='fsname'), CephadmOrchestrator.apply_mds),
(ServiceSpec(
'mds', service_id='fsname',
placement=PlacementSpec(
hosts=[HostPlacementSpec(
hostname='test',
name='fsname',
network=''
)]
)
), CephadmOrchestrator.apply_mds),
(RGWSpec(rgw_realm='realm', rgw_zone='zone'), CephadmOrchestrator.apply_rgw),
(RGWSpec(
rgw_realm='realm', rgw_zone='zone',
placement=PlacementSpec(
hosts=[HostPlacementSpec(
hostname='test',
name='realm.zone.a',
network=''
)]
)
), CephadmOrchestrator.apply_rgw),
(NFSServiceSpec(
service_id='name',
pool='pool',
namespace='namespace'
), CephadmOrchestrator.apply_nfs),
(IscsiServiceSpec(
service_id='name',
pool='pool',
api_user='user',
api_password='password'
), CephadmOrchestrator.apply_iscsi),
]
)
@mock.patch("cephadm.module.CephadmOrchestrator._run_cephadm", _run_cephadm('{}'))
@mock.patch("cephadm.services.cephadmservice.RgwService.create_realm_zonegroup_zone", lambda _,__,___: None)
def test_apply_save(self, spec: ServiceSpec, meth, cephadm_module: CephadmOrchestrator):
with with_host(cephadm_module, 'test'):
> with with_service(cephadm_module, spec, meth, 'test'):
cephadm/tests/test_cephadm.py:602:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.6/contextlib.py:81: in __enter__
return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cephadm_module = <cephadm.module.CephadmOrchestrator object at 0x7fa3cc617e48>
spec = NFSServiceSpec({'placement': PlacementSpec(count=1, hosts=[HostPlacementSpec(hostname='test', network='', name='')]), ...pe': 'nfs', 'service_id': 'name', 'unmanaged': False, 'preview_only': False, 'pool': 'pool', 'namespace': 'namespace'})
meth = <function CephadmOrchestrator.apply_nfs at 0x7fa41f0b6048>, host = 'test'
@contextmanager
def with_service(cephadm_module: CephadmOrchestrator, spec: ServiceSpec, meth, host: str):
if spec.placement.is_empty():
spec.placement = PlacementSpec(hosts=[host], count=1)
c = meth(cephadm_module, spec)
assert wait(cephadm_module, c) == f'Scheduled {spec.service_name()} update...'
specs = [d.spec for d in wait(cephadm_module, cephadm_module.describe_service())]
assert spec in specs
cephadm_module._apply_all_services()
dds = wait(cephadm_module, cephadm_module.list_daemons())
names = {dd.service_name() for dd in dds}
> assert spec.service_name() in names, dds
E AssertionError: []
cephadm/tests/fixtures.py:142: AssertionError
------------------------------ Captured log call -------------------------------
ERROR tests:module.py:2111 Failed to apply nfs.name spec NFSServiceSpec({'placement': PlacementSpec(count=1, hosts=[HostPlacementSpec(hostname='test', network='', name='')]), 'service_type': 'nfs', 'service_id': 'name', 'unmanaged': False, 'preview_only': False, 'pool': 'pool', 'namespace': 'namespace'}): PyCapsule_GetPointer called with invalid PyCapsule object
Traceback (most recent call last):
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/cephadm/module.py", line 2107, in _apply_all_services
if self._apply_service(spec):
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/cephadm/module.py", line 2065, in _apply_service
config_func(spec)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/cephadm/services/nfs.py", line 74, in config
self.mgr._check_pool_exists(spec.pool, spec.service_name())
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/cephadm/module.py", line 2118, in _check_pool_exists
if not self.rados.pool_exists(pool):
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/mgr_module.py", line 1511, in rados
self._rados = rados.Rados(context=ctx_capsule)
File "rados.pyx", line 709, in rados.Rados.__init__
File "rados.pyx", line 595, in rados.requires.wrapper.validate_func
File "rados.pyx", line 747, in rados.Rados.__setup
ValueError: PyCapsule_GetPointer called with invalid PyCapsule object
_______________ TestCephadm.test_apply_save[spec12-apply_iscsi] ________________
self = <cephadm.tests.test_cephadm.TestCephadm object at 0x7fa3cc6a22b0>
spec = IscsiServiceSpec({'placement': PlacementSpec(count=1, hosts=[HostPlacementSpec(hostname='test', network='', name='')])...pi_port': None, 'api_user': 'user', 'api_password': 'password', 'api_secure': None, 'ssl_cert': None, 'ssl_key': None})
meth = <function CephadmOrchestrator.apply_iscsi at 0x7fa41f0b2b70>
cephadm_module = <cephadm.module.CephadmOrchestrator object at 0x7fa3cc58fd68>
@pytest.mark.parametrize(
"spec, meth",
[
(ServiceSpec('mgr'), CephadmOrchestrator.apply_mgr),
(ServiceSpec('crash'), CephadmOrchestrator.apply_crash),
(ServiceSpec('prometheus'), CephadmOrchestrator.apply_prometheus),
(ServiceSpec('grafana'), CephadmOrchestrator.apply_grafana),
(ServiceSpec('node-exporter'), CephadmOrchestrator.apply_node_exporter),
(ServiceSpec('alertmanager'), CephadmOrchestrator.apply_alertmanager),
(ServiceSpec('rbd-mirror'), CephadmOrchestrator.apply_rbd_mirror),
(ServiceSpec('mds', service_id='fsname'), CephadmOrchestrator.apply_mds),
(ServiceSpec(
'mds', service_id='fsname',
placement=PlacementSpec(
hosts=[HostPlacementSpec(
hostname='test',
name='fsname',
network=''
)]
)
), CephadmOrchestrator.apply_mds),
(RGWSpec(rgw_realm='realm', rgw_zone='zone'), CephadmOrchestrator.apply_rgw),
(RGWSpec(
rgw_realm='realm', rgw_zone='zone',
placement=PlacementSpec(
hosts=[HostPlacementSpec(
hostname='test',
name='realm.zone.a',
network=''
)]
)
), CephadmOrchestrator.apply_rgw),
(NFSServiceSpec(
service_id='name',
pool='pool',
namespace='namespace'
), CephadmOrchestrator.apply_nfs),
(IscsiServiceSpec(
service_id='name',
pool='pool',
api_user='user',
api_password='password'
), CephadmOrchestrator.apply_iscsi),
]
)
@mock.patch("cephadm.module.CephadmOrchestrator._run_cephadm", _run_cephadm('{}'))
@mock.patch("cephadm.services.cephadmservice.RgwService.create_realm_zonegroup_zone", lambda _,__,___: None)
def test_apply_save(self, spec: ServiceSpec, meth, cephadm_module: CephadmOrchestrator):
with with_host(cephadm_module, 'test'):
> with with_service(cephadm_module, spec, meth, 'test'):
cephadm/tests/test_cephadm.py:602:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.6/contextlib.py:81: in __enter__
return next(self.gen)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cephadm_module = <cephadm.module.CephadmOrchestrator object at 0x7fa3cc58fd68>
spec = IscsiServiceSpec({'placement': PlacementSpec(count=1, hosts=[HostPlacementSpec(hostname='test', network='', name='')])...pi_port': None, 'api_user': 'user', 'api_password': 'password', 'api_secure': None, 'ssl_cert': None, 'ssl_key': None})
meth = <function CephadmOrchestrator.apply_iscsi at 0x7fa41f0b2b70>
host = 'test'
@contextmanager
def with_service(cephadm_module: CephadmOrchestrator, spec: ServiceSpec, meth, host: str):
if spec.placement.is_empty():
spec.placement = PlacementSpec(hosts=[host], count=1)
c = meth(cephadm_module, spec)
assert wait(cephadm_module, c) == f'Scheduled {spec.service_name()} update...'
specs = [d.spec for d in wait(cephadm_module, cephadm_module.describe_service())]
assert spec in specs
cephadm_module._apply_all_services()
dds = wait(cephadm_module, cephadm_module.list_daemons())
names = {dd.service_name() for dd in dds}
> assert spec.service_name() in names, dds
E AssertionError: []
cephadm/tests/fixtures.py:142: AssertionError
------------------------------ Captured log call -------------------------------
ERROR tests:module.py:2111 Failed to apply iscsi.name spec IscsiServiceSpec({'placement': PlacementSpec(count=1, hosts=[HostPlacementSpec(hostname='test', network='', name='')]), 'service_type': 'iscsi', 'service_id': 'name', 'unmanaged': False, 'preview_only': False, 'pool': 'pool', 'trusted_ip_list': None, 'api_port': None, 'api_user': 'user', 'api_password': 'password', 'api_secure': None, 'ssl_cert': None, 'ssl_key': None}): PyCapsule_GetPointer called with invalid PyCapsule object
Traceback (most recent call last):
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/cephadm/module.py", line 2107, in _apply_all_services
if self._apply_service(spec):
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/cephadm/module.py", line 2065, in _apply_service
config_func(spec)
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/cephadm/services/iscsi.py", line 20, in config
self.mgr._check_pool_exists(spec.pool, spec.service_name())
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/cephadm/module.py", line 2118, in _check_pool_exists
if not self.rados.pool_exists(pool):
File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/mgr_module.py", line 1511, in rados
self._rados = rados.Rados(context=ctx_capsule)
File "rados.pyx", line 709, in rados.Rados.__init__
File "rados.pyx", line 595, in rados.requires.wrapper.validate_func
File "rados.pyx", line 747, in rados.Rados.__setup
ValueError: PyCapsule_GetPointer called with invalid PyCapsule object
=============================== warnings summary ===============================
cephadm/tests/test_template.py::test_render
cephadm/tests/test_template.py::test_render
cephadm/tests/test_utils.py::test_name_to_auth_entity
cephadm/tests/test_utils.py::test_name_to_auth_entity
/usr/lib/python3.6/xml/dom/xmlbuilder.py:340: DeprecationWarning: DocumentLS.async is deprecated; use DocumentLS.async_
DeprecationWarning)
cephadm/tests/test_template.py::test_render
cephadm/tests/test_utils.py::test_name_to_auth_entity
/usr/lib/python3.6/xml/dom/xmlbuilder.py:340: DeprecationWarning: Document.async is deprecated; use Document.async_
DeprecationWarning)
-- Docs: https://docs.pytest.org/en/stable/warnings.html
=========================== short test summary info ============================
FAILED cephadm/tests/test_cephadm.py::TestCephadm::test_apply_save[spec11-apply_nfs]
FAILED cephadm/tests/test_cephadm.py::TestCephadm::test_apply_save[spec12-apply_iscsi]
============ 2 failed, 960 passed, 3 skipped, 6 warnings in 11.49s =============
ERROR: InvocationError for command /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/.tox/py3/bin/pytest --doctest-modules mgr_util.py tests/ cephadm/ orchestrator/ insights/ pg_autoscaler/ progress/ snap_schedule (exited with code 1)
mypy create: /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/.tox/mypy
mypy installdeps: cython, -rrequirements.txt, mypy==0.782
mypy installed: -f /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/wheelhouse,apipkg==1.5,attrs==20.1.0,cachetools==4.1.1,-e git+https://github.com/ceph/ceph.git@6e6b6567b1792a59b4689649a150e4f8acfd35a0#egg=ceph&subdirectory=src/python-common,certifi==2020.6.20,cffi==1.14.2,chardet==3.0.4,coverage==5.2.1,cryptography==3.0,Cython==0.29.21,execnet==1.7.1,google-auth==1.20.1,idna==2.10,importlib-metadata==1.7.0,iniconfig==1.0.1,Jinja2==2.11.2,kubernetes==11.0.0,MarkupSafe==1.1.1,more-itertools==8.4.0,mypy==0.782,mypy-extensions==0.4.3,oauthlib==3.1.0,packaging==20.4,pluggy==0.13.1,prettytable==0.7.2,py==1.9.0,pyasn1==0.4.8,pyasn1-modules==0.2.8,pycparser==2.20,pyfakefs==4.1.0,pyOpenSSL==19.1.0,pyparsing==2.4.7,pytest==6.0.1,pytest-cov==2.7.1,python-dateutil==2.8.1,PyYAML==5.3.1,remoto==1.2.0,requests==2.24.0,requests-mock==1.8.0,requests-oauthlib==1.3.0,rsa==4.6,six==1.15.0,toml==0.10.1,typed-ast==1.4.1,typing-extensions==3.7.4.3,urllib3==1.25.10,websocket-client==0.57.0,zipp==3.1.0
mypy run-test-pre: PYTHONHASHSEED='556338825'
mypy run-test: commands[0] | mypy --config-file=../../mypy.ini cephadm/module.py mgr_module.py dashboard/module.py prometheus/module.py mgr_util.py orchestrator/__init__.py progress/module.py rook/module.py snap_schedule/module.py test_orchestrator/module.py mds_autoscaler/module.py volumes/__init__.py
Success: no issues found in 12 source files
___________________________________ summary ____________________________________
ERROR: py3: commands failed
mypy: commands succeeded
</pre>