[systemd-devel] Monitor path to commit to git
Lennart Poettering
lennart at poettering.net
Fri Apr 8 10:43:36 UTC 2016
On Thu, 07.04.16 20:11, Florian Lindner (mailinglists at xgm.de) wrote:
> It basically works but has two issues:
>
> 1) The path unit does not seem to monitor the path recursively,
> therefore I don't get a commit when a file in a subdirectory changes
inotify doesn't really provide such a feature, and fanotify is
crap. Some people work-around this limitation of Linux by creating
tons of inotify watches recursively down the tree, but as inotify
watches are a limited resource this doesn't really scale, and we hence
won't do it.
Long story short: sounds useful, but we won't support this without
proper kernel support.
>
> 2)Sometimes the commit fails, like when an application pushes files to quickly into the directory:
>
> Failed to start Automatic commit for /etc.
> git-commit at etc.service: Start request repeated too quickly
>
> or when files vanish before they are commited.
>
> This is usally not a problem, and I just want to restart it (after a short delay) Setting Restart=on-failure on a Type=oneshort unit does not work git-commit at etc.service:
>
> Service has Restart= setting other than no, which isn't allowed for Type=oneshot services. Refusing.
>
> Any idea how to address these two issues?
You can reconfigure the start ratelimiting with StartLimitInterval=
and StartLimitBurst=. You can even turn it off by setting this to 0.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list