I am new to mesos , marathon framework. I formed the cluster with three mesos(0.27.0) masters and two mesos slaves. Marathon (0.15.1) is installed on masters. I scheduled one task from marathon UI of echoing Hello in some file echo "hello" > /tmp/sample.txt
.
I observed that the hello
is written in the file but the process of writing hello
inside the file is going on. Ideally it should be stopped once it has written. I have same trouble when I tried to launch the containers, the containers are getting created till I have no memory. Can anyone suggest me what to do in order to stop echoing and to stop marathon from creating new containers ?
Asked
Active
Viewed 107 times
0

Yogesh Jilhawar
- 5,605
- 8
- 44
- 59
-
I don't quite understand the problem. Is your task not finishing once the command finishes? e.g. blocks forever? or is it rescheduled immediately and you have lots of tasks in state finished? If the latest - it's the desired behavior for Marathon and you actually cannot change this. You could probably take a look at Aurora or Chronos for that. – serejja Feb 22 '16 at 09:02
1 Answers
2
This is the expected behaviour for Marathon, which is meant to be used for long-running tasks, that is things like a Web server, app server, etc.
When Marathon sees the app terminates, it will launch it again (potentially on a different node).
For one-shots, you can use Chronos, Cook or write your own framework.

Michael Hausenblas
- 13,162
- 4
- 52
- 66
-
Thanks Michael. That's fine. But in case of launching containers it is go on consuming hardware. Is there any other way to do by using marathon only. I think there should be as they have provided special support for docker containers. – Yogesh Jilhawar Feb 22 '16 at 10:41
-
No, it's not because this is the wrong tool for it. We (as in Mesosphere, the company behind Marathon) have a chat at http://chat.mesosphere.com/ where you're welcome to discuss your use case and any follow-up questions, if you want. – Michael Hausenblas Feb 22 '16 at 10:50