diff --git a/pkg/cmd/roachtest/roachtestutil/clusterupgrade/clusterupgrade.go b/pkg/cmd/roachtest/roachtestutil/clusterupgrade/clusterupgrade.go index 250e9abf4d68..a2310fbe66a0 100644 --- a/pkg/cmd/roachtest/roachtestutil/clusterupgrade/clusterupgrade.go +++ b/pkg/cmd/roachtest/roachtestutil/clusterupgrade/clusterupgrade.go @@ -286,7 +286,7 @@ func WaitForClusterUpgrade( return nil } - l.Printf("waiting for cluster to auto-upgrade to %s", newVersion) + l.Printf("waiting for cluster to auto-upgrade to %s for %s", newVersion, timeout) if err := waitForUpgrade(firstNode, timeout); err != nil { return err } diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/planner.go b/pkg/cmd/roachtest/roachtestutil/mixedversion/planner.go index 2944f76feff0..4a2fc7192c7b 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/planner.go +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/planner.go @@ -145,7 +145,6 @@ func (p *testPlanner) initSteps() []testStep { // nodes to be the same and then run any after-finalization hooks the // user may have provided. func (p *testPlanner) finalSteps() []testStep { - fmt.Printf(">>>> option timeout: %s\n", p.options.upgradeTimeout) return append([]testStep{ waitForStableClusterVersionStep{id: p.nextID(), nodes: p.crdbNodes, timeout: p.options.upgradeTimeout}, }, p.hooks.AfterUpgradeFinalizedSteps(p.nextID, p.finalContext(false /* finalizing */))...) diff --git a/pkg/cmd/roachtest/roachtestutil/mixedversion/planner_test.go b/pkg/cmd/roachtest/roachtestutil/mixedversion/planner_test.go index 07c834fd5179..7b9ee036df5c 100644 --- a/pkg/cmd/roachtest/roachtestutil/mixedversion/planner_test.go +++ b/pkg/cmd/roachtest/roachtestutil/mixedversion/planner_test.go @@ -264,8 +264,7 @@ func Test_startClusterID(t *testing.T) { // timeout in the clusterupgrade package is used; otherwise, the // custom value is enforced. func Test_upgradeTimeout(t *testing.T) { - findUpgradeWaitStep := func(plan *TestPlan) []waitForStableClusterVersionStep { - var zero waitForStableClusterVersionStep + findUpgradeWaitSteps := func(plan *TestPlan) []waitForStableClusterVersionStep { var steps []waitForStableClusterVersionStep for _, s := range plan.steps { if step, isUpgrade := s.(waitForStableClusterVersionStep); isUpgrade { @@ -273,7 +272,7 @@ func Test_upgradeTimeout(t *testing.T) { } } if len(steps) == 0 { - require.Fail(t, "could not find any %T step in the plan", zero) + require.Fail(t, "could not find any waitForStableClusterVersionStep in the plan") } return steps } @@ -282,7 +281,7 @@ func Test_upgradeTimeout(t *testing.T) { mvt := newTest(opts...) plan, err := mvt.plan() require.NoError(t, err) - waitUpgrades := findUpgradeWaitStep(plan) + waitUpgrades := findUpgradeWaitSteps(plan) for _, s := range waitUpgrades { require.Equal(t, expectedTimeout, s.timeout) diff --git a/pkg/cmd/roachtest/tests/mixed_version_backup.go b/pkg/cmd/roachtest/tests/mixed_version_backup.go index 2b1f0d4eb150..c0c87c9ed59e 100644 --- a/pkg/cmd/roachtest/tests/mixed_version_backup.go +++ b/pkg/cmd/roachtest/tests/mixed_version_backup.go @@ -2101,7 +2101,14 @@ func registerBackupMixedVersion(r registry.Registry) { roachNodes := c.Range(1, c.Spec().NodeCount-1) workloadNode := c.Node(c.Spec().NodeCount) - mvt := mixedversion.NewTest(ctx, t, t.L(), c, roachNodes) + mvt := mixedversion.NewTest( + ctx, t, t.L(), c, roachNodes, + // We use a longer upgrade timeout in this test to give the + // migrations enough time to finish considering all the data + // that might exist in the cluster by the time the upgrade is + // attempted. + mixedversion.UpgradeTimeout(30*time.Minute), + ) testRNG := mvt.RNG() uploadVersion(ctx, t, c, workloadNode, clusterupgrade.MainVersion)