Skip to content

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

@knz

Description

@knz

Found while investigating #110001.

Describe the problem

When TestNodeStatusResponse in server/storage_api is modified to point to a secondary tenant (e.g. via #110008), the test starts failing when accessing the /_status/nodes endpoint:

    nodes_test.go:113: expected privilege error, got status: 501 Not Implemented, content-type: application/json, body: {
          "error": "method Nodes not implemented",
          "code": 12,
          "message": "method Nodes not implemented",
          "details": [
          ]
        }, error: <nil>

How to reproduce

from #110008 reset DefaultTestTenant in TestNodeStatusResponse, run the test with a test tenant and observe the failure.

Expected behavior

Once the tenant is granted a suitable capability, the endpoint should work properly. It should retrieve the node details over the KV tenant connector over the network.

Epic CRDB-38968

Jira issue: CRDB-31228

Metadata

Metadata

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-db-server

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions