Hello Paul,

Few things to note here:

1. Whenever, you change value of any *resource *or any *attribute*
(Description:
http://mesos.apache.org/documentation/latest/attributes-resources/), you
need to cleanup the work_dir (rm -rf /tmp/mesos) and restart the slave.

2. You muse be already knowing that all mesos tasks/executors started by
mesos-slave keeps running even in case mesos slave process dies. Once, you
cleanup the work_dir, you will no longer be able to recover those
executors/tasks and hence all mesos tasks/executors running on that mesos
slave will get killed. So ideally you *shouldn't* do it routinely. But as
in your case, if it doesn't matter, you can add this work_dir cleanup in
maybe sysinit/systemd/upstart script. (I can't think of the reason why
stopping all services on all mesos nodes is a routine tasks unless your
slaves are very temporary in nature eg. AWS spot instances)

3. If your use case is that you want to change resources dynamically on
each mesos slave, i would suggest you to check mesos dynamic reservation
apis (http://mesos.apache.org/documentation/latest/reservation/)

Hope this answer you questions. Let me know if i can help you more.


On Wed, Mar 30, 2016 at 8:20 PM, Paul Bell <[email protected]> wrote:

> Greg, thanks again - I am planning on moving my work_dir.
>
>
>
> Pradeep, thanks again. In a slightly different scenario, namely,
>
> service mesos-slave stop
> edit /etc/default/mesos-slave   (add a port resource)
> service mesos-slave start
>
>
> I noticed that slave did not start and - again - the log shows the same
> phenomena as in my original post. Per your suggestion, I did a
>
> rm -Rf /tmp/mesos
>
> and the slave service started correctly.
>
> Questions:
>
>
>    1. Did editing /etc/default/mesos-slave cause the failure of the
>    service to start?
>    2. given that starting/stopping the entire cluster (stopping all
>    services on all nodes) is a standard feature in our product, should I
>    routinely to the above "rm" command when the mesos services are stopped?
>
>
> Thanks for your help.
>
> Cordially,
>
> Paul
>
> On Tue, Mar 29, 2016 at 6:16 PM, Greg Mann <[email protected]> wrote:
>
>> Check out this link for info on /tmp cleanup in Ubuntu:
>> http://askubuntu.com/questions/20783/how-is-the-tmp-directory-cleaned-up
>>
>> And check out this link for information on some of the work_dir's
>> contents on a Mesos agent:
>> http://mesos.apache.org/documentation/latest/sandbox/
>>
>> The work_dir contains important application state for the Mesos agent, so
>> it should not be placed in a location that will be automatically
>> garbage-collected by the OS. The choice of /tmp/mesos as a default location
>> is a bit unfortunate, and hopefully we can resolve that JIRA issue soon to
>> change it. Ideally you should be able to leave the work_dir alone and let
>> the Mesos agent manage it for you.
>>
>> In any case, I would recommend that you set the work_dir to something
>> outside of /tmp; /var/lib/mesos is a commonly-used location.
>>
>> Cheers,
>> Greg
>>
>
>


-- 
Regards,
Pradeep Chhetri

Reply via email to