Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(upgrade): upgrade with raft topology procedure
After upgrade to latest master(6.0) raft topology feature or tablets + raft topology features will be enabled by default To switch cluster from gossiper to raft topology, raft topology procedure should be executed. It is described in scylla doc upgrade from 5.4-> 6.0 section: Upgrade from legacy topology to raft-based topology Two major new features were introduced in the 6.0 and 6.1 releases: - tablets - raft topology (consistent_topology_changes) The 'raft topology changes' feature is enabled by default for any new cluster. No parameter related to this feature could be used in the scylla.yaml file. To disable the raft topology feature for a new cluster we need to add a new parameter to scylla.yaml: 'force_gossip_topology_changes: true'. To enable the feature after upgrade from versions where 'raft topology feature' is missed or from version where it was disabled, we need manually trigger 'raft topology upgrade procedure'. It's important to note that once the upgrade procedure for enabling the raft topology has been performed, there is no way to revert back to the gossip topology. The tablets feature is disabled by default and depends on the raft topology feature. If the raft topology feature is disabled, then tablets cannot be enabled independently. For new clusters (scylla version >= 6.0), it is enabled via adding 'enable_tablets: true' to scylla.yaml If a cluster was created with the disabled tablets feature or was upgraded from version < 6.0, then tablets are disabled. We need to support the following upgrade paths because the sct master branch could be used with different versions and to safely backport to 6.0 and enterprise: 1. 5.4 -> 6.0, 2. 5.4->2024.2.dev, 3. 6.0->6.1.dev, 4. 2024.1 -> 2024.2.dev Feature state per versions: 5.4, 2024.1 - doesn't have tablets and raft topology. 6.0+ - could have tablets and raft topology in different states: enabled/disabled. Upgrade from versions 5.4, 2024.1 -> 6.0, 2024.2 could be done with the following options: 1. raft topology disabled after upgrade. For that, we need to add a new parameter force_gossip_topology_changes:true and not run the raft topology upgrade procedure after all nodes have been upgraded. In this case, tablets should not be enabled at all. No need to add anything to scylla.yaml. 2. raft topology enabled after upgrade. No need to add anything to scylla.yaml and run the raft topology upgrade procedure after all nodes have been upgraded. 3. tablets feature is not enabled after upgrade. No need to add anything to scylla.yaml (because tablets are disabled by default). Raft topology feature is default as in points (1,2). 4. tablets feature is enabled after upgrade. Before node upgrade, 'enable_tablets: true' should be added to scylla.yaml and if the raft topology were disabled by parameter, it should be removed. And after all nodes have been upgraded, run the raft topology upgrade procedure. Upgrade from 6.0 -> to 6.1 and enterprise default scenarios: 1. raft topology feature already enabled. in this case we can't disable it upon upgrade and should run regular upgrade 2. tablets feature enabled in this case features couldn't be disabled after upgrade and should run as is 3. raft topology feature was disabled and it will be enabled after upgrade the force_gossip_topology_changes could be removed from scylla.yaml before upgrade or could stay and raft topology upgrade procedure have to be executed after all nodes has been upgraded 4. raft topology feature was disabled and after upgrade it should stay disabled: nothing should be done with scylla.yaml and raft topology upgrade procedure shouldn't be executed after all nodes has been upgraded 5. tablets feature is disabled and should be enabled after upgrade scylla.yaml should be updated with 'enable_tablets: true' before upgrade and raft topology upgrade procedure should be run after all node has been upgraded 6. tablets feature is disabled and should be disabled after upgrade nothing should be done with scylla.yaml and after upgrade to support all these paths 2 sct_config parameters will be used: - enable_force_gossip_topology_changes_on_upgrade. Default value is false. This parameter is used to trigger raft topology upgrade procedure - enable_tablets_on_upgrade. Default value is true update scylla.yaml with 'enable_tablets: true' and appropriate jobs should have appropriate 'scylla_yaml_append' parameter: 1. to disable tablets before upgrade: - scylla_yaml_append: enable_tablets: false 2. to disable raft topology feature before upgrade: - scylla_yaml_append: force_gossip_topology_changes: true enable_tablets: false force_gossip_topology_changes: true combination of these 4th parameters should allow to support all possible configurations. Upgrade from 5.4 -> 6.0 Default upgrade with enable raft topology feature and tablets feature: enable_force_gossip_topology_on_upgrade: false enable_tablets_on_upgrade: true no additional `append_scylla_yaml' parameters which is default for rolling upgrades upgrade will be run and after upgrade raft toplogy feature will be enabled, raft topology upgrade procedure will be executed and tablets feature will be enabled via scylla.yaml Upgrade from 5.4 -> 6.0 Default upgrade with enable raft topology feature and tablets feature: enable_force_gossip_topology_on_upgrade: false enable_tablets_on_upgrade: false no additional `append_scylla_yaml' parameters which is default for rolling upgrades upgrade will be run and after upgrade raft topology feature will be enabled, raft topology upgrade procedure will be executed and tablets feature will be disabled(no in scylla.yaml and default is false) Upgrade from 6.0->6.1 default path: raft topology feature enabled tablets enabled in scylla.yaml. enable_force_gossip_topology_on_upgrade: false enable_tablets_on_upgrade: false upgrade will be run with both features enabled Upgrade from 6.0->6.1 default path: raft topology feature enabled tablets disabled in scylla.yaml. append_scylla_yaml: enable_tablets: false enable_force_gossip_topology_on_upgrade: false enable_tablets_on_upgrade: true upgrade will be run with enabled raft topology feature, before upgrade scylla.yaml will be updated with enable_tablets: true
- Loading branch information