Skip to content

Commit

Permalink
Merge pull request #100308 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.1-100286

release-23.1: roachtest: prevent aws roachtest panic
  • Loading branch information
msbutler authored Mar 31, 2023
2 parents ddd3539 + 4a7aa9d commit 17d2dee
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/cmd/roachtest/tests/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func registerRestoreNodeShutdown(r registry.Registry) {
r.Add(registry.TestSpec{
Name: "restore/nodeShutdown/worker",
Owner: registry.OwnerDisasterRecovery,
Cluster: sp.hardware.makeClusterSpecs(r),
Cluster: sp.hardware.makeClusterSpecs(r, sp.backup.cloud),
Timeout: sp.timeout,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
gatewayNode := 2
Expand All @@ -85,7 +85,7 @@ func registerRestoreNodeShutdown(r registry.Registry) {
r.Add(registry.TestSpec{
Name: "restore/nodeShutdown/coordinator",
Owner: registry.OwnerDisasterRecovery,
Cluster: sp.hardware.makeClusterSpecs(r),
Cluster: sp.hardware.makeClusterSpecs(r, sp.backup.cloud),
Timeout: sp.timeout,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {

Expand Down Expand Up @@ -128,7 +128,7 @@ func registerRestore(r registry.Registry) {
r.Add(registry.TestSpec{
Name: withPauseSpecs.testName,
Owner: registry.OwnerDisasterRecovery,
Cluster: withPauseSpecs.hardware.makeClusterSpecs(r),
Cluster: withPauseSpecs.hardware.makeClusterSpecs(r, withPauseSpecs.backup.cloud),
Timeout: withPauseSpecs.timeout,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {

Expand Down Expand Up @@ -353,7 +353,7 @@ func registerRestore(r registry.Registry) {
r.Add(registry.TestSpec{
Name: sp.testName,
Owner: registry.OwnerDisasterRecovery,
Cluster: sp.hardware.makeClusterSpecs(r),
Cluster: sp.hardware.makeClusterSpecs(r, sp.backup.cloud),
Timeout: sp.timeout,
// These tests measure performance. To ensure consistent perf,
// disable metamorphic encryption.
Expand Down Expand Up @@ -419,7 +419,7 @@ type hardwareSpecs struct {
mem spec.MemPerCPU
}

func (hw hardwareSpecs) makeClusterSpecs(r registry.Registry) spec.ClusterSpec {
func (hw hardwareSpecs) makeClusterSpecs(r registry.Registry, backupCloud string) spec.ClusterSpec {
clusterOpts := make([]spec.Option, 0)
clusterOpts = append(clusterOpts, spec.CPU(hw.cpus))
if hw.volumeSize != 0 {
Expand All @@ -430,7 +430,7 @@ func (hw hardwareSpecs) makeClusterSpecs(r registry.Registry) spec.ClusterSpec {
}
s := r.MakeClusterSpec(hw.nodes, clusterOpts...)

if s.Cloud == "aws" && s.VolumeSize != 0 {
if backupCloud == spec.AWS && s.Cloud == spec.AWS && s.VolumeSize != 0 {
// Work around an issue that RAID0s local NVMe and GP3 storage together:
// https://github.com/cockroachdb/cockroach/issues/98783.
//
Expand Down

0 comments on commit 17d2dee

Please sign in to comment.