Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 158054

Summary: snmpd don't restart on logrotate.
Product: Red Hat Enterprise Linux 4 Reporter: Mikkel Kruse Johnsen <mkj.lib>
Component: net-snmpAssignee: Radek Vokal <rvokal>
Status: CLOSED NOTABUG QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 4.0CC: shillman
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-10-03 07:31:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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):
net-snmp-5.1.2-11

How reproducible:
Always

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
Enforcing
# 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