@@ -17,6 +17,7 @@ import (
1717 "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil/clusterupgrade"
1818 "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/roachtestutil/mixedversion"
1919 "github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test"
20+ "github.com/cockroachdb/cockroach/pkg/roachpb"
2021 "github.com/cockroachdb/cockroach/pkg/roachprod/install"
2122 "github.com/cockroachdb/cockroach/pkg/roachprod/logger"
2223 "github.com/cockroachdb/cockroach/pkg/testutils"
@@ -247,7 +248,16 @@ func runChangeReplicasMixedVersion(ctx context.Context, t test.Test, c cluster.C
247248 })
248249
249250 for _ , node := range nodes {
250- if r .Float64 () < 0.5 {
251+ // No patch release of v22.2 and earlier has #114365, so they have the
252+ // potential to be flaky when evacuating nodes using zone configs. Don't
253+ // use zone config movement for these versions.
254+ bv , err := clusterupgrade .BinaryVersion (ctx , h .Connect (node ))
255+ if err != nil {
256+ return errors .Wrapf (err , "failed to get binary version for node %d" , node )
257+ }
258+ evacuateNodeUsingZoneConfigFlaky := bv .Less (roachpb.Version {Major : 23 })
259+
260+ if r .Float64 () < 0.5 && ! evacuateNodeUsingZoneConfigFlaky {
251261 if err := evacuateNodeUsingZoneConfig (ctx , l , r , h , node ); err != nil {
252262 return err
253263 }
0 commit comments