consul icon indicating copy to clipboard operation
consul copied to clipboard

Pass <node> to /v1/agent/maintenance endpoint

Open aj-jester opened this issue 11 years ago • 3 comments

Similar to /v1/agent/force-leave/<node>, we should be able to pass <node> to /v1/agent/maintenance endpoint as well.

aj-jester avatar Jul 12 '15 09:07 aj-jester

@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 avatar Jul 13 '15 18:07 ryanuber

@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 avatar Jul 13 '15 19:07 aj-jester

@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!

ryanuber avatar Jul 14 '15 00:07 ryanuber