Skip to content

Commit 230bb0d

Browse files
committed
fix(docker): ignore warnings during stop
In docker backend we recently started to get WARN messages upon stopping node. Because this warn message is catched by db error regex, it causes docker artifact test to fail and mess Scylla CI. This warn is not considered as error and should be ignored. This commit makes all warnings during stop/restart to be ignored (for docker backend only). closes: #10633
1 parent 86783e8 commit 230bb0d

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

sdcm/cluster_docker.py

+9-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
from sdcm import cluster
2323
from sdcm.remote import LOCALRUNNER
24+
from sdcm.sct_events.database import DatabaseLogEvent
25+
from sdcm.sct_events.filters import DbEventsFilter
2426
from sdcm.utils.docker_utils import get_docker_bridge_gateway, Container, ContainerManager, DockerException
2527
from sdcm.utils.health_checker import check_nodes_status
2628
from sdcm.utils.net import get_my_public_ip
@@ -162,8 +164,10 @@ def start_scylla(self, verify_up=True, verify_down=False, timeout=300):
162164
def stop_scylla_server(self, verify_up=False, verify_down=True, timeout=300, ignore_status=False):
163165
if verify_up:
164166
self.wait_db_up(timeout=timeout)
165-
self.remoter.sudo('sh -c "{0} || {0}-server"'.format("supervisorctl stop scylla"),
166-
timeout=timeout)
167+
# ignoring WARN messages upon stopping - https://github.com/scylladb/scylla-cluster-tests/issues/10633
168+
with DbEventsFilter(db_event=DatabaseLogEvent.BACKTRACE, line="WARN "):
169+
self.remoter.sudo('sh -c "{0} || {0}-server"'.format("supervisorctl stop scylla"),
170+
timeout=timeout)
167171
if verify_down:
168172
self.wait_db_down(timeout=timeout)
169173

@@ -192,7 +196,9 @@ def restart_scylla_server(self, verify_up_before=False, verify_up_after=True, ti
192196
# Need to restart the scylla-housekeeping service manually because of autostart of this service is disabled
193197
# for the docker backend. See, for example, docker/scylla-sct/ubuntu/Dockerfile
194198
self.stop_scylla_housekeeping_service(timeout=timeout)
195-
self.remoter.sudo('sh -c "{0} || {0}-server"'.format("supervisorctl restart scylla"), timeout=timeout)
199+
# ignoring WARN messages upon stopping - https://github.com/scylladb/scylla-cluster-tests/issues/10633
200+
with DbEventsFilter(db_event=DatabaseLogEvent.BACKTRACE, line="WARN "):
201+
self.remoter.sudo('sh -c "{0} || {0}-server"'.format("supervisorctl restart scylla"), timeout=timeout)
196202
if verify_up_after:
197203
self.wait_db_up(timeout=verify_up_timeout)
198204
self.start_scylla_housekeeping_service(timeout=timeout)

0 commit comments

Comments
 (0)