Bug 723899 - /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: Spacewalk
Classification: Community
Component: Server
Version: 1.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space16 723906
TreeView+ depends on / blocked
 
Reported: 2011-07-21 13:45 UTC by Jan Pazdziora (Red Hat)
Modified: 2011-12-22 16:48 UTC (History)
1 user (show)

Fixed In Version: NPalert-1.126.24-1
Clone Of:
: 723906 (view as bug list)
Environment:
Last Closed: 2011-12-22 16:48:23 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora (Red Hat) 2011-07-21 13:45:35 UTC
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@.

Comment 1 Miroslav Suchý 2011-07-21 14:20:18 UTC
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 2 Milan Zázrivec 2011-12-22 16:48:23 UTC
Spacewalk 1.6 has been released.


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