OCPBUGS-105445: Fix shell arithmetic comparison in multus daemonset - #7170
OCPBUGS-105445: Fix shell arithmetic comparison in multus daemonset#7170ggiguash wants to merge 1 commit into
Conversation
The init container's timeout check used `if $(( now - start > 5 * 60 ))` which performs arithmetic expansion and returns the result as a string that `if` interprets as a command name. This causes the timeout logic to never trigger correctly. Replace with POSIX `test` syntax `if [ "$((now - start))" -gt 300 ]` which properly compares the elapsed seconds against the 300-second (5 minute) threshold. OCPBUGS-105445
|
@ggiguash: This pull request references Jira Issue OCPBUGS-105445, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughThe Multus DaemonSet now calculates elapsed wait time with arithmetic expansion before applying the 300-second timeout. ChangesMultus timeout handling
Estimated code review effort: 1 (Trivial) | ~2 minutes Suggested labels: Caution Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional.
❌ Failed checks (1 error)
✅ Passed checks (14 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@ggiguash: This pull request references Jira Issue OCPBUGS-105445, which is valid. 3 validation(s) were run on this bug
DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@assets/components/multus/06-daemonset.yaml`:
- Line 64: Move the timeout change from the rebase-managed generated manifest
into its upstream Multus component source, then regenerate
assets/components/multus/06-daemonset.yaml from that source. Do not manually
edit any manifest under assets/; preserve the updated timeout expression in the
regenerated output.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 0a3ac142-0b42-4a09-83ee-0c90bd148ddc
📒 Files selected for processing (1)
assets/components/multus/06-daemonset.yaml
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ggiguash, pacevedom The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@ggiguash: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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. I understand the commands that are listed here. |
|
Closing due to an unsigned commit. Will reopen from a private branch. |
|
@ggiguash: Closed this PR. DetailsIn response to this:
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. |
|
@ggiguash: This pull request references Jira Issue OCPBUGS-105445. The bug has been updated to no longer refer to the pull request using the external bug tracker. All external bug links have been closed. The bug has been moved to the NEW state. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
The init container's timeout check used
if $(( now - start > 5 * 60 ))which performs arithmetic expansion and returns the result as a string thatifinterprets as a command name. This causes the timeout logic to never trigger correctly.Replace with POSIX
testsyntaxif [ "$((now - start))" -gt 300 ]which properly compares the elapsed seconds against the 300-second (5 minute) threshold.OCPBUGS-105445
Summary by CodeRabbit