From 9647c5448ce3db55009fd8ec633c98e45f766e4a Mon Sep 17 00:00:00 2001 From: Renato Costa Date: Thu, 23 Nov 2023 13:17:09 -0500 Subject: [PATCH] mixedversion: rename `finalizeUpgrade` step to `allowUpgrade` In the near future, we will randomly change the timing of this step so that it is not immediately followed by migrations, as the name previously suggested. Epic: none Release note: None --- .../roachtestutil/mixedversion/mixedversion.go | 12 ++++++------ .../roachtest/roachtestutil/mixedversion/planner.go | 2 +- .../testdata/planner/basic_test_mixed_version_hooks | 2 +- .../testdata/planner/conflicting_mutators | 2 +- .../testdata/planner/local_runs_reduced_wait_time | 6 +++--- .../testdata/planner/minimum_supported_version | 10 +++++----- .../mixedversion/testdata/planner/multiple_upgrades | 6 +++--- .../testdata/planner/mutator_probabilities | 2 +- .../mixedversion/testdata/planner/step_stages | 10 +++++----- 9 files changed, 26 insertions(+), 26 deletions(-) diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/mixedversion.go b/pkg/cmd/roachtest/roachtestutil/mixedversion/mixedversion.go index 9171b559884a..2582344fd4fc 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/mixedversion.go +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/mixedversion.go @@ -860,21 +860,21 @@ func (s restartWithNewBinaryStep) Run( ) } -// finalizeUpgradeStep resets the `preserve_downgrade_option` cluster +// allowUpgradeStep resets the `preserve_downgrade_option` cluster // setting, allowing the upgrade migrations to run and the cluster // version to eventually reach the binary version on the nodes. -type finalizeUpgradeStep struct { +type allowUpgradeStep struct { crdbNodes option.NodeListOption prng *rand.Rand } -func (s finalizeUpgradeStep) Background() shouldStop { return nil } +func (s allowUpgradeStep) Background() shouldStop { return nil } -func (s finalizeUpgradeStep) Description() string { - return "finalize upgrade by resetting `preserve_downgrade_option`" +func (s allowUpgradeStep) Description() string { + return "allow upgrade to happen by resetting `preserve_downgrade_option`" } -func (s finalizeUpgradeStep) Run( +func (s allowUpgradeStep) Run( ctx context.Context, l *logger.Logger, c cluster.Cluster, h *Helper, ) error { node, db := h.RandomDB(s.prng, s.crdbNodes) diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/planner.go b/pkg/cmd/roachtest/roachtestutil/mixedversion/planner.go index 6aa43b5f08a0..98fdee901db4 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/planner.go +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/planner.go @@ -410,7 +410,7 @@ func (p *testPlanner) finalizeUpgradeSteps( p.currentContext.Finalizing = true p.currentContext.Stage = RunningUpgradeMigrationsStage runMigrations := p.newSingleStep( - finalizeUpgradeStep{prng: p.newRNG(), crdbNodes: p.crdbNodes}, + allowUpgradeStep{prng: p.newRNG(), crdbNodes: p.crdbNodes}, ) var mixedVersionStepsDuringMigrations []testStep if scheduleHooks { diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/basic_test_mixed_version_hooks b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/basic_test_mixed_version_hooks index 125c5d534c8d..718e5840a71e 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/basic_test_mixed_version_hooks +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/basic_test_mixed_version_hooks @@ -43,6 +43,6 @@ mixed-version test plan for upgrading from "v22.2.8" to "": │ ├── restart node 1 with binary version (13) │ ├── run "mixed-version 1" (14) │ └── restart node 3 with binary version (15) - ├── finalize upgrade by resetting `preserve_downgrade_option` (16) + ├── allow upgrade to happen by resetting `preserve_downgrade_option` (16) ├── run "mixed-version 2" (17) └── wait for nodes :1-4 to reach cluster version (18) diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/conflicting_mutators b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/conflicting_mutators index e4ac2ce90b44..b6406b11a3a7 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/conflicting_mutators +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/conflicting_mutators @@ -43,5 +43,5 @@ mixed-version test plan for upgrading from "v22.2.8" to "" with mutator │ ├── testSingleStep (17) [stage=last-upgrade] │ ├── restart node 1 with binary version (18) [stage=last-upgrade] │ └── restart node 3 with binary version (19) [stage=last-upgrade] - ├── finalize upgrade by resetting `preserve_downgrade_option` (20) [stage=running-upgrade-migrations] + ├── allow upgrade to happen by resetting `preserve_downgrade_option` (20) [stage=running-upgrade-migrations] └── wait for nodes :1-4 to reach cluster version (21) [stage=running-upgrade-migrations] diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/local_runs_reduced_wait_time b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/local_runs_reduced_wait_time index d3dbea49e5ec..103264e1d21f 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/local_runs_reduced_wait_time +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/local_runs_reduced_wait_time @@ -49,7 +49,7 @@ mixed-version test plan for upgrading from "v22.2.3" to "v23.1.4" to "v23.2.0" t │ │ ├── wait for 30s (15) │ │ ├── restart node 4 with binary version v23.1.4 (16) │ │ └── restart node 2 with binary version v23.1.4 (17) -│ ├── finalize upgrade by resetting `preserve_downgrade_option` (18) +│ ├── allow upgrade to happen by resetting `preserve_downgrade_option` (18) │ └── wait for nodes :1-4 to reach cluster version '23.1' (19) ├── run "initialize bank workload" (20) ├── start background hooks concurrently @@ -65,7 +65,7 @@ mixed-version test plan for upgrading from "v22.2.3" to "v23.1.4" to "v23.2.0" t │ │ ├── restart node 1 with binary version v23.2.0 (27) │ │ ├── restart node 2 with binary version v23.2.0 (28) │ │ └── restart node 3 with binary version v23.2.0 (29) -│ ├── finalize upgrade by resetting `preserve_downgrade_option` (30) +│ ├── allow upgrade to happen by resetting `preserve_downgrade_option` (30) │ ├── wait for nodes :1-4 to reach cluster version '23.2' (31) │ └── run "validate upgrade" (32) └── upgrade cluster from "v23.2.0" to "" @@ -91,7 +91,7 @@ mixed-version test plan for upgrading from "v22.2.3" to "v23.1.4" to "v23.2.0" t │ ├── run "mixed-version 2" (49) │ ├── restart node 2 with binary version (50) │ └── restart node 3 with binary version (51) - ├── finalize upgrade by resetting `preserve_downgrade_option` (52) + ├── allow upgrade to happen by resetting `preserve_downgrade_option` (52) ├── run "mixed-version 2" (53) ├── wait for nodes :1-4 to reach cluster version (54) └── run "validate upgrade" (55) diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/minimum_supported_version b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/minimum_supported_version index f94f89c848ee..9a9f13c5f38b 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/minimum_supported_version +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/minimum_supported_version @@ -49,7 +49,7 @@ mixed-version test plan for upgrading from "v21.2.11" to "v22.1.8" to "v22.2.3" │ │ ├── wait for 5m0s (15) │ │ ├── restart node 4 with binary version v22.1.8 (16) │ │ └── restart node 2 with binary version v22.1.8 (17) -│ ├── finalize upgrade by resetting `preserve_downgrade_option` (18) +│ ├── allow upgrade to happen by resetting `preserve_downgrade_option` (18) │ └── wait for nodes :1-4 to reach cluster version '22.1' (19) ├── upgrade cluster from "v22.1.8" to "v22.2.3" │ ├── prevent auto-upgrades by setting `preserve_downgrade_option` (20) @@ -59,7 +59,7 @@ mixed-version test plan for upgrading from "v21.2.11" to "v22.1.8" to "v22.2.3" │ │ ├── restart node 1 with binary version v22.2.3 (23) │ │ ├── restart node 2 with binary version v22.2.3 (24) │ │ └── restart node 3 with binary version v22.2.3 (25) -│ ├── finalize upgrade by resetting `preserve_downgrade_option` (26) +│ ├── allow upgrade to happen by resetting `preserve_downgrade_option` (26) │ └── wait for nodes :1-4 to reach cluster version '22.2' (27) ├── upgrade cluster from "v22.2.3" to "v23.1.4" │ ├── prevent auto-upgrades by setting `preserve_downgrade_option` (28) @@ -69,7 +69,7 @@ mixed-version test plan for upgrading from "v21.2.11" to "v22.1.8" to "v22.2.3" │ │ ├── restart node 3 with binary version v23.1.4 (31) │ │ ├── restart node 4 with binary version v23.1.4 (32) │ │ └── wait for 10m0s (33) -│ ├── finalize upgrade by resetting `preserve_downgrade_option` (34) +│ ├── allow upgrade to happen by resetting `preserve_downgrade_option` (34) │ └── wait for nodes :1-4 to reach cluster version '23.1' (35) ├── run "initialize bank workload" (36) ├── start background hooks concurrently @@ -84,7 +84,7 @@ mixed-version test plan for upgrading from "v21.2.11" to "v22.1.8" to "v22.2.3" │ │ ├── restart node 2 with binary version v23.2.0 (43) │ │ ├── run "mixed-version 2" (44) │ │ └── restart node 3 with binary version v23.2.0 (45) -│ ├── finalize upgrade by resetting `preserve_downgrade_option` (46) +│ ├── allow upgrade to happen by resetting `preserve_downgrade_option` (46) │ ├── wait for nodes :1-4 to reach cluster version '23.2' (47) │ └── run "validate upgrade" (48) └── upgrade cluster from "v23.2.0" to "" @@ -111,7 +111,7 @@ mixed-version test plan for upgrading from "v21.2.11" to "v22.1.8" to "v22.2.3" │ ├── run "mixed-version 1" (65) │ ├── restart node 4 with binary version (66) │ └── restart node 1 with binary version (67) - ├── finalize upgrade by resetting `preserve_downgrade_option` (68) + ├── allow upgrade to happen by resetting `preserve_downgrade_option` (68) ├── run "mixed-version 1" (69) ├── wait for nodes :1-4 to reach cluster version (70) └── run "validate upgrade" (71) diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/multiple_upgrades b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/multiple_upgrades index d3b3b2b86569..a8b66f4ec3f8 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/multiple_upgrades +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/multiple_upgrades @@ -37,7 +37,7 @@ mixed-version test plan for upgrading from "v22.1.8" to "v22.2.3" to "v23.1.4" t │ │ ├── wait for 5m0s (15) │ │ ├── restart node 4 with binary version v22.2.3 (16) │ │ └── restart node 2 with binary version v22.2.3 (17) -│ ├── finalize upgrade by resetting `preserve_downgrade_option` (18) +│ ├── allow upgrade to happen by resetting `preserve_downgrade_option` (18) │ └── wait for nodes :1-4 to reach cluster version '22.2' (19) ├── run "initialize bank workload" (20) ├── run "bank workload" (21) @@ -49,7 +49,7 @@ mixed-version test plan for upgrading from "v22.1.8" to "v22.2.3" to "v23.1.4" t │ │ ├── restart node 1 with binary version v23.1.4 (25) │ │ ├── restart node 2 with binary version v23.1.4 (26) │ │ └── restart node 3 with binary version v23.1.4 (27) -│ ├── finalize upgrade by resetting `preserve_downgrade_option` (28) +│ ├── allow upgrade to happen by resetting `preserve_downgrade_option` (28) │ ├── run "mixed-version 1" (29) │ └── wait for nodes :1-4 to reach cluster version '23.1' (30) └── upgrade cluster from "v23.1.4" to "" @@ -71,6 +71,6 @@ mixed-version test plan for upgrading from "v22.1.8" to "v22.2.3" to "v23.1.4" t │ ├── restart node 4 with binary version (43) │ ├── run "mixed-version 1" (44) │ └── restart node 2 with binary version (45) - ├── finalize upgrade by resetting `preserve_downgrade_option` (46) + ├── allow upgrade to happen by resetting `preserve_downgrade_option` (46) ├── run "mixed-version 1" (47) └── wait for nodes :1-4 to reach cluster version (48) diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/mutator_probabilities b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/mutator_probabilities index 8406139e2439..ff067bfb1f4d 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/mutator_probabilities +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/mutator_probabilities @@ -45,5 +45,5 @@ mixed-version test plan for upgrading from "v22.2.8" to "" with mutator │ │ └── testSingleStep, after 30s delay (20) [stage=last-upgrade] │ ├── restart node 1 with binary version (21) [stage=last-upgrade] │ └── restart node 3 with binary version (22) [stage=last-upgrade] - ├── finalize upgrade by resetting `preserve_downgrade_option` (23) [stage=running-upgrade-migrations] + ├── allow upgrade to happen by resetting `preserve_downgrade_option` (23) [stage=running-upgrade-migrations] └── wait for nodes :1-4 to reach cluster version (24) [stage=running-upgrade-migrations] diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/step_stages b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/step_stages index 3a9fd1e5a5f6..79a5dbc31fc0 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/step_stages +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/testdata/planner/step_stages @@ -49,7 +49,7 @@ mixed-version test plan for upgrading from "v21.2.11" to "v22.1.8" to "v22.2.3" │ │ ├── wait for 5m0s (15) [stage=last-upgrade] │ │ ├── restart node 4 with binary version v22.1.8 (16) [stage=last-upgrade] │ │ └── restart node 2 with binary version v22.1.8 (17) [stage=last-upgrade] -│ ├── finalize upgrade by resetting `preserve_downgrade_option` (18) [stage=running-upgrade-migrations] +│ ├── allow upgrade to happen by resetting `preserve_downgrade_option` (18) [stage=running-upgrade-migrations] │ └── wait for nodes :1-4 to reach cluster version '22.1' (19) [stage=running-upgrade-migrations] ├── upgrade cluster from "v22.1.8" to "v22.2.3" │ ├── prevent auto-upgrades by setting `preserve_downgrade_option` (20) [stage=init] @@ -59,7 +59,7 @@ mixed-version test plan for upgrading from "v21.2.11" to "v22.1.8" to "v22.2.3" │ │ ├── restart node 1 with binary version v22.2.3 (23) [stage=last-upgrade] │ │ ├── restart node 2 with binary version v22.2.3 (24) [stage=last-upgrade] │ │ └── restart node 3 with binary version v22.2.3 (25) [stage=last-upgrade] -│ ├── finalize upgrade by resetting `preserve_downgrade_option` (26) [stage=running-upgrade-migrations] +│ ├── allow upgrade to happen by resetting `preserve_downgrade_option` (26) [stage=running-upgrade-migrations] │ └── wait for nodes :1-4 to reach cluster version '22.2' (27) [stage=running-upgrade-migrations] ├── run "initialize bank workload" (28) [stage=on-startup] ├── start background hooks concurrently @@ -74,7 +74,7 @@ mixed-version test plan for upgrading from "v21.2.11" to "v22.1.8" to "v22.2.3" │ │ ├── run "mixed-version 1" (35) [stage=last-upgrade] │ │ ├── restart node 4 with binary version v23.1.4 (36) [stage=last-upgrade] │ │ └── run "mixed-version 2" (37) [stage=last-upgrade] -│ ├── finalize upgrade by resetting `preserve_downgrade_option` (38) [stage=running-upgrade-migrations] +│ ├── allow upgrade to happen by resetting `preserve_downgrade_option` (38) [stage=running-upgrade-migrations] │ ├── run "mixed-version 1" (39) [stage=running-upgrade-migrations] │ ├── wait for nodes :1-4 to reach cluster version '23.1' (40) [stage=running-upgrade-migrations] │ └── run "validate upgrade" (41) [stage=after-upgrade-finished] @@ -101,7 +101,7 @@ mixed-version test plan for upgrading from "v21.2.11" to "v22.1.8" to "v22.2.3" │ │ ├── restart node 1 with binary version v23.2.0 (58) [stage=last-upgrade] │ │ ├── run "mixed-version 1" (59) [stage=last-upgrade] │ │ └── restart node 4 with binary version v23.2.0 (60) [stage=last-upgrade] -│ ├── finalize upgrade by resetting `preserve_downgrade_option` (61) [stage=running-upgrade-migrations] +│ ├── allow upgrade to happen by resetting `preserve_downgrade_option` (61) [stage=running-upgrade-migrations] │ ├── wait for nodes :1-4 to reach cluster version '23.2' (62) [stage=running-upgrade-migrations] │ └── run "validate upgrade" (63) [stage=after-upgrade-finished] └── upgrade cluster from "v23.2.0" to "" @@ -127,7 +127,7 @@ mixed-version test plan for upgrading from "v21.2.11" to "v22.1.8" to "v22.2.3" │ ├── restart node 1 with binary version (80) [stage=last-upgrade] │ ├── restart node 2 with binary version (81) [stage=last-upgrade] │ └── run "mixed-version 1" (82) [stage=last-upgrade] - ├── finalize upgrade by resetting `preserve_downgrade_option` (83) [stage=running-upgrade-migrations] + ├── allow upgrade to happen by resetting `preserve_downgrade_option` (83) [stage=running-upgrade-migrations] ├── run "mixed-version 2" (84) [stage=running-upgrade-migrations] ├── wait for nodes :1-4 to reach cluster version (85) [stage=running-upgrade-migrations] └── run "validate upgrade" (86) [stage=after-upgrade-finished]