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 155893

Summary: [PATCH] multipathd spams syslog every 5 seconds
Product: [Fedora] Fedora Reporter: Joe Orton <jorton>
Component: device-mapper-multipathAssignee: Alasdair Kergon <agk>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: agk, bernd.bartmann, christophe.varoqui, dmo, kanderso, lmb, rkenna, tranlan, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-13 19:12:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 136450    

Description Joe Orton 2005-04-25 14:36:45 UTC
Description of problem:
/var/log/messages is getting spammed every 5 seconds for a default Raw Hide
kickstart install with:

Apr 25 15:34:25 trash multipathd: no devmap found
Apr 25 15:34:25 trash multipathd: can't get devmaps ... retry
Apr 25 15:34:30 trash multipathd: no devmap found
Apr 25 15:34:30 trash multipathd: can't get devmaps ... retry

(I don't have any multipath hardware)

Version-Release number of selected component (if applicable):
device-mapper-multipath-0.4.4-2.0.i386

Comment 1 Joe Orton 2005-04-26 11:51:43 UTC
Can the daemon be changed to exit in this case? Otherwise it should not be on by
default in runlevel 5, I guess.  This is going to be annoying if it's not fixed
 for FC4. 

Comment 2 Christophe Varoqui 2005-05-02 22:28:03 UTC
It must no exit, because :

o "no devmaps" is a valid temporary case
o memory allocation failures can cause the looping, better to retry later than
exit in this case too.

That said, it is obvious to rate limit the loging, which is done in this patch :
http://kernel.org/git/gitweb.cgi?p=linux/storage/multipath-tools/.git;a=commitdiff;h=457b498a392a61a0198b5dea80972930069d0537


Comment 3 Joe Orton 2005-05-03 07:14:06 UTC
If the daemon is going to be left consuming resources (at least CPU) every five
seconds then I'd still argue it should *not* be on by default in runlevel 5. 
Most Fedora users won't have multipath hardware, I'm guessing.

Comment 4 Warren Togami 2005-05-03 07:33:00 UTC
I'd recommend bringing this to fedora-devel-list for public debate.  I am not
sure if I agree with disabling the service by default.

Comment 5 Warren Togami 2005-05-03 07:34:14 UTC
I do agree that consuming resources every 5 seconds (even with log rate
limiting) is not good.  I just don't have a better suggestion, so this should go
to public debate.

Comment 6 Lars Marowsky-Bree 2005-05-03 10:55:29 UTC
It should be pointed out that even a running multipathd will "spam" the syslog
at irregular intervals with an empty message, but apparently so high prio that
it'll be broadcast to all consoles by default. I've not yet tracked down where
in the code this originates from.


Comment 7 Alasdair Kergon 2005-05-03 13:20:53 UTC
Quite simply, the daemon should not be running unless you're using device-mapper
multipath.

We don't have support in anaconda yet, so:

    (i) The startup script needs changing to detect whether or not the daemon
should be started [not sure how to do this];  or

    (ii) The daemon should exit immediately if there are no devices - could be
controlled by a command line option, but possible problems if devices are slow
to appear on the system;

    (iii) The installer should 'chkconfig --levels 0123456 off' and leave people
to turn it on manually post-install.


I reckon (iii) is best at this stage.

Any other options?



Comment 8 Alasdair Kergon 2005-05-03 13:22:21 UTC
s/installer/%post/

Comment 9 Joe Orton 2005-05-03 13:27:27 UTC
To achieve (iii) just change the init script chkconfig: line to read:

chkconfig: - 18 87

so that the "chkconfig --add" invocation in %post does not enable the service to
start in any runlevels to begin with.

Comment 10 Alasdair Kergon 2005-05-03 13:46:45 UTC
But that would lose the default list of run levels for people who do need the
package.

Comment 11 Joe Orton 2005-05-03 13:51:04 UTC
To preserve that then just don't call "chkconfig --add" at all in the %post
script?  Let the users who need it do that...

Comment 12 Alasdair Kergon 2005-05-03 13:55:27 UTC
I think 'added' but 'off' is better.  Otherwise you don't see it as an option in
the lists.


Comment 13 Alasdair Kergon 2005-05-04 14:13:38 UTC
building device-mapper-multipath-0_4_4-2_1

Comment 14 Alasdair Kergon 2005-05-04 14:23:12 UTC
That should solve the immediate problem, by not enabling it by default.

The problem of too many error messages will be fixed by Christophe upstream and
get picked up by Fedora, probably post-FC4.


Comment 15 Christophe Varoqui 2005-05-04 21:23:16 UTC
> The problem of too many error messages will be fixed by Christophe upstream and
> get picked up by Fedora, probably post-FC4.

Is fixed, in
http://kernel.org/git/gitweb.cgi?p=linux/storage/multipath-tools/.git;a=commitdiff;h=457b498a392a61a0198b5dea80972930069d0537

Comment 16 Joe Orton 2005-05-05 12:40:21 UTC
Not fixed in 0.4.4-2.1... spot the mistake ;)

/sbin/chkconfig --add multipathd
/sbin/chkconfig --levels 0123456 off
                                ^^


Comment 17 Alasdair Kergon 2005-05-05 13:48:14 UTC
Gah!

Comment 18 Alasdair Kergon 2005-05-13 18:56:26 UTC
*** Bug 157461 has been marked as a duplicate of this bug. ***

Comment 19 Alasdair Kergon 2005-05-13 19:11:51 UTC
Really fixed in device-mapper-multipath-0.4.4-2.3, thanks Bill.

Comment 20 Edgar Bertoti 2005-08-22 10:20:43 UTC
This bug, as described in the first report,  has appeared again in FC4 for x86_64. 

Comment 21 Alasdair Kergon 2005-08-30 13:00:52 UTC
Exactly which RPM is this still happening with?