Hi Zi-Liang,

by default, services in Aurora are not pinned to a particular machine. This is 
based on the philosophy that services should be stateless and thus not 
dependent on a particular host, if possible.

Whenever an instance/task of your service has terminated, the scheduler might 
pick any other random machine to launch a replacement. There are many reasons 
why this could happen:


·         Your instance has crashed, ran out of memory, or simply exited 
normally.

·         If enabled, your health checks may have detected that the instance is 
no longer responding.

·         The agent machine it was running on failed or lost connectivity with 
Mesos.

·         You have used the aurora_admin client to drain a machine.

·         You used a client command such as restart or update.

If necessary, you could use constraints [1] to force Aurora to always schedule 
a service on the same host. However, this is not really recommended as it can 
easily lead to situations where your service cannot be launched at all, due to 
missing resources of he selected host in question.

[1] https://github.com/apache/aurora/blob/master/docs/features/constraints.md

Best regards,
Stephan


From: Ziliang Chen <[email protected]>
Reply-To: "[email protected]" <[email protected]>
Date: Saturday 25 June 2016 at 13:08
To: "[email protected]" <[email protected]>
Subject: Prevent service Job moved from one machine to another periodically

Hi,

I have "service" job scheduled by Aurora. I found periodically, the service job 
will be moved from one machine to another (stop it on previous machine and 
restart it on another one). May i ask if this is an expected behavior and if it 
is, how to make the service job stick to one machine unless there is a failure ?

Thank you very much !

--
Regards, Zi-Liang

Mail:[email protected]<mailto:mail%[email protected]>

Reply via email to