[ https://issues.apache.org/jira/browse/MESOS-9814?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16875327#comment-16875327 ]
Greg Mann commented on MESOS-9814: ---------------------------------- {code} commit 8a85efb877f50c793954e06b2a6db3f4d3049050 Author: Joseph Wu <jos...@mesosphere.io> Date: Fri Jun 28 12:56:15 2019 -0700 Added master endpoints for agent draining. This adds three master calls: * DRAIN_AGENT * DEACTIVATE_AGENT * REACTIVATE_AGENT DRAIN_AGENT starts automated draining of tasks on the specified agent. When marked for draining, the agent's resources will not be offered and all the agent's tasks will be gracefully killed. DEACTIVATE_AGENT stops offers for a specific agent. This can be used for manual draining of tasks, but is not limited to draining. For example, the operator could deactivate an agent prior to reserving resources. REACTIVATE_AGENT restarts offers for a specific agent, that had been drained or deactivated previously. Review: https://reviews.apache.org/r/70911/ {code} {code} commit 497af42d422a7733b178c3f12b5c34c9328114c0 Author: Joseph Wu jos...@mesosphere.io Date: Fri Jun 28 12:56:11 2019 -0700 Added ACLs for agent draining APIs. This adds three ACLs for the three endpoints added as part of the agent draining feature: * DRAIN_AGENT * DEACTIVATE_AGENT * REACTIVATE_AGENT All three ACLs are coarse-grained; a principal is either allowed to perform the action, or unauthorized. However, there is scope to restrict the action to particular subsets of agents in future. Review: https://reviews.apache.org/r/70910/ {code} {code} commit cbb5694f00717f8d8a1b760622e9fe41b066be83 Author: Greg Mann <g...@mesosphere.io> Date: Fri Jun 28 12:56:08 2019 -0700 Added common protobufs for agent draining. This patch makes protobuf message updates which will be used by both the master and the agent to facilitate automatic draining of agents. Review: https://reviews.apache.org/r/70822/ {code} > Implement DrainAgent master/operator call with associated registry actions > -------------------------------------------------------------------------- > > Key: MESOS-9814 > URL: https://issues.apache.org/jira/browse/MESOS-9814 > Project: Mesos > Issue Type: Task > Components: master > Reporter: Joseph Wu > Assignee: Joseph Wu > Priority: Major > Labels: foundations, mesosphere > > We want to add several calls associated with agent draining: > {code} > message Call { > enum Type { > . . . > DRAIN_AGENT = 37; > DEACTIVATE_AGENT = 38; > REACTIVATE_AGENT = 39; > } > . . . > message DrainAgents { > message DrainConfig { > required AgentID agent = 1; > // The duration after which the agent should complete draining. > // If tasks are still running after this time, they will > // be forcefully terminated. > optional Duration max_grace_period = 2; > // Whether or not this agent will be removed permanently > // from the cluster when draining is complete. > optional bool destructive = 3 [default = false]; > } > repeated DrainConfig drain_config = 1; > } > message DeactivateAgents { > repeated AgentID agents = 1; > } > message ReactivateAgents { > repeated AgentID agents = 1; > } > } > {code} > Each field will be persisted in the registry: > {code} > message Registry { > . . . > message Slave { > . . . > optional DrainInfo drain_info = 2; > } > . . . > message UnreachableSlave { > . . . > optional DrainInfo drain_info = 3; > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)