Skip to content

ansible-scylla-node: run nodetool upgradesstables after upgrade#532

Open
ManjotS wants to merge 4 commits into
devfrom
cursor/upgrade-sstables-post-upgrade
Open

ansible-scylla-node: run nodetool upgradesstables after upgrade#532
ManjotS wants to merge 4 commits into
devfrom
cursor/upgrade-sstables-post-upgrade

Conversation

@ManjotS

@ManjotS ManjotS commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add upgrade_sstables role var (default true) to ansible-scylla-node
  • Run nodetool upgradesstables in post_upgrade.yml after CQL is up, so rolling upgrades rewrite SSTables to the current format (including system keyspace drifts)

Context

PR discussion: upgradesstables should live in the ansible upgrade procedure rather than a one-off playbook. Rolling upgrade playbooks already use serial: 1, so this runs one node at a time.

Test plan

  • Molecule / existing role CI green
  • Dry-run or lab rolling minor upgrade with upgrade_sstables=true (default) — confirm nodetool upgradesstables runs after CQL wait
  • Same with -e upgrade_sstables=false — confirm task skipped

Made with Cursor

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the ansible-scylla-node upgrade flow to optionally run nodetool upgradesstables after a node upgrade, aiming to ensure SSTables (including system keyspaces) are rewritten to the current format during rolling upgrades.

Changes:

  • Added a new role default upgrade_sstables (default true) to control whether SSTables are upgraded post-upgrade.
  • Added a post-upgrade task that runs nodetool upgradesstables after Scylla starts and the CQL port is reachable.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
ansible-scylla-node/tasks/upgrade/post_upgrade.yml Runs nodetool upgradesstables after starting Scylla and waiting for CQL.
ansible-scylla-node/defaults/main.yml Introduces upgrade_sstables default and documents its behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ansible-scylla-node/tasks/upgrade/post_upgrade.yml Outdated
Comment thread ansible-scylla-node/defaults/main.yml

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@vreniers vreniers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make the PR against the dev branch.

Comment thread ansible-scylla-node/tasks/upgrade/post_upgrade.yml Outdated
ManjotS and others added 3 commits July 20, 2026 18:11
Add upgrade_sstables (default true) and invoke nodetool upgradesstables
in post_upgrade once CQL is up, so rolling upgrades rewrite SSTables
to the current format (including system keyspace drifts).

Co-authored-by: Cursor <cursoragent@cursor.com>
Wait for nodetool readiness before upgradesstables, and bound runtime
via upgrade_sstables_timeout_seconds (async/poll) like cleanup/repair.

Co-authored-by: Cursor <cursoragent@cursor.com>
Native nodetool since 2025; task name no longer mentions JMX.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ManjotS
ManjotS force-pushed the cursor/upgrade-sstables-post-upgrade branch from 157b77b to 046daf5 Compare July 21, 2026 01:12
@ManjotS
ManjotS changed the base branch from master to dev July 21, 2026 01:12
@ManjotS

ManjotS commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed @vreniers review:

  • PR base retargeted to dev (rebased)
  • Task renamed to Wait for nodetool (dropped JMX wording)

@vreniers vreniers left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upon closer look, I have 1 more comment.

Comment thread ansible-scylla-node/defaults/main.yml Outdated
Set upgrade_sstables default to {{ upgrade_major }} so SSTables are
rewritten only on major upgrades by default and skipped on minor
upgrades, per review. Still overridable.

Co-authored-by: Cursor <cursoragent@cursor.com>
@ManjotS
ManjotS requested a review from vreniers July 25, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants