Skip to content

chore: saving schema with internals added while tearDown #10630

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions sdcm/logcollector.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,9 @@ class ScyllaLogCollector(LogCollector):
FileLog(name='system_schema_tables.log',
search_locally=True,
collect_from_parent=True),
FileLog(name='schema_with_internals.log',
search_locally=True,
collect_from_parent=True),
CommandLog(name='cpu_info',
command='cat /proc/cpuinfo'),
CommandLog(name='mem_info',
Expand Down
8 changes: 7 additions & 1 deletion sdcm/tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -3017,8 +3017,11 @@ def save_cqlsh_output_in_file(self, node, cmd: str, log_file: str):
res_file.write(result.strip())

def save_schema(self):
"""
Saves the node's schema including internal metadata.
"""
if self.db_cluster is None:
self.log.error("Didn't find the nodes in the cluster for saving the schema.")
self.log.error("Didn't find the nodes in the cluster for saving the schema and schema with internals")
return

self.log.info("Save nodes user schema in the files")
Expand All @@ -3031,6 +3034,9 @@ def save_schema(self):
self.save_cqlsh_output_in_file(node=node, cmd="desc schema", log_file="schema.log")
self.save_cqlsh_output_in_file(node=node, cmd="select JSON * from system_schema.tables",
log_file="system_schema_tables.log")
self.save_cqlsh_output_in_file(node=node,
cmd="desc schema with internals",
log_file="schema_with_internals.log")
break

if not found_live_node:
Expand Down