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:
TASK_LOST.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
Seems reasonable to me. We are working on mesos http support but it's a fair ways out.
Any update on this?
Today I returned from vacation and will be working on this. I'll follow above plan. I'm starting with #4653. BTW there is WIP branch to add mesos-http-adapter so maybe HTTP API will be working ealier than I expected.
:+1:
has anyone found another work around while this is being developed?
What we do in paasta is basically:
This isn't great; it only happens as fast as we can poll (which keeps getting slower as we add more services), and we don't always manage to reserve all the resources as fast as they become available, so Marathon will occasionally start new tasks on the box we're trying to drain.
I found this gist some time ago, if i remember correctly it is redeploying tasks with an UNLIKE-constraint for the host you want to put in maintenance.
I would not use it as is, but it could be used as a base...
https://gist.github.com/pradeepchhetri/2eafdc75d89236018cbf9e6e57bc1885
One problem with the UNLIKE approach is that it requires a full restart of your application.
@evanKrall how does your bounce process know which boxes are scheduled for maintenance, does it just look for where space are all booked up by the reservation Mesos api? Why use the reservation Mesos api rather than the maintenance primitives to mark a node for maintenance?
We query /master/maintenance/status: https://mesos.apache.org/documentation/latest/endpoints/master/maintenance/status/
Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-3216. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.
Most helpful comment
Can you please stop adding "+1" posts? Please use reactions instead.