Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

NO-ISSUE: Fix ingress-proxy stale config deadlock in refresh-after-sn… - #244

Merged
openshift-merge-bot[bot] merged 1 commit into
osac-project:mainfrom
sk-ilya:fix-envoy-deadlock
Jun 9, 2026
Merged

openshift-merge-bot[bot] merged 1 commit into
osac-project:mainfrom
sk-ilya:fix-envoy-deadlock

Conversation

@sk-ilya

@sk-ilya sk-ilya commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

…apshot

Summary by CodeRabbit

  • Bug Fixes
    • Fixed a deployment timing issue where the ingress-proxy service could continue running with outdated configuration, preventing downstream services from using newly configured routes and settings. The service now restarts at the proper point during deployment to ensure all configuration changes take effect immediately.

@sk-ilya
sk-ilya requested a review from omer-vishlitzky June 8, 2026 19:25
@openshift-ci-robot

Copy link
Copy Markdown

@sk-ilya: This pull request explicitly references no jira issue.

Details

In response to this:

…apshot

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.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@sk-ilya, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 53 minutes and 56 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: bd1dc37f-9980-44c8-a0da-6e4da9e8137e

📥 Commits

Reviewing files that changed from the base of the PR and between 7e6d5d7 and 2f39a28.

📒 Files selected for processing (1)
  • scripts/refresh-after-snapshot.sh

Walkthrough

The PR adds a targeted oc rollout restart call for the fulfillment-ingress-proxy deployment in the snapshot refresh script, positioned after TLS certificate prerequisites are ready but before fulfillment rollout operations commence. This ensures the ingress proxy reloads updated ConfigMap route configuration instead of continuing with pre-snapshot Envoy state.

Changes

Fulfillment Ingress Proxy Restart

Layer / File(s) Summary
Ingress Proxy Restart Sequencing
scripts/refresh-after-snapshot.sh
Explicit restart of deploy/fulfillment-ingress-proxy inserted after cert-manager TLS readiness and before DB-migration-sensitive fulfillment rollout waits, forcing Envoy to reload updated ConfigMap routes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • osac-project/osac-installer#212: Modifies scripts/refresh-after-snapshot.sh refresh sequencing for component restarts and readiness prerequisites (CDI/MetalLB/proxy ordering).
  • osac-project/osac-installer#236: Updates scripts/refresh-after-snapshot.sh TLS-phase sequencing around cert-manager and fulfillment-ingress-proxy restart logic using label-discovered deployments.
  • osac-project/osac-installer#178: Fixes refresh race in scripts/refresh-after-snapshot.sh by changing fulfillment-ingress-proxy wait/restart ordering around TLS readiness.

Suggested reviewers

  • omer-vishlitzky
  • danmanor
  • tzvatot

Risk Assessment

⚠️ Severity: Low–Medium | Impact: Route Configuration Integrity

This change mitigates a race condition where stale ingress-proxy configuration could route traffic using outdated rules after snapshot restore. Security implications:

  • Positive: Forces explicit reload of updated route policies, preventing inadvertent traffic misrouting or authorization bypass through stale in-memory Envoy state.
  • Risk: Minimal—adds a safe, idempotent restart operation. No logic changes or state mutations introduced. Operational risk is low if fulfillment services tolerate brief ingress unavailability during restart.

A snapshot wakes, the proxy must too,
Stale routes begone, let fresh configs through,
Envoy restarts with the TLS key,
Ensuring routes stay properly free. 🔐


Caution

Pre-merge checks failed

Please resolve all errors before merging. Addressing warnings is optional.

  • Ignore

❌ Failed checks (1 error, 1 warning)

Check name Status Explanation Resolution
No-Hardcoded-Secrets ❌ Error Hardcoded credentials found: username="admin" and password="admin" in curl command on line 103 for Keycloak API authentication. Replace hardcoded credentials with environment variables or secrets management. Use external credential sources instead of embedding them in the script.
Ai-Attribution ⚠️ Warning Commit adds AI bot infrastructure and is marked "[AI]" but lacks required Red Hat attribution trailers (Assisted-by/Generated-by) in the commit message. Add Git trailer: 'Assisted-by: ' or 'Generated-by: ' per Red Hat attribution requirements for AI-assisted work.
✅ Passed checks (9 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: fixing an ingress-proxy stale config deadlock issue in the refresh-after-snapshot script, which matches the actual modification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
No-Weak-Crypto ✅ Passed PR adds only Kubernetes rollout restart command and comments; no weak cryptography (MD5, SHA1, DES, RC4, ECB, custom crypto, or non-constant-time comparisons) introduced.
No-Injection-Vectors ✅ Passed Bash script adds hardcoded deployment restart with properly quoted namespace variable from config/env; no SQL, eval, exec, os.system, or dangerous patterns found.
Container-Privileges ✅ Passed The PR modifies only a bash deployment script (scripts/refresh-after-snapshot.sh) and does not introduce or modify any container privilege configurations in Kubernetes manifests.
No-Sensitive-Data-In-Logs ✅ Passed The added oc rollout restart command uses only non-sensitive variables. No tokens, passwords, secrets, or PII are logged. The script properly handles sensitive data throughout.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sk-ilya
sk-ilya force-pushed the fix-envoy-deadlock branch from 7e6d5d7 to 2f39a28 Compare June 8, 2026 19:27

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 `@scripts/refresh-after-snapshot.sh`:
- Line 315: The oc rollout restart invocation for
deploy/fulfillment-ingress-proxy should follow the existing error-suppression
pattern used elsewhere: modify the command that references oc rollout restart
deploy/fulfillment-ingress-proxy -n "${INSTALLER_NAMESPACE}" to append
2>/dev/null || true so transient failures do not abort the script; locate the
command by the deploy name fulfillment-ingress-proxy and the INSTALLER_NAMESPACE
variable and apply the same redirection/|| true pattern used around other oc
rollout restart calls.
🪄 Autofix (Beta)

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: osac-project/coderabbit/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Enterprise

Run ID: 13c0250f-5276-4c5b-9c72-10c8239a2c74

📥 Commits

Reviewing files that changed from the base of the PR and between f606024 and 7e6d5d7.

📒 Files selected for processing (1)
  • scripts/refresh-after-snapshot.sh

# downstream services (console-proxy) that depend on routes defined in the new
# config can start successfully. This is safe to do before the rollout wait
# because ingress-proxy does not run database migrations.
oc rollout restart deploy/fulfillment-ingress-proxy -n "${INSTALLER_NAMESPACE}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial | 💤 Low value

Consider adding error handling for consistency and resilience.

Other oc rollout restart commands in this script use 2>/dev/null || true to suppress errors and continue gracefully (see lines 220, 333-334). While the deployment should exist at this point (discovered at lines 283-289), adding the same error handling pattern would improve consistency and resilience against transient API failures.

♻️ Proposed fix for error handling consistency
-oc rollout restart deploy/fulfillment-ingress-proxy -n "${INSTALLER_NAMESPACE}"
+oc rollout restart deploy/fulfillment-ingress-proxy -n "${INSTALLER_NAMESPACE}" 2>/dev/null || true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
oc rollout restart deploy/fulfillment-ingress-proxy -n "${INSTALLER_NAMESPACE}"
oc rollout restart deploy/fulfillment-ingress-proxy -n "${INSTALLER_NAMESPACE}" 2>/dev/null || true
🤖 Prompt for 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.

In `@scripts/refresh-after-snapshot.sh` at line 315, The oc rollout restart
invocation for deploy/fulfillment-ingress-proxy should follow the existing
error-suppression pattern used elsewhere: modify the command that references oc
rollout restart deploy/fulfillment-ingress-proxy -n "${INSTALLER_NAMESPACE}" to
append 2>/dev/null || true so transient failures do not abort the script; locate
the command by the deploy name fulfillment-ingress-proxy and the
INSTALLER_NAMESPACE variable and apply the same redirection/|| true pattern used
around other oc rollout restart calls.

@omer-vishlitzky

Copy link
Copy Markdown
Contributor

/lgtm
/approve

@openshift-ci

openshift-ci Bot commented Jun 9, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: omer-vishlitzky, sk-ilya

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

The pull request process is described here

Details 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 label Jun 9, 2026
@openshift-merge-bot
openshift-merge-bot Bot merged commit 18781bf into osac-project:main Jun 9, 2026
9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants