Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use "stdout" as error message for SaltSSHError in cases where "stderr" is empty #298

Merged
merged 2 commits into from
Mar 4, 2022

Conversation

meaksh
Copy link
Member

@meaksh meaksh commented Mar 3, 2022

This PR makes SaltSSHError to use stdout as error message in cases where the Salt SSH execution produces an error event with empty stderr but containing meaningful data in the stdout:

{"uyuni-master-min-sles15.mgr.suse.de": {"stdout": "\rPassword: \nError: Wrong number of arguments!\n", "stderr": "", "retcode": 255, "id": "uyuni-master-min-sles15.mgr.suse.de", "fun": "state.apply", "jid": "20220303090427537110", "_stamp": "2022-03-03T09:04:30.263709"}}

We noticed this happening in some ocassions, specially when using "preflight script" on salt ssh, where SaltSSHError was raised without no message:

image

@meaksh meaksh requested a review from lucidd March 3, 2022 09:57
Copy link

@vzhestkov vzhestkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@meaksh meaksh merged commit 3eb9ccb into master Mar 4, 2022
@meaksh meaksh deleted the master-use-stdout-as-when-no-stderr-for-saltssherror branch March 4, 2022 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants