Bug 512833

Summary: No longer able to remove logwatch from system
Product: Red Hat Enterprise Linux 5 Reporter: Stephen John Smoogen <smooge>
Component: dmraidAssignee: Heinz Mauelshagen <heinzm>
Status: CLOSED ERRATA QA Contact: Cluster QE <mspqa-list>
Severity: medium Docs Contact:
Priority: high    
Version: 5.4CC: agk, brian.j.wood, cmarthal, coughlan, cward, dgregor, dmach, dwysocha, heinzm, mbroz, mmcgrath, msnitzer, prockai, rlerch, syeghiay, tao
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
With this update, the dmraid logwatch-based email reporting feature has been moved from the dmraid-events package into the new dmraid-events-logwatch package. Consequently, systems that use this dmraid feature will need to complete the following manual procedure: 1. ensure the new 'dmraid-events-logwatch' package is installed. 2. un-comment the functional portion of the "/etc/cron.d/dmeventd-logwatch" crontab file. (BZ#512833)
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-02 11:16:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 468301, 516892    
Attachments:
Description Flags
proposed dmraid.spec changes
none
[v2] proposed dmraid.spec changes none

Description Stephen John Smoogen 2009-07-20 21:27:45 UTC
Description of problem:

With the fix to  https://bugzilla.redhat.com/show_bug.cgi?id=437169
logwatch is now included as being required on every system. Many sites remove this if they have other mechanisms to logwatch data. With the bug closed to outside viewing its not possible to see why it was added.

Dependencies Resolved

==============================================================================================================================================================
 Package                                Arch                            Version                                      Repository                          Size
==============================================================================================================================================================
Removing:
 logwatch                               noarch                          7.3-6.el5                                    installed                          987 k
Removing for dependencies:
 dmraid                                 x86_64                          1.0.0.rc13-51.el5                            installed                          1.6 M
 dmraid-events                          x86_64                          1.0.0.rc13-51.el5                            installed                           13 k
 kernel                                 x86_64                          2.6.18-155.el5                               installed                           87 M
 kmod-kvm                               x86_64                          83-80.el5                                    installed                          4.3 M
 kvm                                    x86_64                          83-80.el5                                    installed                          2.3 M
 mkinitrd                               x86_64                          5.1.19.6-54                                  installed                          876 k

Transaction Summary
==============================================================================================================================================================
Install      0 Package(s)         
Update       0 Package(s)         
Remove       7 Package(s)

Comment 1 Alasdair Kergon 2009-07-20 21:40:20 UTC
Unfortunately there's too much private discussion on the bug referred to for it to be opened up.

I agree that the logwatch dependency needs further discussion, which can take place on this bugzilla.

Thanks for alerting us to it.

Comment 2 Mike Snitzer 2009-07-21 19:19:42 UTC
dmraid requires the dmraid-events package for auto-rebuilding of arrays, disk LED controlling (by SGPIO application) and email alerting for active RAID arrays.

dmraid-events currently requires logwatch to monitor the messages file for dmeventd events that generate alerts to the user.

I understand that ideally there wouldn't be a dependency on logwatch to get the ability to autorebuild a failed array.

Should we split the logwatch-specific alerting component (the logwatch script, config and related cron) out into a 'dmraid-events-logwatch' package?

Comment 3 Mike Snitzer 2009-07-21 20:51:29 UTC
Brian (@Intel),

Could you provide your thoughts on splitting out the logwatch components into a 'dmraid-events-logwatch' subpackage that depends on dmraid-events?

Given the following dmraid.spec's description I'm left uncertain if dmraid's array auto-rebuild feature is independent of the logwatch-based device monitoring and email reporting.

%description -n dmraid-events
Provides a dmeventd DSO and the dmevent_tool to register devices with it
for device failure monitoring and logwatch based email reporting.
Device failure monitoring and reporting has to be activated manually
by activating /etc/cron.d/dmeventd entry and by calling the dmevent_tool
(see manual page for examples) for any active RAID sets.

Even though the above description emphasizes the cron/logwatch-based pieces I still think the DSO allows for auto-registration of arrays and auto-rebuilds, etc _without_ logwatch.  But please help clarify.

Comment 4 Mike Snitzer 2009-07-21 20:53:00 UTC
Brain, please see comment#3.

Comment 5 Stephen John Smoogen 2009-07-21 21:54:34 UTC
I am confused... logwatch runs once a day.. or are you using a sub-library from logwatch to do this on a more regular extent? It would seem to me that swatch or a similar tool would be more useful.

Comment 6 Mike Snitzer 2009-07-21 22:06:51 UTC
dmraid-event currently uses cron to run logwatch every minute (if manually enabled), see /etc/cron.d/dmeventd

Comment 7 Tom Coughlan 2009-07-28 14:10:44 UTC
We have run out of time to make changes like this in 5.4. I am moving this BZ for consideration in 5.5. We will add a release note in 5.4 to warn about this change in behavior.

Comment 9 Mike Snitzer 2009-07-31 18:30:05 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
The dmraid package requires the dmraid-events package for auto-rebuilding of arrays, disk LED controlling (by SGPIO application) and email alerting for active RAID arrays.

The dmraid-events package currently requires the logwatch package to monitor the messages file for dmeventd events that are then used to generate alerts to the user.

A future dmraid release will split the logwatch dependent features out from the dmraid-events package into an optional dmraid subpackage.

Comment 11 Tom Coughlan 2009-07-31 21:23:25 UTC
Release note updated. If any revisions are required, please set the 
"requires_release_notes"  flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -2,4 +2,4 @@
 
 The dmraid-events package currently requires the logwatch package to monitor the messages file for dmeventd events that are then used to generate alerts to the user.
 
-A future dmraid release will split the logwatch dependent features out from the dmraid-events package into an optional dmraid subpackage.+As a result, it is no longer possible to remove the logwatch package when the dmraid packages are loaded. An alternate packaging structure that will restore this ability may be considered in the future.

Comment 12 Mike Snitzer 2009-08-03 17:06:31 UTC
I confirmed with Heinz that the logwatch-dependent portion of the dmraid-events package is only used for the alerting capability.  As such it can easily be split out into a new 'dmraid-events-logwatch' sub-sub-packge.

Comment 13 Mike Snitzer 2009-08-07 17:47:46 UTC
Created attachment 356691 [details]
proposed dmraid.spec changes

proposed dmraid.spec changes that split logwatch and MTA deps out to a new 'dmraid-events-logwatch' sub-sub-package

Comment 14 Alasdair Kergon 2009-08-10 12:46:12 UTC
I think the mailer dependency should be mentioned in the package description.

Comment 17 Mike Snitzer 2009-08-10 18:12:47 UTC
Created attachment 356936 [details]
[v2] proposed dmraid.spec changes

Comment 18 Daniel Mach 2009-08-11 11:44:51 UTC
Can you also fix /etc/cron.d/dmeventd?

Current file:
* * * * * /usr/sbin/logwatch --service dmeventd --range today --detail med

It is missing a user, it should look like this:
* * * * * root /usr/sbin/logwatch --service dmeventd --range today --detail med

Comment 20 Mike Snitzer 2009-08-11 15:30:56 UTC
In response to comment #18:

OK, clearly the dmraid-events-logwatch crontab template needs to be fixed; the
user needs to manually uncomment the /etc/cron.d/dmeventd-logwatch entry anyway
so it's not like this is a problem that will cause any cron errors by default.

That being said, this crontab issue is independent of this bug so a new bug
should be opened.  And for 5.4 a release note should be added.

Comment 21 Dennis Gregorovic 2009-08-11 16:39:07 UTC
(In reply to comment #17)
> Created an attachment (id=356936) [details]
> [v2] proposed dmraid.spec changes  

This patch also renames /etc/cron.d/dmeventd to /etc/cron.d/dmeventd-logwatch.  While I see the logic there, could this cause upgrade issues, especially given that it's a %config(noreplace) file?  I would propose leaving the name as it was.

Comment 22 Alasdair Kergon 2009-08-11 17:04:51 UTC
It's a new file in this release - diff against the 5.3 spec file to check.

Comment 23 Mike Snitzer 2009-08-11 17:39:47 UTC
(In reply to comment #21)
> (In reply to comment #17)
> > Created an attachment (id=356936) [details] [details]
> > [v2] proposed dmraid.spec changes  
> 
> This patch also renames /etc/cron.d/dmeventd to /etc/cron.d/dmeventd-logwatch. 
> While I see the logic there, could this cause upgrade issues, especially given
> that it's a %config(noreplace) file?  I would propose leaving the name as it
> was.  

This is what the user will see when the dmraid-events package gets upgraded:

warning: /etc/cron.d/dmeventd saved as /etc/cron.d/dmeventd.rpmsave

This would happen regardless of the name change and is moot.  The
logwatch scripts and controlling crontab have been split out to their own
package.  Meaning only dmraid and dmraid-events will be automatically upgraded
by our users.  As part of that 5.3 -> 5.4 upgrade: previous users (if any) of dmraid's logwatch-based email reporting are left dangling.

We knew that this dmraid package split would require the user to know to
install the 'dmraid-events-logwatch' package to get logwatch-based email
reporting for dmraid back.

So there already needs to be a revised release note that tells users that this
manual installation of 'dmraid-events-logwatch' needs to happen.  That same
release note can also caution about:
1) this crontab file name change.
2) the fact that the crontab is missing the user field (see comment #18)

Comment 26 Chris Ward 2009-08-12 12:20:30 UTC
Partners, 

a test build for dmraid has been created which contains a fix for this issue. Please test and provide feedback by Thursday, Aug 13th. 

http://people.redhat.com/~cward/5.4.0/dmraid/

Comment 27 Chris Ward 2009-08-12 12:25:57 UTC
Additionally, the latest nightly build iso's (20090812) should contain this fix.

Comment 31 Mike Snitzer 2009-08-12 15:55:26 UTC
Release note updated. If any revisions are required, please set the 
"requires_release_notes"  flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1,5 +1,4 @@
-The dmraid package requires the dmraid-events package for auto-rebuilding of arrays, disk LED controlling (by SGPIO application) and email alerting for active RAID arrays.
+The dmraid-events package no longer provides the logwatch-based email reporting functionality.  The dmraid logwatch-based email reporting has been split out to a new 'dmraid-events-logwatch' package.  This package split will require existing user's of dmraid's logwatch-based email reporting to make two manual changes:
 
-The dmraid-events package currently requires the logwatch package to monitor the messages file for dmeventd events that are then used to generate alerts to the user.
+1) install the 'dmraid-events-logwatch' package
-
+2) uncomment the functional portion of the /etc/cron.d/dmeventd-logwatch crontab file-As a result, it is no longer possible to remove the logwatch package when the dmraid packages are loaded. An alternate packaging structure that will restore this ability may be considered in the future.

Comment 33 Radek Bíba 2009-08-24 10:04:57 UTC
*** Bug 515553 has been marked as a duplicate of this bug. ***

Comment 35 Ryan Lerch 2009-08-26 03:05:58 UTC
Release note updated. If any revisions are required, please set the 
"requires_release_notes"  flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1,4 +1,7 @@
-The dmraid-events package no longer provides the logwatch-based email reporting functionality.  The dmraid logwatch-based email reporting has been split out to a new 'dmraid-events-logwatch' package.  This package split will require existing user's of dmraid's logwatch-based email reporting to make two manual changes:
+With this update, the dmraid logwatch-based email reporting feature has been moved from the dmraid-events package into the new dmraid-events-logwatch package. Consequently, systems that use this dmraid feature will need to complete the following manual procedure:
 
-1) install the 'dmraid-events-logwatch' package
+1. ensure the new 'dmraid-events-logwatch' package is installed.
-2) uncomment the functional portion of the /etc/cron.d/dmeventd-logwatch crontab file+
+2. un-comment the functional portion of the "/etc/cron.d/dmeventd-logwatch" crontab file.
+
+(BZ#512833)

Comment 36 errata-xmlrpc 2009-09-02 11:16:34 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1347.html