-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lbnl_cmd.nhc: Remove line numbers from dmesg check
When using `check_cmd_dmesg()` directly (as written in `scripts/lbnl_cmd.nhc`) with a negated match string, the default behavior of `check_cmd_output()` (which `check_cmd_dmesg()` wraps) used for error reporting causes the "Reason" field to contain not only the match string that was found (and shouldn't have been) but also the **_line number_** where the match was found. In the case of `dmesg` output, the line number is almost completely useless; moreover, it prevents Slurm and other schedulers/RMs from being able to group all the affected nodes together -- because the line numbers almost always differ! Granted that users/admins can override the default failure message generation behavior (via `-M` entries, all of which are passed directly to `check_cmd_output()`), but in the specific case of `check_cmd_dmesg()`, I think the default behavior should suppress the line numbers and use a simpler, more concise message instead. This changeset adds a bit of pre-processing to `check_cmd_dmesg()`. Each "mstr/message" pair" is examined, and for each match string (`-m` argument) that doesn't have a corresponding message (`-M` argument) that overrides the default will have a new default provided to it that omits the extraneous information. Addresses #143.
- Loading branch information
Showing
5 changed files
with
57 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters