Files
scylladb/test/cluster/test_start_bootstrapped_with_invalid_seed.py
Artsiom Mishuta 465636bc53 test: migrate @pytest.mark.skip to @pytest.mark.skip_bug for known bugs
Migrate 24 @pytest.mark.skip decorator sites to @pytest.mark.skip_bug
across 16 test files where the reason references a known bug or issue.
2026-04-19 11:06:30 +02:00

49 lines
1.9 KiB
Python

#
# Copyright (C) 2024-present ScyllaDB
#
# SPDX-License-Identifier: LicenseRef-ScyllaDB-Source-Available-1.1
#
import asyncio
import pytest
import logging
from test.pylib.internal_types import IPAddress
from test.pylib.manager_client import ManagerClient
logger = logging.getLogger(__name__)
pytestmark = pytest.mark.prepare_3_nodes_cluster
@pytest.mark.asyncio
@pytest.mark.skip_bug(reason="Test is disabled due to scylladb/scylladb#28153")
async def test_start_bootstrapped_with_invalid_seed(manager: ManagerClient):
"""
Issue https://github.com/scylladb/scylladb/issues/14945.
Check non-regression: try starting a non-bootstrapped node with an invalid seed.
1. Start a node with an invalid seed hostname in the seeds list config.
2. Make sure starting the node fails with an error message.
Check that when bootstrapped, having a non-resolving DNS name in
the config, does not prevent node restart.
1. Start a node and wait till it starts and joins the cluster.
2. Stop the node and restart it with an invalid seed hostname in the seeds list config.
3. Make sure the node started successfully since it's already bootstrapped (i.e. is a cluster member).
"""
s1 = await manager.server_add(start=False)
# Start the node with an invalid seed and make sure it fails with an error message.
await manager.server_start(s1.server_id, seeds=[IPAddress("no_address")],
expected_error="Bad configuration: invalid value in 'seeds'", wait_interval=20)
# Start the node with default seeds, to make it join the cluster.
await manager.server_start(s1.server_id, wait_interval=20)
# Stop the node.
await manager.server_stop_gracefully(s1.server_id)
# Start the node with an invalid seed. and make sure it starts successfully.
await manager.server_start(s1.server_id, seeds=[IPAddress("no_address")], wait_interval=20)