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

TESTING HELM INSTALLATION IGNORE - #346

Closed
omer-vishlitzky wants to merge 2 commits into
osac-project:mainfrom
omer-vishlitzky:test-helm-ignore-1
Closed

omer-vishlitzky wants to merge 2 commits into
osac-project:mainfrom
omer-vishlitzky:test-helm-ignore-1

Conversation

@omer-vishlitzky

@omer-vishlitzky omer-vishlitzky commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

This is a test PR, please ignore.

Summary by CodeRabbit

  • Bug Fixes
    • Improved the rollout sequence during TLS/certificate refreshes to make service recovery more reliable.
    • Added stricter waiting and error handling so failed background updates are detected sooner.
    • Adjusted restart timing for related services to reduce the chance of partial or inconsistent availability during refreshes.

omer-vishlitzky and others added 2 commits June 14, 2026 12:32
…pply

The kustomize overlay changes the fulfillment-database StatefulSet image
reference from a :latest tag to a @sha256: digest. This triggers a
StatefulSet pod recreation, killing the database mid-connection. If the
grpc-server is running database migrations at that moment, golang-migrate
leaves the schema_migrations table in a dirty state and all subsequent
grpc-server starts refuse to run — causing a boot failure.

Fix: use `kustomize edit set replicas` to set fulfillment-controller and
fulfillment-grpc-server to 0 before applying the overlay. The apply
itself deploys with zero replicas, eliminating the race entirely.

At step [5/9], the script now:
1. Waits for TLS certificates
2. Waits for the database StatefulSet rollout to complete
3. Scales grpc-server and controller back to 1
4. Waits for all fulfillment deployment rollouts

This ensures the database is healthy before any migration-running pod
starts, and that grpc-server is available before rest-gateway's
readiness probe checks the gRPC upstream.

Depends on: openshift/release#80431 (adds kustomize binary to the
installer container image).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The script now sets fulfillment controller and gRPC server replicas to zero through the overlay apply step, then reorders the post-certificate phase to wait on background rollout processes, the database rollout, service restarts, deployment rollouts, and CDI certificate refresh completion.

Changes

Snapshot refresh flow

Layer / File(s) Summary
Replica-zero overlay
scripts/refresh-after-snapshot.sh
fulfillment-controller and fulfillment-grpc-server are set to replicas 0 through kustomize edit before the overlay is applied.
Certificate-ready rollout order
scripts/refresh-after-snapshot.sh
The post-certificate phase waits for tracked rollout PIDs, the database rollout, scaling back to 1, ingress proxy restart, fulfillment rollout completion, and CDI refresh completion in the new order.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

Suggested reviewers

  • akshaynadkarni
  • trewest

Poem

The snapshot hummed, then took a pause,
Kustomize wrote the replica laws.
Rollouts waited, one by one,
Certificates shone when all was done,
And ingress woke before the dawn 🌙


Caution

Pre-merge checks failed

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

  • Ignore

❌ Failed checks (2 errors, 1 inconclusive)

Check name Status Explanation Resolution
No-Injection-Vectors ❌ Error New retry_until calls interpolate INSTALLER_NAMESPACE/KC_URL/AAP_ROUTE_HOST into an eval-based helper, so shell injection is possible. Replace retry_until’s string+eval API with argv/array execution (like retry_command) and avoid interpolating env/cluster values into shell code.
No-Sensitive-Data-In-Logs ❌ Error The script logs cluster domain/route hostnames and Keycloak usernames/client IDs in cleartext (e.g. Cluster domain, ${OLD_HOST} -> ${NEW_HOST}, Created user). Remove or redact hostname/user logging; keep only non-sensitive identifiers or mask domains/users before echoing.
Title check ❓ Inconclusive The title looks like a test placeholder and does not meaningfully describe the snapshot refresh changes. Replace it with a concise title that names the main change, such as the snapshot refresh rollout sequencing update.
✅ Passed checks (8 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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-Hardcoded-Secrets ✅ Passed No new hardcoded secrets found in the changed script; secret values are sourced from files/cluster, and the admin/admin token request is an allowed exception.
No-Weak-Crypto ✅ Passed Only md5sum is used for non-cryptographic ConfigMap change detection; no flagged weak crypto, custom crypto, or secret/token comparisons were introduced.
Container-Privileges ✅ Passed The PR only changes scripts/refresh-after-snapshot.sh, and that script adds no privileged, hostPID/hostNetwork/hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings.
Ai-Attribution ✅ Passed No AI-tool usage is mentioned in the PR description or commit message, and no Assisted-by/Generated-by/Co-Authored-By trailers appear.
✨ 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.

@omer-vishlitzky

Copy link
Copy Markdown
Contributor Author

/test vmaas-e2e-full-setup-helm

@openshift-ci
openshift-ci Bot requested review from sk-ilya and trewest June 25, 2026 18:05
@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: omer-vishlitzky

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

@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`:
- Around line 175-181: The temporary scale-down in refresh-after-snapshot.sh
leaves overlays/${INSTALLER_KUSTOMIZE_OVERLAY}/kustomization.yaml mutated at 0
replicas after the live cluster is restored. Update the script so the change
made by kustomize edit set replicas in the deployment/setup flow is reverted
once the pods are brought back, either by setting fulfillment-controller and
fulfillment-grpc-server back to 1, restoring the file from git, or trapping and
reverting the modification on exit. Use the existing deployment restore section
and the kustomize edit set replicas command as the anchor points for the fix.
🪄 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: 96af474f-4c72-4257-81c4-6d46bdbe9102

📥 Commits

Reviewing files that changed from the base of the PR and between e6b3066 and df9bc43.

📒 Files selected for processing (2)
  • empty-test-file-1.txt
  • scripts/refresh-after-snapshot.sh

Comment on lines +175 to +181
# Deploy with fulfillment pods scaled to zero. The apply changes the database
# StatefulSet image ref (tag → digest), triggering a pod recreation. If the
# grpc-server were running, it could be mid-migration when the database is
# killed, leaving golang-migrate's schema dirty. Deploying at zero replicas
# eliminates the race entirely — pods are brought back at step [5/9] after
# the database rollout completes.
( cd "overlays/${INSTALLER_KUSTOMIZE_OVERLAY}" && kustomize edit set replicas fulfillment-controller=0 fulfillment-grpc-server=0 )

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n scripts/refresh-after-snapshot.sh

Repository: osac-project/osac-installer

Length of output: 23637


Restore the overlay kustomization.yaml after the temporary scale-down.

The kustomize edit set replicas command mutates overlays/${INSTALLER_KUSTOMIZE_OVERLAY}/kustomization.yaml in place. While oc scale corrects the live cluster state later in the script, the local file remains set to 0 replicas. This state leakage causes subsequent kustomize build or oc apply runs to incorrectly scale the pods down to zero.

Add a kustomize edit set replicas ...=1 or a git checkout for the file after the deployment is back up, or trap the modification and restore it on exit.

Current state at end of script ```bash # Line 181: File set to 0 ( cd "overlays/${INSTALLER_KUSTOMIZE_OVERLAY}" && kustomize edit set replicas fulfillment-controller=0 fulfillment-grpc-server=0 )

Line 322-323: Live deployment scaled to 1

oc scale deploy/fulfillment-controller -n "${INSTALLER_NAMESPACE}" --replicas=1
oc scale deploy/fulfillment-grpc-server -n "${INSTALLER_NAMESPACE}" --replicas=1

File remains at 0

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

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 around lines 175 - 181, The temporary
scale-down in refresh-after-snapshot.sh leaves
overlays/${INSTALLER_KUSTOMIZE_OVERLAY}/kustomization.yaml mutated at 0 replicas
after the live cluster is restored. Update the script so the change made by
kustomize edit set replicas in the deployment/setup flow is reverted once the
pods are brought back, either by setting fulfillment-controller and
fulfillment-grpc-server back to 1, restoring the file from git, or trapping and
reverting the modification on exit. Use the existing deployment restore section
and the kustomize edit set replicas command as the anchor points for the fix.


</details>

<!-- cr-indicator-types:potential_issue -->

<!-- cr-comment:v1:89fd9bcaa6f0abec4ef31ba9 -->

<!-- This is an auto-generated comment by CodeRabbit -->

@omer-vishlitzky

Copy link
Copy Markdown
Contributor Author

/test e2e-vmaas-full-setup-helm

@openshift-ci

openshift-ci Bot commented Jun 25, 2026

Copy link
Copy Markdown

@omer-vishlitzky: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-vmaas-full-setup-helm df9bc43 link false /test e2e-vmaas-full-setup-helm

Full PR test history. Your PR dashboard.

Details

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. I understand the commands that are listed here.

@omer-vishlitzky

Copy link
Copy Markdown
Contributor Author

💀 CI Triage: broken_main | Category: TEST

Root cause: Helm deployment missing storage class configuration for AAP provisioning jobs

Explanation: The e2e-vmaas-full-setup-helm CI job is completely broken (no successful runs in 14+ days). The test suite runs for exactly 60 minutes before hitting the hard timeout, with only 9 out of 47 tests completing. The timeout occurs because ComputeInstance VMs never reach Running state—they remain stuck in "Starting" phase indefinitely.

Root cause: AAP provision jobs (job IDs 78, 79, 84, 99, 100, 101, 103) all fail with the same error: "ComputeInstance has no tenant_storage_classes available. Either the osac-operator CI controller should inject the resolved storageClasses list before triggering provisioning, or JIT storage provisioning via STORAGE_TIERS must succeed."

The Helm deployment is missing the storage configuration that the Kustomize deployment includes. The osac-operator is not injecting the required osac.openshift.io/tenant.storage_classes annotation on ComputeInstance CRs, and the AAP job environment lacks the STORAGE_TIERS variable needed for JIT storage provisioning. Without either mechanism, AAP cannot determine which StorageClass to use for VM disks, causing all provision jobs to fail immediately.

The causal chain: missing storage config → AAP jobs fail → VMs never created → ComputeInstances stuck in Starting → tests wait 15 minutes per VM → 60-minute timeout kills test suite at ~19% completion.

This affects ONLY the -full-setup-helm job variant. Regular e2e-vmaas jobs (using Kustomize deployment) pass successfully, including for the same PR #346.

Evidence:

[AAP job 78 stdout](https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/osac-project_osac-installer/346/pull-ci-osac-project-osac-installer-main-e2e-vmaas-full-setup-helm/2070208886412939264/artifacts/e2e-vmaas-full-setup-helm/osac-project-gather/artifacts/osac-logs/AAP job 78 stdout):

fatal: [localhost]: FAILED! => {"changed": false, "msg": "ComputeInstance 'e2e-test-api-fields-1782420034' has no tenant_storage_classes available. Either the osac-operator CI controller should inject the resolved storageClasses list before triggering provisioning, or JIT storage provisioning via STORAGE_TIERS must succeed."}

computeinstances.yaml:

provisioningJobs: [jobID: '78', state: Failed, message: failed], [jobID: '79', state: Failed], [jobID: '84', state: Failed], [jobID: '101', state: Failed]

computeinstances.txt:

e2e-test-api-fields-1782420034   osac.templates.ocp_virt_vm   2       4                Always        Starting

[build-log.txt test output](https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/osac-project_osac-installer/346/pull-ci-osac-project-osac-installer-main-e2e-vmaas-full-setup-helm/2070208886412939264/artifacts/e2e-vmaas-full-setup-helm/osac-project-gather/artifacts/osac-logs/build-log.txt test output):

tests/vmaas/test_compute_instance_cli_explicit_fields /bin/bash: line 59:    23 Killed                  timeout -s 9 60m

[ci-obs differential analysis](https://gcsweb-ci.apps.ci.l2s4.p1.openshiftapps.com/gcs/test-platform-results/pr-logs/pull/osac-project_osac-installer/346/pull-ci-osac-project-osac-installer-main-e2e-vmaas-full-setup-helm/2070208886412939264/artifacts/e2e-vmaas-full-setup-helm/osac-project-gather/artifacts/osac-logs/ci-obs differential analysis):

e2e-vmaas-full-setup-helm: 0 successful runs in last 14 days. Regular e2e-vmaas: PR #346 passed on 2026-06-25T19:49:26Z

Suggestion: Fix the Helm chart deployment to configure storage classes for AAP provisioning. Two options:

Option 1 (operator injection): Configure the osac-operator Helm chart to inject the osac.openshift.io/tenant.storage_classes annotation on ComputeInstance CRs before triggering AAP jobs. Check how the Kustomize overlay configures this (likely via operator environment variables or a ConfigMap) and replicate that configuration in charts/osac/templates/operator/deployment.yaml.

Option 2 (AAP JIT provisioning): Set the STORAGE_TIERS environment variable in the AAP job environment. In the installer script or Helm values, configure AAP jobs to receive STORAGE_TIERS with the available StorageClass names (e.g., "lvms-vg1"). Reference: The AAP playbook already has logic to parse STORAGE_TIERS but the variable is not being passed.

Immediate verification: Compare the osac-operator deployment between a working Kustomize-based job and this failing Helm-based job. Look for differences in environment variables, annotations on Tenant CRs, or ConfigMaps that control storage class resolution.

File to check: /tmp/osac-installer/charts/osac/values.yaml and charts/osac/templates/operator/* — ensure storage configuration is exposed as a Helm value and injected into the operator deployment.


Prow job | Build 2070208886412939264 | 🤖 triagent | Cost: $1.9474

For deeper investigation, use the /osac-debug-e2e skill with this build ID.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant