Mailing List Archive

#1850: logrotate stops varnishncsa/varnishlog permanently under systemd.
#1850: logrotate stops varnishncsa/varnishlog permanently under systemd.
-------------------------+-------------------
Reporter: lkarsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishncsa | Version: 4.1.1
Severity: normal | Keywords:
-------------------------+-------------------
In 4.1.1, varnishncsa and varnishncsa running from systemd will exit when
receiving SIGHUP from (for example) logrotate.

The official packaging for 4.1.1 runs varnishncsa and varnishlog in this
mode.

Expected: varnishncsa and varnishlog daemons not to stop unintentionally
every night.

In #1794 there is a discussion about SIGHUP handling, and that the tools
exit successfully in SIGHUP if they are running in foreground mode. This
means that -D must be used for daemons.

Possible workarounds:
* Moving back to -D, which means we need a varnish:varnishlog owned
directory in /run to write to.
* Extending the daemons with chuid/chgid support. Write pidfile before
dropping privs.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1850>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1850: logrotate stops varnishncsa/varnishlog permanently under systemd. [ In reply to ]
#1850: logrotate stops varnishncsa/varnishlog permanently under systemd.
-------------------------+--------------------
Reporter: lkarsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishncsa | Version: 4.1.1
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------

Comment (by lkarsten):

So far it looks like RuntimeDirectory is the best bet. (man systemd.exec)
See https://github.com/varnishcache/pkg-varnish-
cache/commit/95082859075ac97cb0fed8aa099cc998c5b80aa2 for implemented
workaround.

While going through the logrotate setup to make sure this works, I found
that ownership of /var/log/varnish would be wrong in the default
installation of 4.1 on EL7. This may also have been the case on EL6. Fix
in https://github.com/varnishcache/pkg-varnish-
cache/commit/07585b3a71140bb6ed5f0500d9545d09f2182021 .

Installation from scratch, varnishncsa start and a logrotate run verified
on EL6 and EL7. Planned for repo.v-c.o in 4.1.1-2.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1850#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1850: logrotate stops varnishncsa/varnishlog permanently under systemd. [ In reply to ]
#1850: logrotate stops varnishncsa/varnishlog permanently under systemd.
-------------------------+--------------------
Reporter: lkarsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishncsa | Version: 4.1.1
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------

Comment (by fgsch):

This does break log rotation if the logrotate configuration is not
updated.

Shouldn't we go for a more conservative approach in this case an aim to
fix this properly later?

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1850#comment:2>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1850: logrotate stops varnishncsa/varnishlog permanently under systemd. [ In reply to ]
#1850: logrotate stops varnishncsa/varnishlog permanently under systemd.
-------------------------+--------------------
Reporter: lkarsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishncsa | Version: 4.1.1
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------

Comment (by lkarsten):

I don't see that there is any conservative approach. Can you expand a bit
on what you mean?

logrotate configuration was updated (on el6/el7). See 5d4517d in pkg-
varnish-cache.
Main issue here is that logrotate.d/varnish is %config(noreplace), so any
installation with local modifications won't get the update. However, in
that case I expect the sysadmin to have cleaned up our mess and got it
working already.

Anyway. 4.1.1-2 went out to the repository yesterday, both for enterprise
linux and debian/ubuntu.

Leaving this open for comments a few more days.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1850#comment:3>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1850: logrotate stops varnishncsa/varnishlog permanently under systemd. [ In reply to ]
#1850: logrotate stops varnishncsa/varnishlog permanently under systemd.
-------------------------+--------------------
Reporter: lkarsten | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: varnishncsa | Version: 4.1.1
Severity: normal | Resolution:
Keywords: |
-------------------------+--------------------

Comment (by fgsch):

That's the issue I'm talking about wrt logrotate configuration
(noreplace).

The more conservative approach is using tmpfiles. No manual intervention
is required besides updating.

I've also left several comments on one commit at the pkg-varnish-cache
repository.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1850#comment:4>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1850: logrotate stops varnishncsa/varnishlog permanently under systemd. [ In reply to ]
#1850: logrotate stops varnishncsa/varnishlog permanently under systemd.
-------------------------+---------------------
Reporter: lkarsten | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishncsa | Version: 4.1.1
Severity: normal | Resolution: fixed
Keywords: |
-------------------------+---------------------
Changes (by lkarsten):

* status: new => closed
* resolution: => fixed


--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1850#comment:5>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs