-
Notifications
You must be signed in to change notification settings - Fork 100
test(collect_diagnosis_data_test): Add ScyllaDiagnosisReport nemesis #10536
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env python | ||
|
||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU Affero General Public License as published by | ||
# the Free Software Foundation; either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
# | ||
# See LICENSE for more details. | ||
# | ||
# Copyright (c) 2025 ScyllaDB | ||
|
||
from sdcm.tester import ClusterTester | ||
from sdcm import nemesis | ||
|
||
|
||
class ScyllaDiagnosisReport(ClusterTester): | ||
|
||
def test_diagnosis_data(self): # pylint: disable=invalid-name | ||
current_nemesis = nemesis.ScyllaDiagnosisReport( | ||
tester_obj=self, termination_event=self.db_cluster.nemesis_termination_event) | ||
current_nemesis.disrupt() |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
nemesis_class_name: 'ScyllaDiagnosisReport' | ||
user_prefix: 'ScyllaDiagnosisReport' |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!groovy | ||
|
||
// trick from https://github.com/jenkinsci/workflow-cps-global-lib-plugin/pull/43 | ||
def lib = library identifier: 'sct@snapshot', retriever: legacySCM(scm) | ||
|
||
longevityPipeline( | ||
params: params, | ||
|
||
backend: 'aws', | ||
region: 'eu-west-1', | ||
test_name: 'collect_diagnosis_data_test.ScyllaDiagnosisReport.test_diagnosis_data', | ||
test_config: 'test-cases/features/diagnosis-report.yaml' | ||
) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -703,6 +703,18 @@ def _kill_scylla_daemon(self): | |
self.target_node.wait_jmx_up() | ||
self.cluster.wait_for_schema_agreement() | ||
|
||
def _sigquit_scylla_daemon(self): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. btw. we have already |
||
self.log.info('Sending SIGQUIT to scylla processes in %s', | ||
self.target_node) | ||
self.target_node.remoter.sudo("pkill -3 scylla", ignore_status=True) | ||
# Wait for few seconds before checking diagnosis data | ||
time.sleep(30) | ||
if self.target_node.is_diagnostics_logged: | ||
self.log.info("Diagnosis dump report is found") | ||
else: | ||
self.log.error("Diagonosis dump report is missing") | ||
raise Exception("Diagonosis dump report not found") | ||
|
||
@decorate_with_context(ignore_raft_topology_cmd_failing) | ||
@target_all_nodes | ||
def disrupt_stop_wait_start_scylla_server(self, sleep_time=300): # pylint: disable=invalid-name | ||
|
@@ -1744,6 +1756,14 @@ def wait_for_old_node_to_removed(): | |
def disrupt_kill_scylla(self): | ||
self._kill_scylla_daemon() | ||
|
||
def disrupt_sigquit_scylla(self): | ||
stress_cmd = self.tester.params.get('stress_cmd') | ||
self.tester.run_stress_thread( | ||
stress_cmd=stress_cmd, stress_num=1, stats_aggregate_cmds=False) | ||
Comment on lines
+1759
to
+1762
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nemesis rather don't run stress_cmd - unless it is by specific design (like doubling load) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, will move it outside nemesis. |
||
# Wait for 5 mins before sending signal | ||
time.sleep(300) | ||
self._sigquit_scylla_daemon() | ||
|
||
def disrupt_no_corrupt_repair(self): | ||
|
||
if SkipPerIssues("https://github.com/scylladb/scylladb/issues/18059", self.tester.params): | ||
|
@@ -6612,6 +6632,14 @@ def disrupt(self): | |
self.disrupt_nodetool_flush_and_reshard_on_kubernetes() | ||
|
||
|
||
class ScyllaDiagnosisReport(Nemesis): | ||
disruptive = False | ||
kubernetes = False | ||
|
||
def disrupt(self): | ||
self.disrupt_sigquit_scylla() | ||
|
||
|
||
class ScyllaKillMonkey(Nemesis): | ||
disruptive = True | ||
supports_high_disk_utilization = True | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
test_duration: 30 | ||
stress_cmd: "cassandra-stress write no-warmup cl=QUORUM duration=10m -schema 'replication(strategy=NetworkTopologyStrategy,replication_factor=3)' -mode cql3 native -rate threads=60 -pop seq=1..30000000" | ||
n_db_nodes: 3 | ||
n_loaders: 1 | ||
n_monitor_nodes: 1 | ||
|
||
instance_type_db: 'i4i.large' | ||
nemesis_class_name: 'ScyllaDiagnosisReport' | ||
nemesis_interval: 5 | ||
|
||
email_recipients: ['[email protected]'] | ||
stress_image: | ||
cassandra-stress: 'scylladb/cassandra-stress:3.13.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually we don't add new tests - only in specific cases.
For this should utilize 'individual nemesis' case