From 8330d2f2bd2bb9325ac48accedfecd6dfaab8697 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 3 Mar 2020 12:20:19 -0600 Subject: [PATCH] mgr/cephadm/tests/test_cephadm: remove broken rgw_update_fail test This was trying to show that we won't put 2 RGWs from different zones on the same host. In reality, the test was only passing because it was specifying an invalid placement spec (count=3 in a 2-host cluster). It's true that we shouldn't do that because they won't be able to bind, but the HostAssignment code doesn't handle this case currently. See https://tracker.ceph.com/issues/44397 Signed-off-by: Sage Weil --- src/pybind/mgr/cephadm/tests/test_cephadm.py | 30 -------------------- 1 file changed, 30 deletions(-) diff --git a/src/pybind/mgr/cephadm/tests/test_cephadm.py b/src/pybind/mgr/cephadm/tests/test_cephadm.py index 3d7378820c8..64c12a0c2fd 100644 --- a/src/pybind/mgr/cephadm/tests/test_cephadm.py +++ b/src/pybind/mgr/cephadm/tests/test_cephadm.py @@ -240,36 +240,6 @@ class TestCephadm(object): assert r - @mock.patch("cephadm.module.CephadmOrchestrator._run_cephadm", _run_cephadm('{}')) - @mock.patch("cephadm.module.CephadmOrchestrator.send_command") - @mock.patch("cephadm.module.CephadmOrchestrator.mon_command", mon_command) - @mock.patch("cephadm.module.CephadmOrchestrator._get_connection") - @mock.patch("cephadm.module.HostCache.save_host") - @mock.patch("cephadm.module.HostCache.rm_host") - def test_rgw_update_fail(self, _send_command, _get_connection, _save_host, _rm_host, cephadm_module): - - with self._with_host(cephadm_module, 'host1'): - with self._with_host(cephadm_module, 'host2'): - ps = PlacementSpec(hosts=['host1'], count=1) - c = cephadm_module.add_rgw(RGWSpec('realm', 'zone1', placement=ps)) - [out] = wait(cephadm_module, c) - match_glob(out, "Deployed rgw.realm.zone1.host1.* on host 'host1'") - - ps = PlacementSpec(hosts=['host2'], count=1) - c = cephadm_module.add_rgw(RGWSpec('realm', 'zone2', placement=ps)) - [out] = wait(cephadm_module, c) - match_glob(out, "Deployed rgw.realm.zone2.host2.* on host 'host2'") - - c = cephadm_module.list_daemons() - r = wait(cephadm_module, c) - assert len(r) == 2 - - with pytest.raises(OrchestratorError): - ps = PlacementSpec(hosts=['host1', 'host2'], count=3) - r = cephadm_module._apply_service(RGWSpec('realm', 'zone1', placement=ps)) - assert r - - @mock.patch("cephadm.module.CephadmOrchestrator._run_cephadm", _run_cephadm( json.dumps([ dict( -- 2.39.5