Bug 1249725

Summary: error running non-shared postrotate script for /var/log/radius/radius.log of '/var/log/radius/radius.log '
Product: Red Hat Enterprise Linux 6 Reporter: Robert Scheck <redhat-bugzilla>
Component: freeradiusAssignee: Nikolai Kondrashov <nikolai.kondrashov>
Status: CLOSED WONTFIX QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.7CC: cybermacwy, dpal, ebenes, glamb, mkosek, pkis, robert.scheck, santony
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1365226 (view as bug list) Environment:
Last Closed: 2016-08-08 16:40:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1269194, 1365226    
Attachments:
Description Flags
Patch to avoid the failure none

Description Robert Scheck 2015-08-03 16:05:31 UTC
Description of problem:
Since the upgrade to RHEL 6.7 we receive e-mails like this:

--- snipp ---
Date: Sat,  1 Aug 2015 03:06:34 +0200 (CEST)
From: Anacron <root.net>
To: root.net
Subject: Anacron job 'cron.daily' on gateway2.example.net

/etc/cron.daily/logrotate:

error: error running non-shared postrotate script for /var/log/radius/radius.log of '/var/log/radius/radius.log '
--- snapp ---

From my point of view this error is triggered due to a insane postrotate
script in logrotate which gets visible since the logrotate update (which
is no longer hiding any logrotate output).

Above error is triggered if radius is not running while the postrotate
script of logrotate tries to reload the daemon (leads to exit 7).

Version-Release number of selected component (if applicable):
freeradius-2.2.6-4.el6.x86_64
logrotate-3.7.8-23.el6.x86_64

How reproducible:
Everytime, see above and below.

Actual results:
error running non-shared postrotate script for /var/log/radius/radius.log of '/var/log/radius/radius.log '

Expected results:
No error message by logrotate via e-mail.

Comment 1 Robert Scheck 2015-08-03 16:13:36 UTC
Created attachment 1058796 [details]
Patch to avoid the failure

Even this patch is not really great it uses the same common style and way that 
"grep -C 2 postrotate /etc/logrotate.d/*" shows (Apache, BIND, rsyslogd, ...).

Comment 3 Robert Scheck 2015-08-03 16:53:59 UTC
Cross-filed case 01486583 on the Red Hat customer portal.

Comment 4 Robert Scheck 2015-08-04 12:19:28 UTC
Please note that this issue usually happens if freeradius is started or
stopped by a pacemaker setup where the configuration and the logs do not
reside on a shared filesystem. So if freeradius was running and gets then
stopped (e.g. due to a takeover), the log file is indeed not empty, the
issue above happens.

Comment 8 Nikolai Kondrashov 2016-08-08 16:40:24 UTC
We're going to address this issue in RHEL7 eventually.

Comment 9 David Klein 2017-08-11 13:07:18 UTC
Nikolai, did this get addressed ? If it has, I'm just curious what the fix was.. I'm having troubles finding any further information.

Comment 10 Nikolai Kondrashov 2017-08-11 13:35:39 UTC
Hi David. Unfortunately, this is only fixed in RHEL7, but systemd in RHEL7 has a bug, which prevents the fix from working. See Bug 1365226 and Bug 1191920. Sorry for the mess.

Comment 11 David Klein 2017-08-12 04:10:58 UTC
Not a problem, thanks for the links.. those and the patch above at least give me ideas for a work around!