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

Properly parse stderr when updating container status #22160

Merged
merged 1 commit into from
Mar 26, 2024

Conversation

ubergeek42
Copy link
Contributor

I believe the previous code meant to use cmd.Run instead of cmd.Start. The issue is that cmd.Start returns before the command has finished executing, so the conditional body checking for the stderr of the command never gets executed.

Raise the cmd.Start up into it's own conditional, which is checking for whether the process could be started. Then we consume stderr, check for some specific strings in the output, and then finally continue on with the rest of the code.

This may be a (partial?) fix for: #22159

Does this PR introduce a user-facing change?

None

I believe the previous code meant to use cmd.Run instead of cmd.Start.
The issue is that cmd.Start returns before the command has finished
executing, so the conditional body checking for the stderr of the
command never gets executed.

Raise the cmd.Start up into it's own conditional, which is checking for
whether the process could be started. Then we consume stderr, check for
some specific strings in the output, and then finally continue on with
the rest of the code.

Signed-off-by: Keith Johnson <[email protected]>
@baude baude added the No New Tests Allow PR to proceed without adding regression tests label Mar 25, 2024
@baude
Copy link
Member

baude commented Mar 25, 2024

code lgtm

@mheon
Copy link
Member

mheon commented Mar 26, 2024

Sure
/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2024
@mheon
Copy link
Member

mheon commented Mar 26, 2024

/approve

Copy link
Contributor

openshift-ci bot commented Mar 26, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mheon, ubergeek42

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 26, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 83903eb into containers:main Mar 26, 2024
93 checks passed
@stale-locking-app stale-locking-app bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Jun 25, 2024
@stale-locking-app stale-locking-app bot locked as resolved and limited conversation to collaborators Jun 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. No New Tests Allow PR to proceed without adding regression tests release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants