Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roachtest: add elastic backup equivalent test for aws #117678

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 31 additions & 12 deletions pkg/cmd/roachtest/tests/admission_control_elastic_backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,8 @@ import (
// which {CPU-scheduler,foreground} latencies are protected and track this data
// in roachperf.
func registerElasticControlForBackups(r registry.Registry) {
r.Add(registry.TestSpec{
Name: "admission-control/elastic-backup",
Owner: registry.OwnerAdmissionControl,
Benchmark: true,
CompatibleClouds: registry.AllExceptAWS,
Suites: registry.Suites(registry.Weekly),
Cluster: r.MakeClusterSpec(4, spec.CPU(8)),
Leases: registry.MetamorphicLeases,
Run: func(ctx context.Context, t test.Test, c cluster.Cluster) {
run := func(cloud string) func(ctx context.Context, t test.Test, c cluster.Cluster) {
return func(ctx context.Context, t test.Test, c cluster.Cluster) {
if c.Spec().NodeCount < 4 {
t.Fatalf("expected at least 4 nodes, found %d", c.Spec().NodeCount)
}
Expand Down Expand Up @@ -83,6 +76,7 @@ func registerElasticControlForBackups(r registry.Registry) {
EstimatedSetupTime: estimatedSetupTime,
SkipPostRunCheck: true,
ExtraSetupArgs: "--checks=false",
ExtraRunArgs: "--tolerate-errors",
PrometheusConfig: promCfg,
DisableDefaultScheduledBackup: true,
During: func(ctx context.Context) error {
Expand All @@ -95,10 +89,13 @@ func registerElasticControlForBackups(r registry.Registry) {
m := c.NewMonitor(ctx, c.Range(1, crdbNodes))
m.Go(func(ctx context.Context) error {
t.Status(fmt.Sprintf("during: creating full backup schedule to run every 20m (<%s)", time.Minute))
gcsBackupTestingBucket := backupTestingBucket
bucketPrefix := "gs"
if cloud == "aws" {
bucketPrefix = "s3"
}
_, err := db.ExecContext(ctx,
`CREATE SCHEDULE FOR BACKUP INTO $1 RECURRING '*/20 * * * *' FULL BACKUP ALWAYS WITH SCHEDULE OPTIONS ignore_existing_backups;`,
"gs://"+gcsBackupTestingBucket+"/"+c.Name()+"?AUTH=implicit",
bucketPrefix+"://"+backupTestingBucket+"/"+c.Name()+"?AUTH=implicit",
)
return err
})
Expand All @@ -108,6 +105,28 @@ func registerElasticControlForBackups(r registry.Registry) {
return nil
},
})
},
}
}

r.Add(registry.TestSpec{
Name: "admission-control/elastic-backup",
Owner: registry.OwnerAdmissionControl,
Benchmark: true,
Suites: registry.Suites(`weekly`),
Cluster: r.MakeClusterSpec(4, spec.CPU(8)),
CompatibleClouds: registry.OnlyGCE,
Leases: registry.MetamorphicLeases,
Run: run("gce"),
})

r.Add(registry.TestSpec{
Name: "admission-control/elastic-backup-s3",
Owner: registry.OwnerAdmissionControl,
Benchmark: true,
Suites: registry.Suites(`weekly`),
Cluster: r.MakeClusterSpec(4, spec.CPU(8)),
CompatibleClouds: registry.OnlyAWS,
Leases: registry.MetamorphicLeases,
Run: run("aws"),
})
}
Loading