Bug 1546558 - lighttpd should depend on psmisc for logrotate
Summary: lighttpd should depend on psmisc for logrotate
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: lighttpd
Version: epel7
Hardware: Unspecified
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Gwyn Ciesla
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-18 16:56 UTC by Anssi Johansson
Modified: 2018-03-27 19:04 UTC (History)
3 users (show)

Fixed In Version: lighttpd-1.4.49-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-03-27 19:04:17 UTC


Attachments (Terms of Use)

Description Anssi Johansson 2018-02-18 16:56:30 UTC
Description of problem:
/etc/logrotate.d/lighttpd contains this:

    postrotate
        /usr/bin/killall -HUP lighttpd &>/dev/null || :
    endscript

However, in this particular instance killall (provided by the psmisc package) was not installed. Consequently, postrotate script did not work as intended, leaving lighttpd to write to the old log file.

Proposed fix:
lighttpd should have a Requires of psmisc

Version-Release number of selected component (if applicable):
lighttpd-1.4.48-1.el7.x86_64

How reproducible:
Always

Steps to Reproduce:
1. install lighttpd
2. make sure psmisc is not installed
3. wait until logrotate does its thing (typically on Sunday morning)

Actual results:
-rw-r--r-- 1 lighttpd lighttpd  320914 Feb 18 16:48 access.log-20180218
-rw-r--r-- 1 lighttpd lighttpd       0 Feb 18 07:29 access.log

Expected results:
-rw-r--r-- 1 lighttpd lighttpd  302571 Feb 18 07:29 access.log-20180218
-rw-r--r-- 1 lighttpd lighttpd   18343 Feb 18 16:48 access.log

Additional info:
Installing psmisc and running "killall -HUP lighttpd" convinced lighttpd to start writing to the new log file.

Comment 1 Anssi Johansson 2018-02-18 18:42:25 UTC
An alternative approach would be to add "ExecReload=/bin/kill -HUP $MAINPID" to /usr/lib/systemd/system/lighttpd.service. This would allow changing the lighttpd logrotate config to invoke "systemctl reload lighttpd.service" instead of killall.

Disclaimer: https://www.freedesktop.org/software/systemd/man/systemd.service.html says "Note however that reloading a daemon by sending a signal (as with the example line above) is usually not a good choice, because this is an asynchronous operation and hence not suitable to order reloads of multiple services against each other. It is strongly recommended to set ExecReload= to a command that not only triggers a configuration reload of the daemon, but also synchronously waits for it to complete."

Comment 2 Fedora Update System 2018-02-27 20:50:25 UTC
lighttpd-1.4.48-2.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-c5863bfbf2

Comment 3 Fedora Update System 2018-03-12 13:59:53 UTC
lighttpd-1.4.49-1.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-2a3d51dc83

Comment 4 Fedora Update System 2018-03-12 20:26:52 UTC
lighttpd-1.4.49-1.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2018-2a3d51dc83

Comment 5 Fedora Update System 2018-03-27 19:04:17 UTC
lighttpd-1.4.49-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.