New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to launch one-off tasks #344
Comments
This branch has a POC: https://github.com/mesosphere/marathon/tree/one-off |
+1 |
We've hacked up a super dirty |
+1 |
1 similar comment
👍 |
+1; any progress on this? |
+1 |
1 similar comment
+1 |
+1 |
1 similar comment
+1 |
For now, the only way we found to run one-off tasks is to use the suicide method: |
+1 On Thu, Mar 26, 2015 at 4:15 PM Martin Tapp notifications@github.com
|
+1 |
+1 |
Any progress on this? |
Indeed, is it something the team may look into in the future? |
Hey @Lawouach @doctapp and previous commenters, Feel free to share use cases: migrations, setting up prerequisites, general cron jobs – which features would you need in order to have decent benefit? |
One use case is running an ad hoc job such as running a batch job (e.g. The principal benefit is that we can perform these tasks whenever they are We are using the 'suicide hack' that I posted for these jobs. We are using On Mon, Nov 30, 2015 at 9:19 PM, Matthias Eichstedt <
|
Another use-case, though it's more likely a workaround at this stage, is to run a task to post-configure a task. Unless I have missed something, Marathon doesn't offer me a way to run post-configuration scripts from the host where those tasks are running so I resort to one-shot tasks. I grant you this is more a workaround than a real use-case mind you. |
What do you all think about having a separate service for one-off jobs with some Marathon integration, e.g. for life cycle hooks? Or another way of asking: What would be missing compared to a solution where it all is integrated into Marathon? What does "integration" mean for you? |
The idea of running a Marathon job to handle one-off jobs beats the purpose of a scheduler handling such a task. Plus, we don't need another task taking cluster resources for that purpose; that's the framework's job. We need a flag or some way of telling Marathon not to restart a job if it finishes. |
@doctapp I should have made it more clear: My idea was creating a separate service (= framework) that is able to run any number of one-off tasks. So you would need to talk to a different end-point to achieve this. In Marathon itself we could include hooks for life-cycle events that would end-up creating one-off tasks using the separate service. Would that satisfy your requirements? If not, what exactly is missing. |
The problem with another framework is that we would need to support two Why can't you simply extend Marathon for this purpose? The suicide hack is On Mon, Dec 14, 2015 at 7:47 AM, Peter Kolloch notifications@github.com
|
@doctapp "Why can't you simply extend Marathon for this purpose?" We probably could extend it. I question the "simply". I'd rather focus on making single components of software as simple as possible. In my opinion, the API for one-off-jobs SHOULD be different. For one-off-jobs, it is common to wait for them to complete (which does not make sense for long-running services). There is more... Also the scheduler could be optimized for this different use case. For long-running tasks, you expect to have relatively few task starts/terminations. For one-off-scheduling that is the norm. That said it should also use the same abstractions where possible (e.g. how to specify the command to run, resource constraints, ...). |
Agree and totally understand this. I don't mind having a distinct marathon That's why having one common API and endpoint (being a single Marathon On Mon, Dec 14, 2015 at 9:32 AM, Peter Kolloch notifications@github.com
|
Has there been any recent progress on this? |
Good news everyone - this is now actively in design phase. |
@air This is a much needed feature. Is there any high level estimate when can this be ready in the main branch? |
+1 |
+1 |
+1 much needed feature imho. Use cases - cache warming, pre-start cleanup of some distributed services, database schema migrations and much more. |
+1 |
@doctapp Provided a nice workaround with suicide method for the commands. Is there anyway to achieve this for docker containers? |
All, we have built Metronome on top of the Marathon core to provide this functionality. Please direct any requests to that project. |
Has there been any recent progress on this? |
+1 |
2 similar comments
+1 |
+1 |
By popular request, we're happy to actually work on this. #5009 will provide more details soon. Yes! It's true! It's happening! |
Excellent, finally no more suicide hack! |
Many apps require the ability to launch a one-off task (for example for database migrations). Add an easy way to do this in Marathon.
The text was updated successfully, but these errors were encountered: