errors reported by drac5 external stonith plugin#32
Open
tabraham wants to merge 1 commit into
Open
Conversation
Collaborator
|
On Tue, Aug 31, 2021 at 03:44:56PM +0000, T.M. Abraham wrote:
The drac5 external plugin outputs empty error lines on every
instance it's called due to the handling in the trap on exit. We
should prevent empty error lines by checking if there's content
to output.
Also, it considers all output from the racadm command it uses as
an error. However, it's output can indicate success, so we shouldn't
report it as an error. Considering it debug is probably more appropriate.
I'd say that either is suboptimal. Is there a meaningful exit
code from racadm? Otherwise, we could try to match the output for
error/warning.
|
dmuhamedagic
requested changes
Sep 25, 2021
dmuhamedagic
left a comment
Collaborator
There was a problem hiding this comment.
If possible, please provide some information about racadm and its behaviour. Thanks!
The trap generates log entries on exit even if the temp file is empty. This results in errors being reported for every command -- even when help is requested. Log entries should only be generated if there's something to log and should only be logged as errors if an error is returned
Author
|
This is a more significant change. The trap isn't really needed since all use of the temporary file is limited to sshlogin function. It makes changes to log as an error only when racadm returns an error code (non-zero) and logs as debug otherwise |
dmuhamedagic
reviewed
Nov 7, 2021
| @SSH@ -q -x -n $userid@$ipaddr racadm serveraction "$1" >$outf 2>&1 | ||
| if [ $? -ne 0 ] | ||
| then | ||
| ha_log err "$outf" |
Collaborator
There was a problem hiding this comment.
The function should return the racadm's exit code, i.e. if it reports an error then the action failed (I'd assume). Note that the following call to cleanup will effectively clear the exit code, so you have to save it.
dmuhamedagic
requested changes
Nov 7, 2021
dmuhamedagic
left a comment
Collaborator
There was a problem hiding this comment.
We can merge once the exit code of ssh/racadm gets propagated.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The drac5 external plugin outputs empty error lines on every
instance it's called due to the handling in the trap on exit. We
should prevent empty error lines by checking if there's content
to output.
Also, it considers all output from the racadm command it uses as
an error. However, it's output can indicate success, so we shouldn't
report it as an error. Considering it debug is probably more appropriate.