Skip to content

server: support nodes API endpoint for secondary shared tenants#131644

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
cthumuluru-crdb:t-110023
Nov 1, 2024
Merged

server: support nodes API endpoint for secondary shared tenants#131644
craig[bot] merged 1 commit intocockroachdb:masterfrom
cthumuluru-crdb:t-110023

Conversation

@cthumuluru-crdb
Copy link
Copy Markdown
Contributor

@cthumuluru-crdb cthumuluru-crdb commented Oct 1, 2024

The "nodes" status API endpoint should work with "shared" secondary tenants. Since nodes are common to all the tenants, this API endpoint behaves similar to that of system tenant. Shared service tenants implicitly have all capabilities.

Tenant connector implements TenantStatusServer interface. Status server in secondary tenants make use of tenant connector to fetch nodes information.

Support for external tenants is tracked in a separate ticket.

Fixes: #110023
Epic: CRDB-38968
Release note (multi-tenancy): The "nodes" endpoint should work for "shared" secondary tenants. Since nodes are common to all the tenants, this API endpoint behaves similar to that of system tenant.

@cthumuluru-crdb cthumuluru-crdb requested a review from a team as a code owner October 1, 2024 04:29
@cthumuluru-crdb cthumuluru-crdb requested review from a team October 1, 2024 04:29
@cthumuluru-crdb cthumuluru-crdb requested review from a team as code owners October 1, 2024 04:29
@cthumuluru-crdb cthumuluru-crdb requested review from angles-n-daemons and rharding6373 and removed request for a team October 1, 2024 04:29
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@cthumuluru-crdb cthumuluru-crdb requested review from a team as code owners October 1, 2024 15:35
@cthumuluru-crdb cthumuluru-crdb requested review from aa-joshi, arjunmahishi, kev-cao, renatolabs and vidit-bhat and removed request for a team October 1, 2024 15:36
@cthumuluru-crdb cthumuluru-crdb requested review from stevendanna and removed request for a team and renatolabs October 1, 2024 15:50
@cthumuluru-crdb cthumuluru-crdb changed the title kv,rpc,server: support "nodes" API endpoint for secondary tenants server: support nodes API endpoint for secondary shared tenants Oct 1, 2024
@cthumuluru-crdb cthumuluru-crdb requested review from a team and angles-n-daemons and removed request for a team October 1, 2024 15:58
The "nodes" status API endpoint should work with "shared" secondary tenants. Since nodes are common to all the tenants, this API endpoint behaves similar to that of system tenant. Shared service tenants implicitly have all capabilities.

Tenant connector implements TenantStatusServer interface. Status server in secondary tenants make use of tenant connector to fetch nodes information.

Support for external tenants is tracked in a separate ticket.

Fixes: cockroachdb#110023
Epic: CRDB-38968
Release note (multi-tenancy): The "nodes" endpoint should work for "shared" secondary tenants. Since nodes are common to all the tenants, this API endpoint behaves similar to that of system tenant.
[cluster] requesting nodes... received response...
[cluster] requesting nodes: last request failed: rpc error: ...
[cluster] requesting nodes: creating error output: debug/nodes.json.err.txt... done
[cluster] requesting nodes... received response... writing JSON output: debug/nodes.json... done
Copy link
Copy Markdown
Contributor Author

@cthumuluru-crdb cthumuluru-crdb Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevendanna - sorry for the noise on this PR. After pushing the changes I noticed a couple of test failures in the CI run. They are related to data driven tests. I fixed the expected debug zip output to match the code fixes.

More importantly, I was curious why testzip_external_process_virtualization test was not failing with capability missing error. After looking at both the test for differences, data driven tests in zip_tenant_test.go are running in insecure mode due to #77173 and that's the reason they were passing without any issues.

t.Run(tenant.testName, func(t *testing.T) {
hostDir, hostDirCleanupFn := testutils.TempDir(t)
defer hostDirCleanupFn()
c := NewCLITest(tenant.addTenantArgs(TestCLIParams{
StoreSpecs: []base.StoreSpec{{
Path: hostDir,
}},
// TODO(abarganier): Switch to secure mode once underlying infra has been
// updated to support it. See: https://github.com/cockroachdb/cockroach/issues/77173
Insecure: true,
}))

I'll add this issue to CRDB-38970 if it is not already being tracked. This PR is ready to be committed now. Can you please take a look and bless it one more time?

@cthumuluru-crdb
Copy link
Copy Markdown
Contributor Author

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Nov 1, 2024

@craig craig bot merged commit 482ba56 into cockroachdb:master Nov 1, 2024
@cthumuluru-crdb cthumuluru-crdb deleted the t-110023 branch February 20, 2025 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

server: the "nodes" status API endpoint should work with secondary tenants with capability can_view_node_info

4 participants