Skip to content

Conversation

@danpawlik
Copy link
Collaborator

@danpawlik danpawlik commented Sep 11, 2025

Sometimes, 300 seconds waiting time for port :6443 to be available is not enough.
Increase the time to 600 seconds.

Summary by CodeRabbit

  • Bug Fixes
    • Increased deployment wait time for the Kubernetes API (port 6443) from 5 to 10 minutes to reduce premature timeouts on slower or loaded environments; deployments may take longer to report failures but succeed more reliably.
  • Maintenance
    • Updated base container image reference to a newer digest for underlying platform updates; no user-facing configuration changes required.

@coderabbitai
Copy link

coderabbitai bot commented Sep 11, 2025

Walkthrough

Increased a wait_for timeout for kubelet port 6443 from 300s to 600s and updated the base image digest in oci/Containerfile for quay.io/centos/centos:stream9; no other behavioral changes or exported API changes.

Changes

Cohort / File(s) Summary of changes
Ansible wait_for timeout adjustment
ansible/roles/deploy-crc-cloud/tasks/kubelet.yaml
Increased wait_for timeout for port 6443 from 300 to 600 seconds; delay remains 60.
OCI base image digest update
oci/Containerfile
Updated FROM quay.io/centos/centos:stream9 digest from sha256:a2ef206...15b32 to sha256:5bd57c6d...16a30.

Sequence Diagram(s)

(No sequence diagram generated — changes are parameter and image-digest updates without control-flow or new feature interaction.)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "Increase time waiting for kubelet" is a concise, single-sentence summary that matches the PR objective of increasing the wait timeout for the kubelet-related wait step (the changeset raises the wait_for timeout from 300s to 600s); it clearly communicates the primary change without extraneous details. It is specific and relevant to the modified task and not vague or unrelated.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Poem

I tap my paws, I wait—no haste,
Six hundred ticks, not one misplaced.
The kubelet’s gate on six-four-four-three,
I sniff the breeze of latency.
A new digest, a steady beat — rabbit hops, deployment neat. 🐇✨

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
ansible/roles/deploy-crc-cloud/tasks/kubelet.yaml (1)

20-23: Fix premature success in until condition (use AND, not OR).

With ORs, the first run can pass when stdout is empty, then fail due to failed_when. Use ANDs so all error markers are absent and resources appear before proceeding.

   until: |
-    ('No resources found' not in _openshift_containers.stdout) or
-    ('connect: connection refused' not in _openshift_containers.stderr) or
-    ('get current server API group list' not in _openshift_containers.stderr)
+    ('No resources found' not in _openshift_containers.stdout) and
+    ('connect: connection refused' not in _openshift_containers.stderr) and
+    ('get current server API group list' not in _openshift_containers.stderr)
🧹 Nitpick comments (1)
ansible/roles/deploy-crc-cloud/tasks/kubelet.yaml (1)

10-14: Make wait parameters configurable.

Expose timeout/delay as vars so environments can tune without code changes.

 - name: Wait for port 6443 to be up
   ansible.builtin.wait_for:
-    timeout: 600
+    timeout: "{{ kube_apiserver_wait_timeout | default(600) }}"
     port: 6443
-    delay: 60
+    delay: "{{ kube_apiserver_wait_delay | default(60) }}"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf93caa and c1d9174.

📒 Files selected for processing (1)
  • ansible/roles/deploy-crc-cloud/tasks/kubelet.yaml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: build (macOS-latest, 1.20)
  • GitHub Check: build (ubuntu-latest, 1.20)
🔇 Additional comments (1)
ansible/roles/deploy-crc-cloud/tasks/kubelet.yaml (1)

12-12: LGTM: Timeout increased to 600s.

The change directly addresses slow startups and is safe/idempotent.

Sometimes, 300 seconds waiting time for port :6443 to be available
is not enough.
Increase the time to 600 seconds.

Also update CentOS 9 Stream container SHA-256 to unlock the CI.

Signed-off-by: Daniel Pawlik <[email protected]>
@danpawlik danpawlik force-pushed the increase-waiting-for-kubelet branch from c1d9174 to d715f31 Compare September 11, 2025 15:54
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
ansible/roles/deploy-crc-cloud/tasks/kubelet.yaml (1)

21-23: Likely logic bug: use AND instead of OR in until.

With OR, the loop can exit early if any single error string isn’t present, even when others still are. AND ensures all error indicators are absent before proceeding.

-  until: |
-    ('No resources found' not in _openshift_containers.stdout) or
-    ('connect: connection refused' not in _openshift_containers.stderr) or
-    ('get current server API group list' not in _openshift_containers.stderr)
+  until: |
+    ('No resources found' not in _openshift_containers.stdout) and
+    ('connect: connection refused' not in _openshift_containers.stderr) and
+    ('get current server API group list' not in _openshift_containers.stderr)
🧹 Nitpick comments (2)
oci/Containerfile (1)

15-15: Confirm base image digest bump and scan for CVEs.

Updating the CentOS Stream 9 digest can change libc/openssl and other base libs. Please confirm this digest was intentional, passes image/vuln scanning, and doesn’t break downstream installs. If driven by Renovate, consider annotating with a renovate hint for traceability.

ansible/roles/deploy-crc-cloud/tasks/kubelet.yaml (1)

12-12: Make timeout configurable via a role var.

Allows env-specific tuning without future PRs.

-    timeout: 600
+    timeout: "{{ kube_apiserver_port_wait_timeout | default(600) }}"
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1d9174 and d715f31.

📒 Files selected for processing (2)
  • ansible/roles/deploy-crc-cloud/tasks/kubelet.yaml (1 hunks)
  • oci/Containerfile (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build (macOS-latest, 1.20)
  • GitHub Check: build (ubuntu-latest, 1.20)
  • GitHub Check: build-and-push-image
🔇 Additional comments (1)
ansible/roles/deploy-crc-cloud/tasks/kubelet.yaml (1)

12-12: LGTM: Longer kube-apiserver port wait.

Increasing timeout to 600s matches the PR goal and should reduce flakiness on slow boots.

Copy link
Contributor

@adrianriobo adrianriobo left a comment

Choose a reason for hiding this comment

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

LGTM

@praveenkumar praveenkumar merged commit f6ed2f2 into crc-org:main Sep 12, 2025
5 of 6 checks passed
@danpawlik danpawlik deleted the increase-waiting-for-kubelet branch September 12, 2025 12:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants