[ 
https://issues.apache.org/jira/browse/MESOS-4541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15123803#comment-15123803
 ] 

Nick van 't Hart commented on MESOS-4541:
-----------------------------------------

yes that work I know, but why not add /etc/mesos-slave/work_dir configuration 
file to the mesos rpm and set this to the same location as the 
/etc/mesos-master/work_dir configuration file "/var/lib/mesos" ?

For production I will advise not to use /tmp and this is now the default value 
for mesos-slave work_dir.

--work_dir=VALUE        Directory path to place framework work directories 
(default: /tmp/mesos)

Also add a note to the documentation: For production use with a redhat bases 
operating system it's not recommended to use /tmp, because cron jobs or systemd 
services will cleanup this directory. This can cause some strange errors and 
crashes.

> Default work_dir slave to /var/lib/mesos instead of /tmp
> --------------------------------------------------------
>
>                 Key: MESOS-4541
>                 URL: https://issues.apache.org/jira/browse/MESOS-4541
>             Project: Mesos
>          Issue Type: Improvement
>            Reporter: Nick van 't Hart
>
> Centos cleanup Daily systemd service 
> /usr/lib/systemd/system/systemd-tmpfiles-clean.service 
> #  This file is part of systemd.
> #
> #  systemd is free software; you can redistribute it and/or modify it
> #  under the terms of the GNU Lesser General Public License as published by
> #  the Free Software Foundation; either version 2.1 of the License, or
> #  (at your option) any later version.
> [Unit]
> Description=Cleanup of Temporary Directories
> Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
> DefaultDependencies=no
> Wants=local-fs.target
> After=systemd-readahead-collect.service systemd-readahead-replay.service 
> local-fs.target
> Before=sysinit.target shutdown.target
> ConditionDirectoryNotEmpty=|/usr/lib/tmpfiles.d
> ConditionDirectoryNotEmpty=|/usr/local/lib/tmpfiles.d
> ConditionDirectoryNotEmpty=|/etc/tmpfiles.d
> ConditionDirectoryNotEmpty=|/run/tmpfiles.d
> [Service]
> Type=oneshot
> ExecStart=/usr/bin/systemd-tmpfiles --clean
> IOSchedulingClass=idle
> http://www.freedesktop.org/software/systemd/man/systemd-tmpfiles.html
> systemd-tmpfiles creates, deletes, and cleans up volatile and temporary files 
> and directories, based on the configuration file format and location 
> specified in tmpfiles.d(5).
> /usr/lib/tmpfiles.d/tmp.conf 
> delete all files older then 10 days /tmp/*
> change default work_dir for mesos from /tmp to /var/lib/mesos/
> Problems:
> - mesos slave crash when deploying from marathon (state of running tasks lost)
> - mesos slave restart recovery will not work, because 
> /tmp/mesos/meta/slaves/latest could not be found 
> For now maybe add some extra documentation for work_dir option, when using in 
> production.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to