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

🐛 Drop quiet option of grep to avoid race condition with pipefail #612

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

fenggw-fnst
Copy link
Contributor

What this PR does / why we need it:
The grep -q closes input pipe immediately if any match is found, while the command on the left side will exit with SIGPIPE when it tries to write to a closed pipe, causing the Metal3 Pod to get stuck in CrashLoopBackOff sometimes.

Which issue(s) this PR fixes:
Fixes #611

@metal3-io-bot metal3-io-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jan 26, 2025
@metal3-io-bot
Copy link
Contributor

Hi @fenggw-fnst. Thanks for your PR.

I'm waiting for a metal3-io member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@metal3-io-bot metal3-io-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 26, 2025
@fenggw-fnst fenggw-fnst changed the title Drop quiet option of grep to avoid race condition with pipefail 🐛 Drop quiet option of grep to avoid race condition with pipefail Jan 27, 2025
@tuminoid
Copy link
Member

/ok-to-test

@metal3-io-bot metal3-io-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 27, 2025
@Rozzii
Copy link
Member

Rozzii commented Jan 27, 2025

/test metal3-centos-e2e-integration-test-main
/test metal3-ubuntu-e2e-integration-test-main
/lgtm

@metal3-io-bot metal3-io-bot added the lgtm Indicates that a PR is ready to be merged. label Jan 27, 2025
Copy link
Member

@Rozzii Rozzii left a comment

Choose a reason for hiding this comment

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

@tuminoid
Copy link
Member

/retest

2 similar comments
@tuminoid
Copy link
Member

/retest

@tuminoid
Copy link
Member

/retest

@tuminoid
Copy link
Member

/retest
Network flakes.

@elfosardo
Copy link
Member

/approve

@metal3-io-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: elfosardo, tuminoid

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

@metal3-io-bot metal3-io-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 27, 2025
@tuminoid
Copy link
Member

/retest

@tuminoid
Copy link
Member

/retest
Amount of network flakes these days .... :(

@tuminoid
Copy link
Member

tuminoid commented Jan 27, 2025

This has now come up here at least two times, I don't see this come up elsewhere.

[2025-01-27T12:11:02.168Z]   [FAILED] Unexpected error:
[2025-01-27T12:11:02.168Z]       <*errors.Error | 0xc001313e00>: 
[2025-01-27T12:11:02.168Z]       unable to find field ".spec.ipAddresses.0" in replacement target
[2025-01-27T12:11:02.168Z]       {
[2025-01-27T12:11:02.168Z]           Err: <*errors.errorString | 0xc000d32160>{
[2025-01-27T12:11:02.168Z]               s: "unable to find field \".spec.ipAddresses.0\" in replacement target",
[2025-01-27T12:11:02.168Z]           },

edit: ok, something is broken elsewhere per today, this is not coming from this PR.

@tuminoid
Copy link
Member

/retest
e2e should be working now.

@metal3-io-bot metal3-io-bot merged commit a3c210b into metal3-io:main Jan 27, 2025
6 of 7 checks passed
@metal3-io-bot metal3-io-bot added this to the ironic-image - v28.0 milestone Jan 27, 2025
@fenggw-fnst fenggw-fnst deleted the fix-pipefail branch January 27, 2025 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ironic-common.sh: <cmd> | grep -q with set -o pipefail causes race condition (SIGPIPE)
5 participants