mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 04:06:59 +00:00
The `force_gossip_based_join` error injection does exactly what we expect from `force-gossip-topology-changes` so we can do a simple replacement. We prefer a flag over an error injection because we will use it a lot in CI jobs' configurations, some tests, manual testing etc. It's much more convenient. Moreover, the flag can be used in the release mode, so we re-enable all tests that were disabled in release mode only because of using the `force_gossip_based_join` error injection. The name of the `force-gossip-topology-changes` flag suggests that using it should always succesfully force the gossip-based topology or, if forcing is not possible, the booting should fail. We don't want a node with `force-gossip-topology-changes=true` that silently boots in the raft-topology mode. We achieve it by throwing a runtime error from `join_cluster` in two cases: - the node is restarting in the cluster that is using raft topology - the node is joining the cluster that is using raft topology
23 lines
763 B
Python
23 lines
763 B
Python
import asyncio
|
|
import pytest
|
|
|
|
from test.pylib.manager_client import ManagerClient
|
|
from test.topology.conftest import skip_mode
|
|
|
|
@pytest.mark.asyncio
|
|
@skip_mode('release', 'error injections are not supported in release mode')
|
|
async def test_gossip_boot(manager: ManagerClient):
|
|
"""
|
|
Regression test for scylladb/scylladb#17493.
|
|
"""
|
|
|
|
cfg = {'error_injections_at_startup': ['gossiper_replicate_sleep'],
|
|
'force_gossip_topology_changes': True}
|
|
|
|
servers = [await manager.server_add(config=cfg, timeout=60) for _ in range(3)]
|
|
logs = [await manager.server_open_log(s.server_id) for s in servers]
|
|
|
|
for log in logs:
|
|
for s in servers:
|
|
await log.wait_for(f'handle_state_normal for {s.ip_addr}.*finished', timeout=60)
|