Skip to content
Open
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
15 changes: 15 additions & 0 deletions ansible-scylla-node/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,21 @@ upgrade_break_before_verification: 90
# Any valid folder
upgrade_backup_path: /root/scylla-backup

# Run nodetool upgradesstables after the node is upgraded and CQL is up.
# Rewrites SSTables to the current format (e.g. system keyspace format drifts).
# Defaults to the upgrade type: skipped on minor upgrades, run on major upgrades.
# Values:
# [default] {{ upgrade_major }}: true for major upgrades, false for minor
# true: always run upgradesstables after post-upgrade start
# false: skip upgradesstables
upgrade_sstables: "{{ upgrade_major }}"

# Max wall-clock seconds for nodetool upgradesstables (async timeout).
# Values:
# [default] 36000 (10h), same order as cleanup/repair timeouts
# Any positive integer
upgrade_sstables_timeout_seconds: 36000

# ==============================
# INSTALL
# ==============================
Expand Down
21 changes: 21 additions & 0 deletions ansible-scylla-node/tasks/upgrade/post_upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,24 @@
port: 9042
host: "{{ scylla_listen_address }}"

- name: Wait for nodetool
ansible.builtin.command: nodetool status
register: nodetool_ready
until: nodetool_ready.rc == 0
retries: 30
delay: 10
when: upgrade_sstables | bool
changed_when: false

- name: Upgrade SSTables to current format
ansible.builtin.command: nodetool upgradesstables
register: upgradesstables_result
when: upgrade_sstables | bool
async: "{{ upgrade_sstables_timeout_seconds | int }}"
poll: 30
changed_when: upgradesstables_result.rc == 0

- name: Upgrade SSTables operation output
ansible.builtin.debug:
var: upgradesstables_result
when: upgrade_sstables | bool