-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[3006.x] Fix salt-ssh retcode reporting #64576
Merged
Merged
Conversation
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
salt-project-bot-prod-environment
bot
changed the title
Fix salt-ssh stacktrace when retcode is not an integer
[3006.x] Fix salt-ssh stacktrace when retcode is not an integer
Jun 29, 2023
lkubb
force-pushed
the
salt-ssh-retcode-none
branch
from
June 29, 2023 13:03
4ee3ef4
to
df70290
Compare
lkubb
force-pushed
the
salt-ssh-retcode-none
branch
from
June 30, 2023 18:41
df70290
to
30cc2b7
Compare
lkubb
changed the title
[3006.x] Fix salt-ssh stacktrace when retcode is not an integer
[3006.x] Fix salt-ssh retcode reporting
Jun 30, 2023
lkubb
force-pushed
the
salt-ssh-retcode-none
branch
from
July 1, 2023 07:35
20ff378
to
30cc2b7
Compare
@dwoz Friendly ping. :) General remark: This patch has been carried by QubesOS since June to fix their relatively frequent CI failures caused by the underlying issue. |
s0undt3ch
approved these changes
Nov 28, 2023
dwoz
approved these changes
Nov 28, 2023
This was referenced Dec 12, 2023
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.
What does this PR do?
retcode
is a non-integer for whatever reason.salt.client.ssh.shell.Shell.exec_cmd
callsterm.close
before querying the exit status and returns an exit status > 128 if a process died as the result of a signal. Both changes avoid returningNone
as retcode.While I could fairly reliably reproduce the reported behavior instrumentalizing another PR for running the test suite many times in parallel, the changes to
Shell
found here completely solved the intermittent test failures in two full runs, where previously one could find 3-4 instances per full run (which usually sorted out themselves during the re-run and thus were not spotted; full run meaning all test runs that are part of the CI pipeline for PRs, not a single full run of the suite on a system).What issues does this PR fix or reference?
Fixes: #64575
Fixes: #64588
Previous Behavior
Seldomly:
TypeError: '>' not supported between instances of 'NoneType' and 'int'
New Behavior
Exits with the correct exit code and returns output as usual.
Merge requirements satisfied?cs
Commits signed with GPG?
Yes