Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 576558 - www-servers/nginx - Don't just call `nginx -s reopen` in logrotate
Summary: www-servers/nginx - Don't just call `nginx -s reopen` in logrotate
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Tiziano Müller (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-06 02:33 UTC by Thomas Deutschmann (RETIRED)
Modified: 2016-04-10 00:40 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2016-03-06 02:33:40 UTC
Hi,

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e8c33b631035683ce988e0988a06661524164f5 changed our logrotate script for nginx. I have two problems with that:

1) It should be "/usr/sbin/nginx" and not just "nginx"

2) While nginx will check for pidfile on its own

> # /usr/sbin/nginx -s reopen
> nginx: [error] open() "/run/nginx.pid" failed (2: No such file or directory)

this will cause problems for systems who have nginx installed but not running on each logrotate run.

Please change at least back to

> test -r /run/nginx.pid && /usr/sbin/nginx -s reopen

Personally I would stick with the previous logrotate script because people who are running multiple nginx instances now have to alter the command twice (they need to change pidfile and add "-c /etc/nginx-imap/nginx.conf"; previously they only had to replace pidfile).
Comment 1 Manuel Rüger (RETIRED) gentoo-dev 2016-04-10 00:40:24 UTC
Reverted in:

commit 1485d02fee0d8d7c5c22f3bedab637af75a9434e
Author: Manuel Rüger <mrueg@gentoo.org>
Date:   Sun Apr 10 02:39:18 2016 +0200

    Revert "www-servers/nginx: use the nginx utility command for log reopening"
    
    Gentoo Bug: #576558
    
    This reverts commit 3e8c33b631035683ce988e0988a06661524164f5.