Bug #4722
closedfm/smtp-notify mails about events in previously closed cases upon fmd (re)start
100%
Description
fmd seems to re-send list.suspect events from all logged cases that have
already been solved upon startup:
# fmdump | grep Resolved Apr 02 16:58:45.2916 be10ed1d-c9fc-c9e6-91fc-83f05cd6ebcd FMD-8000-6U Resolved Apr 02 17:01:26.9581 ba175123-7198-6c36-a923-a98e183d772d FMD-8000-6U Resolved # /usr/lib/fm/fmd/fmd -o fg=true -o debug=xprt fmd: [ loading modules ... fmd DEBUG: opened transport 1 fmd DEBUG: door server startup for fda5ed90 successful fmd DEBUG: door server startup for fda5e540 successful fmd DEBUG: door server starting for 0 fmd DEBUG: re-send list.suspect for ba175123-7198-6c36-a923-a98e183d772d to rdonly transport ses-log-transport fmd DEBUG: re-send list.suspect for 447952b0-b045-ed12-cf5e-af2f8cd537c3 to rdonly transport ses-log-transport fmd DEBUG: re-send list.suspect for be10ed1d-c9fc-c9e6-91fc-83f05cd6ebcd to rdonly transport ses-log-transport
If fm/smtp-notify is running at this time (which seems to be the case
practically always on reboot for me, and of course restarting fmd will trigger
this), it will happily process these resent events and send mails about them.
This gets annoying quickly: you get notifications for every past fault on every
reboot :)
fmd's resending behavior seems to be intended:
http://src.illumos.org/source/xref/illumos-gate/usr/src/cmd/fm/fmd/common/fmd_xprt.c#514
I'm thinking maybe smtp-notify should attempt to find the case corresponding to
the received event and check that it is not solved before sending mail.
Updated by Jussi Sallinen about 8 years ago
When implementing this kind of behavior we must also be sure that the email is sent when the event is created & immediately resolved automatically.. bet that's the case already.
Updated by Lauri Tirkkonen about 8 years ago
Jussi Sallinen wrote:
When implementing this kind of behavior we must also be sure that the email is sent when the event is created & immediately resolved automatically.. bet that's the case already.
I have an outstanding webrev of this but I don't know how to test that. Any pointers?
Updated by Udo Grabowski about 8 years ago
/usr/lib/fm/fmd/fminject seems to be the right tool to test,
see the 3rd comment in
<https://community.oracle.com/thread/1921776?start=0&tstart=0>
for the script syntax.
Updated by Lauri Tirkkonen about 8 years ago
Udo Grabowski wrote:
/usr/lib/fm/fmd/fminject seems to be the right tool to test,
see the 3rd comment in
<https://community.oracle.com/thread/1921776?start=0&tstart=0>
for the script syntax.
Thanks, but I believe fminject is only for ereports (these are what the example also generates). This would be useful if I knew a circumstance under which a list.suspect event is generated and automatically resolved (I could generate the required errors to make the fault diagnosis happen), but I'm not aware of one.
Updated by Electric Monk almost 8 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
git commit 107c18c129a0fbc18532c43616e5dc1a489d6ddc
commit 107c18c129a0fbc18532c43616e5dc1a489d6ddc Author: Lauri Tirkkonen <lotheac@iki.fi> Date: 2014-06-04T18:03:48.000Z 4722 fm/smtp-notify mails about events in previously closed cases upon fmd (re)start Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com> Approved by: Richard Lowe <richlowe@richlowe.net>