Skip to content

mgr/cephadm: save osdspec_affinity to dd store#36541

Merged
sebastian-philipp merged 2 commits intoceph:masterfrom
jschmid1:save_osdspec_affinity_to_store
Aug 18, 2020
Merged

mgr/cephadm: save osdspec_affinity to dd store#36541
sebastian-philipp merged 2 commits intoceph:masterfrom
jschmid1:save_osdspec_affinity_to_store

Conversation

@jschmid1
Copy link
Contributor

Signed-off-by: Joshua Schmid jschmid@suse.de

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

Signed-off-by: Joshua Schmid <jschmid@suse.de>
@sebastian-philipp
Copy link
Contributor

mgr_util.py .....                                                        [  0%]
cephadm/schedule.py ..                                                   [  0%]
cephadm/tests/test_cephadm.py ....................F..................... [  5%]
...........                                                              [  6%]
cephadm/tests/test_completion.py ..............                          [  8%]
cephadm/tests/test_migration.py ....                                     [  8%]
cephadm/tests/test_osd_removal.py ...................................... [ 12%]
..                                                                       [ 13%]
cephadm/tests/test_scheduling.py ....................................... [ 17%]
........................................................................ [ 25%]
........................................................................ [ 33%]
........................................................................ [ 41%]
........................................................................ [ 49%]
........................................................................ [ 57%]
........................................................................ [ 65%]
........................................................................ [ 72%]
........................................................................ [ 80%]
........................................................................ [ 88%]
......................                                                   [ 91%]
cephadm/tests/test_services.py .                                         [ 91%]
cephadm/tests/test_spec.py ........................................      [ 95%]
cephadm/tests/test_template.py .                                         [ 95%]
cephadm/tests/test_utils.py .                                            [ 96%]
orchestrator/_interface.py sss..                                         [ 96%]
orchestrator/module.py .                                                 [ 96%]
orchestrator/tests/test_orchestrator.py .................                [ 98%]
insights/tests/test_health.py .........                                  [ 99%]
pg_autoscaler/tests/test_autoscaler.py ..                                [ 99%]
progress/test_progress.py ..                                             [100%]

=================================== FAILURES ===================================
_________________________ TestCephadm.test_remove_osds _________________________

self = <cephadm.tests.test_cephadm.TestCephadm object at 0x7fa7c85bba58>
cephadm_module = <cephadm.module.CephadmOrchestrator object at 0x7fa7c85a4278>

    @mock.patch("cephadm.module.CephadmOrchestrator._run_cephadm", _run_cephadm(
        json.dumps([
            dict(
                name='osd.0',
                style='cephadm',
                fsid='fsid',
                container_id='container_id',
                version='version',
                state='running',
            )
        ])
    ))
    @mock.patch("cephadm.services.osd.OSD.exists", True)
    @mock.patch("cephadm.services.osd.RemoveUtil.get_pg_count", lambda _, __: 0)
    def test_remove_osds(self, cephadm_module):
        with with_host(cephadm_module, 'test'):
>           cephadm_module._refresh_host_daemons('test')

cephadm/tests/test_cephadm.py:447: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cephadm/module.py:1407: in _refresh_host_daemons
    self.cache.save_host(host)
cephadm/inventory.py:324: in save_host
    self.mgr.set_store(HOST_CACHE_PREFIX + host, json.dumps(j))
/usr/lib/python3.6/json/__init__.py:231: in dumps
    return _default_encoder.encode(obj)
/usr/lib/python3.6/json/encoder.py:199: in encode
    chunks = self.iterencode(o, _one_shot=True)
/usr/lib/python3.6/json/encoder.py:257: in iterencode
    return _iterencode(o, 0)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <json.encoder.JSONEncoder object at 0x7fa82599a940>
o = <MagicMock name='mock.get().get()' id='140358597352248'>

    def default(self, o):
        """Implement this method in a subclass such that it returns
        a serializable object for ``o``, or calls the base implementation
        (to raise a ``TypeError``).
    
        For example, to support arbitrary iterators, you could
        implement default like this::
    
            def default(self, o):
                try:
                    iterable = iter(o)
                except TypeError:
                    pass
                else:
                    return list(iterable)
                # Let the base class default method raise the TypeError
                return JSONEncoder.default(self, o)
    
        """
        raise TypeError("Object of type '%s' is not JSON serializable" %
>                       o.__class__.__name__)
E       TypeError: Object of type 'MagicMock' is not JSON serializable

/usr/lib/python3.6/json/encoder.py:180: TypeError

https://jenkins.ceph.com/job/ceph-pull-requests/57360/consoleFull#2025132619e840cee4-f4a4-4183-81dd-42855615f2c1

Signed-off-by: Joshua Schmid <jschmid@suse.de>
@jschmid1
Copy link
Contributor Author

jenkins test make check

@sebastian-philipp sebastian-philipp added the wip-swagner-testing My Teuthology tests label Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants