Skip to content

fix(k8s): check daemon reachability by deploy id - #983

Open
iwilltry42 wants to merge 1 commit into
nextcloud:mainfrom
basepeak:fix/k8s-daemon-ping-dispatch
Open

fix(k8s): check daemon reachability by deploy id#983
iwilltry42 wants to merge 1 commit into
nextcloud:mainfrom
basepeak:fix/k8s-daemon-ping-dispatch

Conversation

@iwilltry42

Copy link
Copy Markdown

ExAppsPageService and Settings\Admin always ran the Docker ping. On a kubernetes-install daemon that probes a Docker Engine path HaRP does not serve, and it blocks until cURL times out rather than failing fast — so a healthy daemon reads as unreachable and the ExApp deploy button stays disabled.

Mirrors the dispatch SetupChecks\DaemonCheck already does.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b170610d-da4d-42ff-85bb-870251c34b35

📥 Commits

Reviewing files that changed from the base of the PR and between a478c56 and 85fa3b7.

📒 Files selected for processing (1)
  • lib/Controller/DaemonConfigController.php

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

ExAppsPageService, Admin, and DaemonConfigController now support Kubernetes daemon accessibility checks. Each class receives KubernetesActions and selects Kubernetes or Docker probing from the daemon deployment identifier. Kubernetes checks initialize a client and call ping. Docker checks retain URL-based probing through DockerActions. The controller centralizes both checks in daemonAccessible().

Merge Risk: 🔵 Low · up to 85fa3

The PR makes Kubernetes daemon reachability checks fail fast by using the deployment ID, restoring availability of the ExApp deployment flow. A bounded follow-up remains: accessibility failures are logged at error level instead of warning level, which may create misleading operational noise.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the Kubernetes daemon reachability fix and the deploy ID condition.
Description check ✅ Passed The description explains the Docker ping issue for Kubernetes daemons and the intended reachability fix.
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.

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.

@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


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0124ee00-a9c3-4529-ba9f-c66f598d4185

📥 Commits

Reviewing files that changed from the base of the PR and between 65d047c and a478c56.

📒 Files selected for processing (2)
  • lib/Service/ExAppsPageService.php
  • lib/Settings/Admin.php

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.

Comment thread lib/Settings/Admin.php
Comment on lines +51 to +53
if (!$daemonConfigAccessible) {
$this->logger->error(sprintf('Deploy daemon "%s" is not accessible by Nextcloud: %s', $daemonConfig->getName(), $pingError));
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use a warning for an unreachable Kubernetes daemon.

Line 52 emits an error-level log for the same reachability state that lib/Service/ExAppsPageService.php records as a warning. The PR objective specifies warning logging for inaccessible daemons. Use warning() here to keep both UI flows consistent.

Proposed fix
- $this->logger->error(sprintf('Deploy daemon "%s" is not accessible by Nextcloud: %s', $daemonConfig->getName(), $pingError));
+ $this->logger->warning(sprintf('Deploy daemon "%s" is not accessible by Nextcloud: %s', $daemonConfig->getName(), $pingError));
📝 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
if (!$daemonConfigAccessible) {
$this->logger->error(sprintf('Deploy daemon "%s" is not accessible by Nextcloud: %s', $daemonConfig->getName(), $pingError));
}
if (!$daemonConfigAccessible) {
$this->logger->warning(sprintf('Deploy daemon "%s" is not accessible by Nextcloud: %s', $daemonConfig->getName(), $pingError));
}

Four call sites always ran the Docker ping: ExAppsPageService,
Settings\Admin, and the two DaemonConfigController endpoints behind the
admin UI's connection checks. On a kubernetes-install daemon that probes a
Docker Engine path HaRP does not serve, and it blocks until cURL times out
rather than failing fast — so a healthy daemon reads as unreachable, the
ExApp deploy button stays disabled and "Check Connection" reports failure.

Mirrors the dispatch SetupChecks\DaemonCheck already does.
@iwilltry42
iwilltry42 force-pushed the fix/k8s-daemon-ping-dispatch branch from a478c56 to 85fa3b7 Compare August 21, 2026 13:00
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.

1 participant