Bug 723906 - /etc/NOCpulse.ini created but /etc/cron.d/notification assumes it does not exist
Summary: /etc/NOCpulse.ini created but /etc/cron.d/notification assumes it does not exist
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Monitoring
Version: 540
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Martin Minar
URL:
Whiteboard:
Depends On: 723899
Blocks: sat550-lowbug
TreeView+ depends on / blocked
 
Reported: 2011-07-21 14:21 UTC by Miroslav Suchý
Modified: 2016-07-04 00:56 UTC (History)
5 users (show)

Fixed In Version: NPalert-1.126.24-1
Doc Type: Bug Fix
Doc Text:
Clone Of: 723899
Environment:
Last Closed: 2012-09-21 09:33:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miroslav Suchý 2011-07-21 14:21:56 UTC
+++ This bug was initially created as a clone of Bug #723899 +++

Description of problem:

On Spacewalk 1.5 on Fedora 15 with monitoring not enabled, the following email lands in root's mailbox every 15 minutes:

Subject: Cron <nocpulse@hostname>  if [ -e /etc/NOCpulse.ini ] ; then /usr/bin/monitor-queue ALERTS 50 100 2>&1 > /dev/null; fi

eth0: error fetching interface information: Device not found
Use of chdir('') or chdir(undef) as chdir() is deprecated at /usr/bin/monitor-queue line 45.

Note that you might need SELinux in permissive to see that email in root's mailbox.

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

# rpm -qf /etc/NOCpulse.ini /etc/cron.d/notification
nocpulse-common-2.1.24-1.fc15.noarch
NPalert-1.126.23-1.fc15.noarch

How reproducible:

Deterministic.

Steps to Reproduce:
1. Install Spacewalk 1.5 on Fedora 15, set SELinux to permissive.
2. After 16 minutes, check root's mailbox.

Actual results:

Email as shown above.

Expected results:

Nothing is delieved.

Additional info:

Besides that email, you will likely also see AVC denials

type=AVC msg=audit(1311253202.419:314): avc:  denied  { getattr } for  pid=29677 comm="sendmail" path="/var/lib/nocpulse/.forward" dev=dm-1 ino=2755245 scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:spacewalk_monitoring_var_lib_t:s0 tclass=file
type=AVC msg=audit(1311253202.420:315): avc:  denied  { read } for  pid=29677 comm="sendmail" name=".forward" dev=dm-1 ino=2755245 scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:spacewalk_monitoring_var_lib_t:s0 tclass=file
type=AVC msg=audit(1311253202.420:315): avc:  denied  { open } for  pid=29677 comm="sendmail" name=".forward" dev=dm-1 ino=2755245 scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:spacewalk_monitoring_var_lib_t:s0 tclass=file

-- as the email is being delivered to nocpulse@the-spacewalk-server, the .forward is consulted and it fails. This AVC denial should also be fixed, or email never delivered to nocpulse@.

--- Additional comment from msuchy on 2011-07-21 10:20:18 EDT ---

This is regression cause by bug 710002.
So we have one part code (that described in 710002) which need /etc/NOCpulse.ini
and another (that cron.d/notification) which assume that if /etc/NOCpulse.ini exist, that monitoring is configured. :(
Lets run that cron task only if /etc/NOCpulse.ini contains something else then comments - which is only content of not configured monitoring.

Spacewalk.git commit 717028bd6873e18a99ff79a1344ec5cd48a6958f

Comment 4 Clifford Perry 2012-09-21 09:33:07 UTC
This issue is resolved with the release of RHN Satellite 5.5. 

As of September 20th 2012, RHN Satellite 5.5 has been generally available. 

Release Notes and other 5.5 documentation can be found here:

 https://access.redhat.com/knowledge/docs/Red_Hat_Network_Satellite/

The associated Errata for the 5.5 release are:

5.5 Satellite GA Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1296.html

5.5 Upgrade Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1298.html

5.5 RHN Proxy GA Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1297.html

5.5 RHN Tools GA Errata
 - http://rhn.redhat.com/errata/RHEA-2012-1299.html

Regards,
Clifford
- Engineering Manager, Satellite


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