Summary: | mail-filter/postgrey init script fails startup under sys-apps/openrc-0.8.2-r1 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Giampaolo Tomassoni <giampaolo> |
Component: | [OLD] Server | Assignee: | Andreis Vinogradovs ( slepnoga ) <andreis.vinogradovs> |
Status: | RESOLVED NEEDINFO | ||
Severity: | normal | CC: | hasufell, lists, net-mail+disabled, proxy-maint, qnikst |
Priority: | Normal | Keywords: | STABLE |
Version: | 10.0 | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=500174 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | A patch to the /etc/init.d/postgrey init script to fix this |
I cannot reproduce this with openrc-0.8.2-r1 (even under load) and I'd like to stay backward compatible with baselayout-1 if possible (even though the init script is too hacky for my taste as well). I get issues with the pidfile as well. Will report as soon as I sorted it out. Mentioned patch does not work for me (openrc 0.12.4) is the maintainer still active? check if bug #500174 fixes it for you postgrey 1.35 works for me (In reply to Stefan G. Weichinger from comment #5) > postgrey 1.35 works for me which one? postgrey-1.35 or postgrey-1.35-r1? Did you test postgrey-1.34-r3? (In reply to Julian Ospald (hasufell) from comment #6) > (In reply to Stefan G. Weichinger from comment #5) > > postgrey 1.35 works for me > > which one? > > postgrey-1.35 or postgrey-1.35-r1? Did you test postgrey-1.34-r3? 1.35 1.34.r3 wasn't there back then. (In reply to Stefan G. Weichinger from comment #7) > (In reply to Julian Ospald (hasufell) from comment #6) > > (In reply to Stefan G. Weichinger from comment #5) > > > postgrey 1.35 works for me > > > > which one? > > > > postgrey-1.35 or postgrey-1.35-r1? Did you test postgrey-1.34-r3? > > 1.35 > > 1.34.r3 wasn't there back then. again: Did you test postgrey-1.34-r3? (In reply to Julian Ospald (hasufell) from comment #8) > again: Did you test postgrey-1.34-r3? again: no |
Created attachment 275005 [details, diff] A patch to the /etc/init.d/postgrey init script to fix this Starting postgrey on a system working in a recent openrc model, result in the following error: /etc/init.d/postgrey[6712]: start-stop-daemon: caught an interrupt /etc/init.d/postgrey[6712]: start-stop-daemon: /usr/sbin/postgrey died /etc/init.d/postgrey[6703]: ERROR: postgrey failed to start However, the process is correctly started and running. The reason for this seems related to the fact that the start-stop-daemon function can't find the process' pid file after starting it. This is due to two fact: 1) the init script starts the postgrey daemon invoking 'start-stop-daemon --background', while the daemon is instead able to fork and detach by itself, thereby the start-stop-daemon is waiting for the wrong child; 2) the postgrey daemon is quite slow in creating/updating its pid file, such that start-stop-daemon may occasionally fail even when the --background option is removed from its runstring. Attached to this you'll find a patch to the /etc/init.d/postgrey init script, which relies on the daemon's own capability to fork and detach, and which uses the --wait option to wait for a valid pid file to be created. Please note that the --wait option in start-stop-daemon seems to be introduced by some recent version of the script, so this init script may not work on baselayout-1 systems. Also, the patch works around a (to me) unusual way of fixing the /var/spool/postfix/private/postgrey socket permissions, which was previously made by forking a sh job.