Skip to content

[FEATURE] Disable cluster manager APIs #36

@msfroh

Description

@msfroh

Is your feature request related to a problem?

Currently, a clusterless node still "accepts" cluster manager APIs (e.g. create index), but we either throw an exception or (more often) the call hangs as the node tries forever to route the request to the (nonexistent) cluster manager.

What solution would you like?

We already have an ActionFilter in place to intercept the /_cluster/health API, but we should extend that to cover all cluster manager operations, ideally finding a solution that's better than brute-force enumerating all the APIs. I don't know if there is a solution that works better than enumerating all of the action names that we want to reject, though.

There are some read-only APIs (especially the ones that support the ?local query param) that can work in cloud native by reading the state from the current node only. We should probably continue to support those. Maybe we can automatically apply the ?local parameter. Or we can fail the request with an error saying that the API will only work with the ?local param.

What alternatives have you considered?

We could try mapping cluster manager APIs to logic that writes to etcd. But then we'd need to make sure that different nodes/threads are not writing conflicting changes to etcd. So, maybe we would need to select (or elect) a specific node handle these cluster management operations, which could use a dedicate thread to linearize these updates.

Do you have any additional context?

You can easily reproduce the current problem by spinning up a new clusterless node and try indexing a document (which will try to auto-create an index). Your client will hang waiting for a response from the server that will never come.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions