[systemd-devel] preparing unit definition for squid – some questions

Lennart Poettering lennart at poettering.net
Thu Jan 6 17:54:08 PST 2011


On Thu, 25.11.10 21:31, Gustavo Sverzut Barbieri (barbieri at profusion.mobi) wrote:

> >  Now the question:  how should requires be defined?  Which is better way?
> > 1) should squid.service explicitly require squid-populate@/var/spool/squid/cache1.service,
> >   …cache2.service etc?  This means that administrator would need to
> >  modify main squid.service when adding more cache_dirs
> >
> > or
> >
> > 2) should each instance define itself as required by squid.service?  If so,
> >   how to do it?
> >   This behaviour makes adding directories simpler.
> >
> >  Nb. I consider using unit generator parsing squid.conf an overkill for
> > this task :)
> 
> IMHO this is totally wrong, we're trying to solve the problem
> elsewhere. Squid itself should check and generate the missing
> directories as it will already have to load the configuration file and
> (probably) the cache directory structure. This is even more true that
> it shouldn't assume all directories exist if at least one is there
> (ie: it is not empty, but not all required are there).
> 
> There is also no parallelization gains to have it as another unit, as
> squid can't work until folders are there.

I mostly agree with Gustavo. i think this is a problem that should be
dealt with in squid, not in systemd.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list