mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
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 <sage@redhat.com>
This commit is contained in:
parent
58148c85c7
commit
8330d2f2bd
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user