fix: detect containerd socket errors and add Docker Desktop pre-flight warning for all Solo commands#4568
fix: detect containerd socket errors and add Docker Desktop pre-flight warning for all Solo commands#4568Copilot wants to merge 19 commits into
Conversation
|
✨ Submitted to Merge by @JeffreyDallas. It will be added to the merge queue once all branch protection rules pass and there are no merge conflicts with the target branch. See more details here. |
Signed-off-by: JeffreyDallas <39912573+JeffreyDallas@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
JeffreyDallas
left a comment
There was a problem hiding this comment.
@copilot the pre-flight check should not just for relay node, maybe more general for all solo command, considering move it common function that will be called by all solo command
Done in commit
|
JeffreyDallas
left a comment
There was a problem hiding this comment.
@copilot
update PR description with current changes
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
…fix-redeploy-failure-relation Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com> # Conflicts: # src/integration/kube/k8-client/resources/pod/k8-client-pods.ts # test/unit/integration/kube/detect-fatal-container-error.test.ts
Signed-off-by: Jeffrey Tang <jeffrey@swirldslabs.com>
|
Wait #4798 to fix migration test |
On macOS with Docker Desktop's "Use containerd for pulling and storing images" toggle enabled, relay pods fail with
ImageInspectErrorpointing at/run/containerd/containerd.sock. Previously the error was silently swallowed as transient, causing a 15-minute silent timeout before a generic "pod not found" message. This PR surfaces an actionable error message immediately and adds a pre-flight check that runs automatically for every Solo command via the shared dependency-check flow.Description
This pull request changes the following:
src/integration/kube/k8-client/resources/pod/k8-client-pods.tsisContainerdSocketError()— exported helper matching containerd socket error strings in waiting-state messagesCONTAINERD_SOCKET_FATAL_THRESHOLD = 5— higher streak threshold (vs default 3) to tolerate Docker Desktop startup racesdetectFatalContainerError—ImageInspectError+ containerd socket message now returns an actionable string with fix instructions instead of continuing silentlywaitForRunningPhase— picksCONTAINERD_SOCKET_FATAL_THRESHOLDwhen the fatal error is a containerd socket errorsrc/core/docker-desktop-containerd-check-result.ts(new)DockerDesktopContainerdCheckResultinterface extracted into its own kebab-case file per the TypeScript style guide (§ 3.5)src/core/docker-desktop-checker.ts(new)checkDockerDesktopContainerdSetting()reads Docker Desktop settings files and checksuseContainerdSnapshotter~/.docker/settings-store.json,~/.docker/settings.json, and the legacy~/Library/Group Containers/group.com.docker/settings.json%APPDATA%\Docker\settings-store.jsonand%APPDATA%\Docker\settings.jsonfirst, then the~/.docker/equivalentsPathEx.join(notpath.join) per the TypeScript style guide (§ 3.3.5); paths evaluated lazily so test stubs onos.homedirwork correctlysrc/commands/base.tsdockerDesktopPreflightTask()added as aprotectedmethod onBaseCommand, making it available to every Solo command that extendsBaseCommandvia standard inheritancewarn-level log with fix instructions if the containerd snapshotter setting is on (non-blocking — warns only, does not halt the command)src/commands/init/init.tsinstallDependenciesTasks()now includesdockerDesktopPreflightTask()as its first task — sinceSubcommand.installDependencies()incommand-builder.tscalls this method before every Solo sub-command handler, the Docker Desktop pre-flight check runs automatically for all Solo commands without any per-command wiringsrc/commands/relay.tsthis.dockerDesktopPreflightTask()calls removed fromaddandupgradetask flows — now covered universally viainstallDependenciesTasks()docs/site/content/en/system-readiness.md(new)Related Issues
Closed #4351
Pull request (PR) checklist
package.jsonchanges have been explained to and approved by a repository managerTesting
The following manual testing was done:
isContainerdSocketErrormatches the exact socket path string from the filed bug reportcheckDockerDesktopContainerdSettingunit tests and 6detectFatalContainerErrorcontainerd-branch unit tests passdockerDesktopPreflightTask()runs for all commands viainstallDependenciesTasks()with no regressions across 11 passing unit testsThe following was not tested:
useContainerdSnapshotter: truetoggled on — cannot be reproduced in CI; behavior verified via unit tests and code review%APPDATA%\Docker\paths are exercised via unit tests with stubbed OS detection