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

cli/zip: emphasize "cluster virtualization" #106117

Merged
merged 1 commit into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion pkg/cli/testdata/zip/partial1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
zip
----
debug zip --concurrency=1 --cpu-profile-duration=0s /dev/null
[cluster] discovering tenants on cluster... done
[cluster] discovering virtual clusters... done
[cluster] creating output file /dev/null... done
[cluster] establishing RPC connection to ...
[cluster] using SQL address: ...
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/testdata/zip/partial1_excluded
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
zip
----
debug zip /dev/null --concurrency=1 --exclude-nodes=2 --cpu-profile-duration=0
[cluster] discovering tenants on cluster... done
[cluster] discovering virtual clusters... done
[cluster] creating output file /dev/null... done
[cluster] establishing RPC connection to ...
[cluster] using SQL address: ...
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/testdata/zip/partial2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
zip
----
debug zip --concurrency=1 --cpu-profile-duration=0 /dev/null
[cluster] discovering tenants on cluster... done
[cluster] discovering virtual clusters... done
[cluster] creating output file /dev/null... done
[cluster] establishing RPC connection to ...
[cluster] using SQL address: ...
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/testdata/zip/testzip
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
zip
----
debug zip --concurrency=1 --cpu-profile-duration=1s /dev/null
[cluster] discovering tenants on cluster... done
[cluster] discovering virtual clusters... done
[cluster] creating output file /dev/null... done
[cluster] establishing RPC connection to ...
[cluster] using SQL address: ...
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/testdata/zip/testzip_concurrent
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ zip
----
[cluster] creating output file /dev/null...
[cluster] creating output file /dev/null: done
[cluster] discovering tenants on cluster...
[cluster] discovering tenants on cluster: done
[cluster] discovering virtual clusters...
[cluster] discovering virtual clusters: done
[cluster] establishing RPC connection to ...
[cluster] establishing RPC connection to ...
[cluster] hot range summary script...
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
zip
----
debug zip --concurrency=1 --cpu-profile-duration=1s /dev/null
[cluster] discovering tenants on cluster... done
[cluster] discovering virtual clusters... done
[cluster] creating output file /dev/null... done
[cluster] establishing RPC connection to ...
[cluster] using SQL address: ...
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/testdata/zip/testzip_include_range_info
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
zip
----
debug zip --concurrency=1 --cpu-profile-duration=1s --include-range-info /dev/null
[cluster] discovering tenants on cluster... done
[cluster] discovering virtual clusters... done
[cluster] creating output file /dev/null... done
[cluster] establishing RPC connection to ...
[cluster] using SQL address: ...
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/cli/testdata/zip/unavailable
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
zip
----
debug zip --concurrency=1 --cpu-profile-duration=0 /dev/null --timeout=.5s
[cluster] discovering tenants on cluster... done
[cluster] discovering virtual clusters... done
[cluster] creating output file /dev/null... done
[cluster] establishing RPC connection to ...
[cluster] using SQL address: ...
Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,15 @@ func runDebugZip(cmd *cobra.Command, args []string) (retErr error) {

var tenants []*serverpb.Tenant
if err := func() error {
s := zr.start("discovering tenants on cluster")
s := zr.start("discovering virtual clusters")
conn, _, finish, err := getClientGRPCConn(ctx, serverCfg)
if err != nil {
return s.fail(err)
}
defer finish()

var resp *serverpb.ListTenantsResponse
if err := timeutil.RunWithTimeout(context.Background(), "list tenants", timeout, func(ctx context.Context) error {
if err := timeutil.RunWithTimeout(context.Background(), "list virtual clusters", timeout, func(ctx context.Context) error {
resp, err = serverpb.NewAdminClient(conn).ListTenants(ctx, &serverpb.ListTenantsRequest{})
return err
}); err != nil {
Expand Down Expand Up @@ -267,7 +267,7 @@ func runDebugZip(cmd *cobra.Command, args []string) (retErr error) {
// Only add tenant prefix for non system tenants.
var prefix string
if tenant.TenantId.ToUint64() != roachpb.SystemTenantID.ToUint64() {
prefix = fmt.Sprintf("/tenants/%s", tenant.TenantName)
prefix = fmt.Sprintf("/virtual/%s", tenant.TenantName)
}

zc := debugZipContext{
Expand Down
4 changes: 2 additions & 2 deletions pkg/cli/zip_tenant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestTenantZip(t *testing.T) {
addTenantArgs func(params TestCLIParams) TestCLIParams
}{
{
testName: "testzip tenant separate process",
testName: "testzip external process virtualization",
addTenantArgs: func(params TestCLIParams) TestCLIParams {
tenantDir, tenantDirCleanupFn := testutils.TempDir(t)
defer tenantDirCleanupFn()
Expand All @@ -47,7 +47,7 @@ func TestTenantZip(t *testing.T) {
},
},
{
testName: "testzip shared process tenant",
testName: "testzip shared process virtualization",
addTenantArgs: func(params TestCLIParams) TestCLIParams {
params.SharedProcessTenantArgs = &base.TestSharedProcessTenantArgs{
TenantName: "test-tenant",
Expand Down