Skip to content

Commit 39c28b4

Browse files
committed
fix(LoaderUtilsMixin): table_enabled was allways True as this feature is enabled
Enabling/disabling tablets was changed. Now we have to check scylla yaml or keystore schema. For more info see - scylladb/scylladb#21451 - scylladb/scylladb#21614
1 parent c03df5c commit 39c28b4

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

sdcm/utils/loader_utils.py

+4-9
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,12 @@
1515
import os
1616
import re
1717
import time
18-
from functools import cached_property
1918

2019
from sdcm.sct_events import Severity
2120
from sdcm.sct_events.system import TestFrameworkEvent
2221
from sdcm.utils.common import skip_optional_stage
2322
from sdcm.utils.decorators import optional_stage
2423
from sdcm.utils.issues import SkipPerIssues
25-
from sdcm.utils.features import is_tablets_feature_enabled
2624

2725
DEFAULT_USER = "cassandra"
2826
DEFAULT_USER_PASSWORD = "cassandra"
@@ -95,12 +93,6 @@ def assemble_and_run_all_stress_cmd_by_ks_names(self, stress_queue, stress_cmd,
9593
}
9694
self._run_all_stress_cmds(stress_queue, params)
9795

98-
@cached_property
99-
def tablets_enabled(self):
100-
# is tablets feature enabled in Scylla configuration.
101-
with self.db_cluster.cql_connection_patient(self.db_cluster.nodes[0]) as session:
102-
return is_tablets_feature_enabled(session)
103-
10496
def _run_all_stress_cmds(self, stress_queue, params):
10597
stress_cmds = params['stress_cmd']
10698
if not isinstance(stress_cmds, list):
@@ -117,7 +109,10 @@ def _run_all_stress_cmds(self, stress_queue, params):
117109
# Due to an issue with scylla & cassandra-stress - we need to create the counter table manually
118110
# also tablets doesn't yet support counters, so we skip the command and error about it
119111
if 'counter_' in stress_cmd:
120-
if self.tablets_enabled and SkipPerIssues('scylladb/scylladb#18180', params=self.params):
112+
with self.db_cluster.nodes[0].remote_scylla_yaml() as scylla_yaml:
113+
tablets_enabled = scylla_yaml.enable_tablets
114+
115+
if tablets_enabled and SkipPerIssues('scylladb/scylladb#18180', params=self.params):
121116
TestFrameworkEvent(severity=Severity.ERROR,
122117
source=self.__class__.__name__,
123118
source_method='_run_all_stress_cmds',

0 commit comments

Comments
 (0)