Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 576558

Summary: www-servers/nginx - Don't just call `nginx -s reopen` in logrotate
Product: Gentoo Linux Reporter: Thomas Deutschmann (RETIRED) <whissi>
Component: [OLD] ServerAssignee: Tiziano Müller (RETIRED) <dev-zero>
Status: RESOLVED FIXED    
Severity: normal CC: bugs, proxy-maint, zx2c4
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

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.