Support mesos maintenance modes
With mesos 0.25.0, new maintenance primitives have been added. Based on the documentation it appears frameworks can be maintenance aware.
Marathon should support mesos maintenance modes.
👍🏽I'm super interested in this. Is there a public roadmap or developer list that I can post to for a status on this feature @aldipower ? My team and I would be interested in assisting with this code, but we don't want to replicate work if someone is already working on it.
+1 Super interested.
+1 can help :)
Bumping this as well +1
Any news on this feature?
+1
+1
+1
Any traction on this? Would be a much appreciated feature
+1
+1
+1
Can you please stop adding "+1" posts? Please use reactions instead.
This is blocked by #2382 for more details see MESOS-2063
Any updates on this?
This is super important, would love to see this implemented
I think we should start with design doc on how we want it to work. There are more than one approach to handle maintenance mode and we need to decide what will works best and how to allow customization. It's we need to discuss on policy about handling reverse offers and respawning tasks on other nodes. It's on maintainers side if they will merge community driven feature into upstream and if they approve this approach. cc: @gkleiman @aquamatthias
Definitely making this feature will be reasonable to do after switch to HTTP API which is not super easy but doable. On the other hand I believe companies that really need maintenance mode have already implement it outside of Marathon. In fact supporting reverse offer is not required to have maintenance mode. It's worth to note this feature firstly appear in Aurora and then was implemented in Mesos. So I recommend you write how you want it to behave or how you implemented it. Compare how it's done in other open source framework and then do it.
That makes sense.
This is important in order to ensure correct draining of tasks when we want to do maintenance on certain mesos-agent nodes. Otherwise, throw requests on the floor when let's say we want to change meta attributes in mesos-slave.
Yesterday, our marathon framework was stuck trying to deploy certain number of applications ~80 tasks, when we took one of our mesos nodes out of the fleet causing our loadbalancer to not be able to update HAproxy configuration because the http_callback never made it.
On a ~2k tasks node I don't know how marathon would behave trying to reconciliate tasks in the cluster
Because nobody is working on switching from libmesos to Mesos HTTP API I propose to handle maintenance without it by periodically checking /maintenance/schedule and taking actions according to data that are there.
I propose to handle it in following manner:
- Change scheduler to ignore offers with Unavailability that occurs in next configurable time interval. For example we probably want to decline offer of a node that will be down in next quarter because we will need to reschedule that task. #4653
- Create an agent that will be responsible of checking maintenance schedule and notifies when node is about to go down (with configurable advance).
- When node is about to go down we will block all offers from that node (done in previous point) and spawn additional task on other node. We can kill task on maintained node but I think it's not necessary because when node will be down we will get
TASK_LOST. - When Marathon starts using Mesos HTTP API we can replace maintenance monitoring agent with Inverse Offers handler and keep logic unchanged.
What do you think about this approach as first try. I can work on this ticket full time starting from Nov/Dec but before I want to discuss possible solution and choose best.
Sounds like a good first approach