Skip to content

Commit

Permalink
Merge pull request #108274 from erikgrinaker/backport23.1-108115
Browse files Browse the repository at this point in the history
release-23.1: roachtest: don't reuse clusters that call dmsetup
  • Loading branch information
erikgrinaker authored Aug 8, 2023
2 parents 5a0d329 + 099bd82 commit fe57847
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions pkg/cmd/roachtest/tests/failover.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func registerFailover(r registry.Registry) {
Name: "failover/chaos" + suffix,
Owner: registry.OwnerKV,
Timeout: 60 * time.Minute,
Cluster: r.MakeClusterSpec(10, spec.CPU(2), spec.PreferLocalSSD(false)),
Cluster: r.MakeClusterSpec(10, spec.CPU(2), spec.PreferLocalSSD(false), spec.ReuseNone()), // uses disk stalls
Leases: leases,
SkipPostValidations: registry.PostValidationNoDeadNodes, // cleanup kills nodes
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
Expand Down Expand Up @@ -118,22 +118,25 @@ func registerFailover(r registry.Registry) {
for _, failureMode := range allFailureModes {
failureMode := failureMode // pin loop variable

var usePD bool
clusterOpts := make([]spec.Option, 0)
clusterOpts = append(clusterOpts, spec.CPU(2))

var postValidation registry.PostValidation
if failureMode == failureModeDiskStall {
// Use PDs in an attempt to work around flakes encountered when using
// SSDs. See #97968.
usePD = true
}
var postValidation registry.PostValidation = 0
if failureMode == failureModeDiskStall {
clusterOpts = append(clusterOpts, spec.PreferLocalSSD(false))
// Don't reuse the cluster for tests that call dmsetup to avoid
// spurious flakes from previous runs. See #107865
clusterOpts = append(clusterOpts, spec.ReuseNone())
postValidation = registry.PostValidationNoDeadNodes
}
r.Add(registry.TestSpec{
Name: fmt.Sprintf("failover/non-system/%s%s", failureMode, suffix),
Owner: registry.OwnerKV,
Benchmark: true,
Timeout: 30 * time.Minute,
Cluster: r.MakeClusterSpec(7, spec.CPU(2), spec.PreferLocalSSD(!usePD)),
Cluster: r.MakeClusterSpec(7, clusterOpts...),
Leases: leases,
SkipPostValidations: postValidation,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
Expand All @@ -146,7 +149,7 @@ func registerFailover(r registry.Registry) {
Tags: []string{"weekly"},
Benchmark: true,
Timeout: 30 * time.Minute,
Cluster: r.MakeClusterSpec(5, spec.CPU(2), spec.PreferLocalSSD(!usePD)),
Cluster: r.MakeClusterSpec(5, clusterOpts...),
Leases: leases,
SkipPostValidations: postValidation,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
Expand All @@ -159,7 +162,7 @@ func registerFailover(r registry.Registry) {
Tags: []string{"weekly"},
Benchmark: true,
Timeout: 30 * time.Minute,
Cluster: r.MakeClusterSpec(7, spec.CPU(2), spec.PreferLocalSSD(!usePD)),
Cluster: r.MakeClusterSpec(7, clusterOpts...),
Leases: leases,
SkipPostValidations: postValidation,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
Expand Down

0 comments on commit fe57847

Please sign in to comment.