server: More concise error messages. #1236
Merged
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.
On the CNI request failure, multus-cni prints out
cmdArgs
. In all cases, except for debug printing, this is done with%s
and a special printing function. However, thehandleCNIRequest
is an exception for some reason. That leads to unintelligible error messages in case of CNI request failures (severely abridged):printCmdArgs()
should be used for this case as well to avoid huge hardly readable logs.At the same time, the content of
cniCmdArgs
is always appended to the error twice as seen in the example above. The first time by theHandleCNIRequest
and another time by thehandleCNIRequest
. Same for theHandleDelegateRequest
path.Just removing the prefixing from the lower level handlers while keeping higher level ones. The
ERRORED
part migrated to the higher level handler functions to preserve the overall look of the error.