Mailing List Archive

Packaging varnish for Fedora
I have this quite nice rpm package based on varnish-1.0.3 more or less
ready for Fedora, see
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=230275. Now, the
word on the street is that I should probably make the logging daemon
start with varnishd as a default configuration. And I should probably
add this to the package before the final submit.

Do you have a simple startup configuration that I can just use? Should I
involve varnishncsa to make those nice apache-like logs? Can they work
automatically together, with a named pipe or something like that?

Ingvar

--
Packaging varnish for Fedora [ In reply to ]
Ingvar Hagelund <ingvar@linpro.no> writes:
> Do you have a simple startup configuration that I can just use? Should I
> involve varnishncsa to make those nice apache-like logs? Can they work
> automatically together, with a named pipe or something like that?

No configuration is needed - varnishlog should "just work" as long as
varnishd is running.

I would recommend simply running 'varnishlog -w /var/log/varnish.log'
to store raw log data. It will reopen the file if it receives a HUP,
so it plays nice with logrotate / newsyslog.

There is no need to run any of the other logging tools, as they can
all work on previously stored raw log data. For instance, you can run
'varnishncsa -r /var/log/varnish.log' at any time to produce NCSA logs
which analog can read, etc.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Packaging varnish for Fedora [ In reply to ]
* Dag-Erling Sm?rgrav
> I would recommend simply running 'varnishlog -w /var/log/varnish.log'
> to store raw log data. It will reopen the file if it receives a HUP,
> so it plays nice with logrotate / newsyslog.

Right. Adding '-a' not to overwrite old logs.

It seems that varnishlog does not daemonize itself. Is it a lot of pain
to add some code to make it do this? The RedHat init scripts depend on
daemons daemonizing themselves.

Ingvar

--
Packaging varnish for Fedora [ In reply to ]
Ingvar Hagelund <ingvar@linpro.no> writes:
> * Dag-Erling Sm?rgrav
> > I would recommend simply running 'varnishlog -w /var/log/varnish.log'
> > to store raw log data. It will reopen the file if it receives a HUP,
> > so it plays nice with logrotate / newsyslog.
> Right. Adding '-a' not to overwrite old logs.

Good point, thanks.

> It seems that varnishlog does not daemonize itself. Is it a lot of pain
> to add some code to make it do this? The RedHat init scripts depend on
> daemons daemonizing themselves.

No, it should be easy to do. I also need to add support for a pid
file. Since varnishd already has a -p option, I think I'll use -P for
both varnishd and varnishlog.

Is it OK to daemonize if and only if a pid file was specified, or should
we have a separate option (-D?) for that?

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Packaging varnish for Fedora [ In reply to ]
* Ingvar Hagelund
>> It seems that varnishlog does not daemonize itself. Is it a lot of pain
>> to add some code to make it do this?

* Dag-Erling Sm?rgrav
> No, it should be easy to do (...) Is it OK to daemonize if and only if a
> pid file was specified, or should we have a separate option (-D?)
> for that?

If it's not to much hassle, I would prefer an option for each.
Ingvar

--
N?r alt annet feiler: Symlink
Packaging varnish for Fedora [ In reply to ]
Ingvar Hagelund <ingvar@linpro.no> writes:
> * Dag-Erling Sm?rgrav
> > Is it OK to daemonize if and only if a pid file was specified, or
> > should we have a separate option (-D?) for that?
> If it's not to much hassle, I would prefer an option for each.

OK, will do.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no