]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm/tests/test_cephadm: remove broken rgw_update_fail test
authorSage Weil <sage@redhat.com>
Tue, 3 Mar 2020 18:20:19 +0000 (12:20 -0600)
committerSage Weil <sage@redhat.com>
Wed, 4 Mar 2020 18:57:50 +0000 (12:57 -0600)
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 <sage@redhat.com>
src/pybind/mgr/cephadm/tests/test_cephadm.py

index 3d7378820c820663102a94a9ed55e779dda54cdf..64c12a0c2fd109209cf4c648049796dc8d6596ec 100644 (file)
@@ -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(