Bug 158054 - snmpd don't restart on logrotate.
Summary: snmpd don't restart on logrotate.
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: net-snmp   
(Show other bugs)
Version: 4.0
Hardware: i386 Linux
Target Milestone: ---
: ---
Assignee: Radek Vokal
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-05-18 08:44 UTC by Mikkel Kruse Johnsen
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-10-03 07:31:47 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Mikkel Kruse Johnsen 2005-05-18 08:44:44 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4

Description of problem:
The snmpd don't come up after a logrotate.

May 15 04:02:03 mandio snmpd: snmpd startup succeeded
May 15 04:02:03 mandio kernel: audit(1116122523.697:0): avc:  denied  { unlink } for  pid=15117 exe=/usr/sbin/snmpd name=snmpd dev=dm-1 ino=910364 scontext=system_u:system_r:snmpd_t tcontext=system_u:object_r:var_run_t tclass=file
May 15 04:02:03 mandio snmpd[15117]: /var/run/snmpd: File exists

The file "/var/run/snmpd" exists and have to be deleted by hand, before snmpd will start.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Wait for logrotate to rotate the snmpd.log

Actual Results:  The daemon snmpd is not restarted, and the file var/run/snmpd has to be deleted by hand.

Expected Results:  The daemon snmpd should restart after logrotate

Additional info:

Im running RHEL4 SELinux in enforcing mode.

On IBM x345 2 x 3.2 GHz and 2 GB RAM

Comment 2 Radek Vokal 2005-05-19 08:34:55 UTC
Strange, this seems to be clearly working for me.

# getenforce
# service snmpd status
snmpd (pid 22526) is running...
# logrotate -f /etc/logrotate.d/snmpd
# service snmpd status
snmpd (pid 22766) is running...

Can you also provide the logrotate version? 
Also try restoring SELinux context in /var/log with
# restorecon -R /var/log

Comment 3 Radek Vokal 2005-10-03 07:31:47 UTC
No response for more than 5 months, closing as NOTABUG

Note You need to log in before you can comment on or make changes to this bug.