Bug 883427

Summary: [RFE] logwatch support for mdadm devices
Product: Red Hat Enterprise Linux 6 Reporter: jcpunk
Component: logwatchAssignee: Jan Synacek <jsynacek>
Status: CLOSED WONTFIX QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.3Keywords: FutureFeature, Patch
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-12 13:47:28 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to add support for mdadm
none
pure perl scrape of /proc/mdstat
none
Less error prone pure perl scrape of /proc/mdstat none

Description jcpunk 2012-12-04 15:12:38 UTC
Description of problem: It would be nice if logwatch could report on mdadm devices in addition to its other functionality


Version-Release number of selected component (if applicable):7.3.6-49.el6


How reproducible: always


Steps to Reproduce:
1. have mdadm devices
2. wish to know their status
3. have to ssh in to look
  
Actual results: no reporting


Expected results: some reporting


Additional info:

http://old.nabble.com/Fwd:-support-for-mdadm-on-linux-td16407756.html

Comment 1 jcpunk 2012-12-04 15:13:12 UTC
Created attachment 657581 [details]
patch to add support for mdadm

This patch adds support for mdadm

Comment 3 Jan Synacek 2012-12-05 10:44:03 UTC
The patch is 4 years old and seems that it has never been accepted upstream. It looks pretty ok-ish to me (not the shell calls though).

Comment 4 jcpunk 2012-12-06 16:52:43 UTC
A few years back the mdadm folks said to only use mdadm to query the status.  Their current docs don't say that, so I'll whip something up in pure perl....

Will take a bit though.

Comment 5 jcpunk 2012-12-07 14:51:53 UTC
Created attachment 659419 [details]
pure perl scrape of /proc/mdstat

This patch makes no system calls.

For this to work under selinux, logwatch will need read access to system_u:object_r:proc_mdstat_t in order to read /proc/mdstat

Comment 6 jcpunk 2012-12-10 14:18:24 UTC
That patch didn't run right on one of my hosts over the weekend.

I'll have a fixed one once I get it sorted.

Comment 7 jcpunk 2012-12-12 20:59:00 UTC
Created attachment 662605 [details]
Less error prone pure perl scrape of /proc/mdstat

This version runs fine on my systems.  Selinux still needs to grant getattr and read access to /proc/mdstat but this patch wont error out if the access is denied.

Comment 8 Jan Synacek 2013-01-09 07:31:45 UTC
FYI mdadm script has been recently added to the mainstream repository:
http://logwatch.svn.sourceforge.net/logwatch/?rev=122&view=rev

Comment 9 RHEL Program Management 2013-10-14 00:12:14 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.