fix(local-setup): auto-detect podman socket for cloud-provider-kind#1004
fix(local-setup): auto-detect podman socket for cloud-provider-kind#1004silvi-t wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe ChangesPodman Socket Detection and Container Engine Alignment
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@make/dependencies.mk`:
- Around line 26-34: The rootless fallback socket path at the else branch (for
/run/user/$$(id -u)/podman/podman.sock) is assigned without validating that the
socket actually exists, unlike the first check which uses the -S test operator.
Add a validation check using the -S test operator for the rootless socket path
before assigning it to SOCKET, so that DOCKER_HOST is only set when the socket
path actually exists. This prevents setting DOCKER_HOST to a non-existent socket
that would cause failures later.
- Around line 37-40: The Linux path on line 40 fails to properly set the
DOCKER_HOST environment variable when launching cloud-provider-kind because it
uses $$DOCKER_HOST_ENV cloud-provider-kind directly, which causes the shell to
interpret the variable value as a command name rather than an environment
assignment. The macOS path correctly uses sudo env $$DOCKER_HOST_ENV to handle
this. Fix the Linux path by adding env before $$DOCKER_HOST_ENV on line 40,
changing it from $$DOCKER_HOST_ENV cloud-provider-kind to env $$DOCKER_HOST_ENV
cloud-provider-kind, so the environment variable is properly set before the
cloud-provider-kind command executes.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9177e668-766d-4a43-a0e5-81dbfc4cfd1a
📒 Files selected for processing (1)
make/dependencies.mk
Signed-off-by: Silvia Tarabova <starabov@redhat.com>
Description
cloud-provider-kindhardcodesdockercommands internally and fails when using podman unlessDOCKER_HOSTis explicitly set (upstream issue)start-cloud-providertarget now auto-detects podman and resolves the correct socket path, somake local-setupworks out of the box with podman without requiring manual symlinks or docker context configurationChanges
Bug Fix
$(CONTAINER_ENGINE) --versionoutputpodman machine inspect --format '{{.ConnectionInfo.PodmanSocket.Path}}'/run/podman/podman.sock/run/user/<uid>/podman/podman.sockDOCKER_HOSTthroughsudo envon macOS so the env var reaches thecloud-provider-kindprocessVerification steps
CONTAINER_ENGINE=podman make local-setup— verify LoadBalancer services get external IPs assignedmake local-setup— verify no change in behaviorSummary by CodeRabbit
Release Notes