Nick van 't Hart created MESOS-4541:
---------------------------------------

             Summary: 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
- 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