From 2fb06a8f8c21acc695455f292a1f68bdb866312c Mon Sep 17 00:00:00 2001 From: Nathan VanBenschoten Date: Mon, 14 Oct 2024 18:31:38 -0400 Subject: [PATCH] release-24.1: roachtest: disable zone config evacuation for v22.2 nodes Closes #132546. No patch release of v22.2 and earlier has #114365, so they have the potential to be flaky when evacuating nodes using zone configs. Don't use zone config movement for these versions. Release note: None --- .../roachtest/tests/mixed_version_change_replicas.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/roachtest/tests/mixed_version_change_replicas.go b/pkg/cmd/roachtest/tests/mixed_version_change_replicas.go index 5b8a11e167d6..dd6ae7d565c5 100644 --- a/pkg/cmd/roachtest/tests/mixed_version_change_replicas.go +++ b/pkg/cmd/roachtest/tests/mixed_version_change_replicas.go @@ -17,6 +17,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil/clusterupgrade" "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil/mixedversion" "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test" + "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/roachprod/install" "github.com/cockroachdb/cockroach/pkg/roachprod/logger" "github.com/cockroachdb/cockroach/pkg/testutils" @@ -247,7 +248,16 @@ func runChangeReplicasMixedVersion(ctx context.Context, t test.Test, c cluster.C }) for _, node := range nodes { - if r.Float64() < 0.5 { + // No patch release of v22.2 and earlier has #114365, so they have the + // potential to be flaky when evacuating nodes using zone configs. Don't + // use zone config movement for these versions. + bv, err := clusterupgrade.BinaryVersion(h.Connect(node)) + if err != nil { + return errors.Wrapf(err, "failed to get binary version for node %d", node) + } + evacuateNodeUsingZoneConfigFlaky := bv.Less(roachpb.Version{Major: 23}) + + if r.Float64() < 0.5 && !evacuateNodeUsingZoneConfigFlaky { if err := evacuateNodeUsingZoneConfig(ctx, l, r, h, node); err != nil { return err }