Skip to content

Commit

Permalink
fix(upgrade_test): scylla sstable dump verify with scylla.yaml
Browse files Browse the repository at this point in the history
since there a fix not yet backported about the order that `scylla
sstable dumps` is looking for the schema, we need to pass it
the scylla.yaml for it to be able to read EaR sstables

Ref: scylladb/scylla-enterprise#3702
Ref: scylladb/scylladb#16132
  • Loading branch information
fruch committed Dec 24, 2023
1 parent fef6c22 commit 5aad817
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions upgrade_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
from sdcm.sct_events.group_common_events import ignore_upgrade_schema_errors, ignore_ycsb_connection_refused, \
ignore_abort_requested_errors, decorate_with_context
from sdcm.utils import loader_utils
from sdcm.paths import SCYLLA_YAML_PATH
from test_lib.sla import create_sla_auth

NUMBER_OF_ROWS_FOR_TRUNCATE_TEST = 10
Expand Down Expand Up @@ -774,16 +775,22 @@ def test_rolling_upgrade(self): # pylint: disable=too-many-locals,too-many-stat
# Verify sstabledump / scylla sstable dump-data
InfoEvent(message='Starting sstabledump to verify correctness of sstables').publish()
first_node = self.db_cluster.nodes[0]
keyspace = "keyspace_complex"
table = "user_with_ck"
if first_node.is_enterprise:
should_use_sstabledump = ComparableScyllaVersion(first_node.scylla_version) < "2023.2.0~rc0"
else:
should_use_sstabledump = ComparableScyllaVersion(first_node.scylla_version) < "5.4.0~rc0"
if should_use_sstabledump:
dump_cmd = 'sstabledump'
else:
dump_cmd = f'{first_node.add_install_prefix("/usr/bin/scylla")} sstable dump-data --sstables'
dump_cmd = (f'{first_node.add_install_prefix("/usr/bin/scylla")} sstable dump-data '
f'--scylla-yaml-file {first_node.add_install_prefix(SCYLLA_YAML_PATH)} '
f'--keyspace {keyspace} '
f'--table {table} '
'--sstables')
first_node.remoter.run(
'for i in `sudo find /var/lib/scylla/data/keyspace_complex/ -type f |grep -v manifest.json |'
f'for i in `sudo find /var/lib/scylla/data/{keyspace}/ -type f |grep -v manifest.json |'
'grep -v snapshots |head -n 1`; do echo $i; '
f'sudo {dump_cmd} $i 1>/tmp/sstabledump.output || '
'exit 1; done', verbose=True)
Expand Down

0 comments on commit 5aad817

Please sign in to comment.