Pass <node> to /v1/agent/maintenance endpoint
Similar to /v1/agent/force-leave/<node>, we should be able to pass <node> to /v1/agent/maintenance endpoint as well.
@aj-jester The /v1/agent endpoint prefix is generally used to instruct the local agent to do something, e.g., "broadcast a leave message", or "enter maintenance mode". I think we should probably keep the concerns separate, and maintain the scope of the /v1/agent endpoints to the local agent. Because of the way Consul is architected, we currently don't have a clean way to toggle maint mode on arbitrary agents, but it should be easy enough to dial the node you want to talk to using the DNS discovery interface (e.g., PUT mynode.node.consul:8500/v1/agent/maintenance).
@ryanuber Ah ok! that makes sense :+1: so the force-leave is an outlier :stuck_out_tongue_closed_eyes:
Is there any plan to incorporate something like "control any node from every node" from the API perspective?
Thanks.
@aj-jester yeah exactly, force-leave just directly submits a message into the gossip layer (serf). There is no plan as of now for forwarding non-server requests for things like maintenance mode, sorry!