Project

General

Profile

Bug #8946

fmdump(1m) should be more resilient in the face of missing message content

Added by Rob Johnston about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2018-01-02
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

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 <rob.johnston@joyent.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 <robert.mustacchi@joyent.com>
    Approved by: Robert Mustacchi <robert.mustacchi@joyent.com>

For more details, see the corresponding Joyent bug:

https://smartos.org/bugview/OS-6448

Also available in: Atom PDF