fmdump(1m) should be more resilient in the face of missing message content
fmdump(1m) implements a "-m" option which will dump the localized message content associated with each event in the fault logs (/var/fm/fmd/fltlog*).
Currently, if fmdump fails to lookup the message content for an event it exits immediately with an error. This is an undesirable behavior for a couple reasons:
1) The current error doesn't even identify the affected event or the diagcode that it failed to lookup the msg content for.
2) In such a case, it would be far more useful to at least dump as much as it can successfully rather than bailing out on the first error.
Given that fmd supports proxying events from other fault managers, potentially from other machines (or OS instances) the possibility of ending up with an FM event for which there is no associated message content on the local machine is not entirely inconceivable, so we should handle it better.
This CR is to change fmdump such that if it fails to lookup the message content for an event, rather than exiting, it will print an error message indicating that it couldn't lookup the content for said event (identifying the event by its uuid) and then forge on.
Note: This change was integrated into illumos-joyent via the following changeset and there have been no issues with it.
commit 58853b2326b7e3a605e4e558d0af3e028c87f434 Author: Rob Johnston <email@example.com> Date: Mon Nov 20 18:10:21 2017 +0000 OS-6448 fmdump(1m) should be more resilient in the face of missing message content Reviewed by: Robert Mustacchi <firstname.lastname@example.org> Approved by: Robert Mustacchi <email@example.com>
For more details, see the corresponding Joyent bug: