forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…achdb#139475 139150: kvserver: remove StoreBenignError r=tbg a=tbg Before commit 3f0b37a, the StoreBenignError is used to handle pebble.ErrSnapshotExcised. As the latter has been removed from pebble, we don't need StoreBenignError anymore. This commit does the following: - Remove type "StoreBenignError". - Remove the related increase action on counter "storeFailures". - Update related tests "TestBaseQueueRequeue". Fixes: cockroachdb#129941 Closes: cockroachdb#130308 Release note: None 139280: roachtest: adding backup/restore tests for minio r=sravotto a=sravotto Introducing a test to verify that we can backup and restore into a Minio Object Store cluster, using S3 API. Fixes: cockroachdb#139272 Release note: None 139333: roachtest: only run 30 node backfill tests in full ac mode r=andrewbaptist a=andrewbaptist In the non-full AC modes, a node can OOM during the fill period and the test will fail. This impacts the perturbation/metamorphic/backfill test. Fixes: cockroachdb#139302 Informs: cockroachdb#139319 Release note: None 139475: rangefeed: fix test logging r=tbg a=stevendanna The logging didn't actually print the value as it seemed to intend. Informs cockroachdb#119340 Release note: None Co-authored-by: XiaochenCui <[email protected]> Co-authored-by: Tobias Grieger <[email protected]> Co-authored-by: Silvano Ravotto <[email protected]> Co-authored-by: Andrew Baptist <[email protected]> Co-authored-by: Steven Danna <[email protected]>
- Loading branch information
Showing
22 changed files
with
169 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
// Copyright 2025 The Cockroach Authors. | ||
// | ||
// Use of this software is governed by the CockroachDB Software License | ||
// included in the /LICENSE file. | ||
|
||
package tests | ||
|
||
import ( | ||
"context" | ||
"fmt" | ||
"net/url" | ||
"path" | ||
|
||
"github.com/cockroachdb/cockroach/pkg/cloud/amazon" | ||
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/cluster" | ||
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/option" | ||
"github.com/cockroachdb/cockroach/pkg/cmd/roachtest/test" | ||
) | ||
|
||
// minioDir is the directory for supporting files. | ||
var minioDir = "/tmp/minio" | ||
|
||
// minioManager manages a single node minio cluster, used to | ||
// validate the backup and restore functionality. | ||
type minioManager struct { | ||
t test.Test | ||
c cluster.Cluster | ||
bucket string | ||
minioNodes option.NodeListOption // The nodes within the cluster used by Minio. | ||
key string | ||
secret string | ||
} | ||
|
||
// minioManager implements s3Provider | ||
var _ s3Provider = &minioManager{} | ||
|
||
// getBackupURI implements s3Provider. | ||
func (m minioManager) getBackupURI(ctx context.Context, dest string) (string, error) { | ||
addr, err := m.c.InternalIP(ctx, m.t.L(), m.minioNodes) | ||
if err != nil { | ||
return "", err | ||
} | ||
m.t.Status("minio: ", addr) | ||
endpointURL := `https://` + addr[0] | ||
|
||
q := make(url.Values) | ||
q.Add(amazon.AWSAccessKeyParam, m.key) | ||
q.Add(amazon.AWSSecretParam, m.secret) | ||
q.Add(amazon.AWSUsePathStyle, "true") | ||
// Region is required in the URL, but not used in Minio. | ||
q.Add(amazon.S3RegionParam, "dummy") | ||
q.Add(amazon.AWSEndpointParam, endpointURL) | ||
uri := fmt.Sprintf("s3://%s/%s?%s", m.bucket, dest, q.Encode()) | ||
return uri, nil | ||
} | ||
|
||
func (m minioManager) cleanup(ctx context.Context) { | ||
m.run(ctx, "removing minio", "sudo docker rm -f minio") | ||
m.run(ctx, "removing minio dir", fmt.Sprintf(`rm -rf %s`, minioDir)) | ||
} | ||
|
||
// install a single node minio cluster within a docker container. | ||
// It is fatal on errors. | ||
func (m minioManager) install(ctx context.Context) { | ||
if err := m.c.Install(ctx, m.t.L(), m.minioNodes, "docker"); err != nil { | ||
m.t.Fatalf("failed to install docker: %v", err) | ||
} | ||
certsDir := path.Join(minioDir, "certs") | ||
m.run(ctx, `copy CA`, | ||
fmt.Sprintf(`mkdir -p %[1]s/CAs ; cp certs/ca.crt %[1]s/CAs/ca.crt; `, certsDir)) | ||
m.run(ctx, `copy certs/key`, | ||
fmt.Sprintf(`cp certs/node.crt %[1]s/public.crt; cp certs/node.key %[1]s/private.key; `, | ||
certsDir)) | ||
m.run(ctx, `installing minio`, | ||
fmt.Sprintf(`sudo docker run --name minio -d -p 443:9000 -e "MINIO_ROOT_USER=%s" -e "MINIO_ROOT_PASSWORD=%s" --privileged -v %s:/root/.minio minio/minio server /data`, | ||
m.key, m.secret, minioDir)) | ||
|
||
m.run(ctx, `install s3cmd`, `sudo apt install -y s3cmd`) | ||
m.run(ctx, `creating bucket`, | ||
fmt.Sprintf(s3cmdSsl, m.key, m.secret, "mb s3://"+m.bucket)) | ||
|
||
if err := installCa(ctx, m.t, m.c); err != nil { | ||
m.t.Fatal(err) | ||
} | ||
} | ||
|
||
// run the given command on the minio node. | ||
func (m minioManager) run(ctx context.Context, msg string, cmd ...string) { | ||
m.t.Status(msg, "...") | ||
m.t.Status(cmd) | ||
m.c.Run(ctx, option.WithNodes(m.minioNodes), cmd...) | ||
m.t.Status(msg, " done") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.