Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CC7 logrotate cron job is too noisy (sends mail) #221

Closed
jmuf opened this issue Mar 25, 2015 · 3 comments
Closed

CC7 logrotate cron job is too noisy (sends mail) #221

jmuf opened this issue Mar 25, 2015 · 3 comments

Comments

@jmuf
Copy link
Contributor

jmuf commented Mar 25, 2015

on Centos7, the supplied logrotate entry causes a mail to be sent:

On 03/25/2015 03:25 AM, Anacron wrote:> /etc/cron.daily/logrotate:

spawn/bin/sh -c echo ping > /var/log/xrootd/fed/.cmsd.log
spawn/bin/sh -c echo ping > /var/log/xrootd/fed/.xrootd.log

Comes straight from the RPM:

[root@xrdcmsglobal01 ~]# rpm -qf /etc/logrotate.d/xrootd
xrootd-server-4.1.1-1.el7.x86_64
[root@xrdcmsglobal01 ~]# rpm -Vvf /etc/logrotate.d/xrootd | grep /etc/logrotate.d/xrootd
......... c /etc/logrotate.d/xrootd

(whatever this "ping" does).

@abh3
Copy link
Member

abh3 commented Mar 25, 2015

The ping causes xrootd/cmsd to close and reopen the log file, creating it if necessary. One would normally use a signal (e.g. SIGHUP) and that is all well and fine except for daemons that can be outfitted with custom plugins. We have found that some plugins use signals for other things and using them for log file rotation conflicts with those plugins leading to all sorts of other problems. So, the safest way to do this is via a dedicated pipe. A message appearing on the pipe means close/open the log file.

@ljanyst
Copy link
Contributor

ljanyst commented Mar 30, 2015

I am not sure I can do anything about it. Is there a way you can configure logrotate on your side not to echo the postrotate scriptlets?

@ljanyst
Copy link
Contributor

ljanyst commented Mar 30, 2015

As discussed, I will silence the output from expect.

ljanyst added a commit that referenced this issue Apr 16, 2015
This prevents anacron from sending pointless emails to host admins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants