fix(provision/docker): set HostIP on PortBindings to bind on host#15
Merged
Conversation
The docker provider's buildHostConfig built every PortBinding with
HostIP left as the netip.Addr zero value (`invalid IP`). moby
v1.54.x marshals an invalid Addr as the empty JSON string, and
Docker Engine 28 (ubuntu-latest) silently drops bindings whose
HostIp comes through empty: the container starts, but
NetworkSettings.Ports is `{}` and nothing is published to the host.
Surfaced through Yolean/ystack PR 76, where the local-docker
acceptance config maps four ports (6443/80/443/8944). The single-
forward y-cluster e2e on the same runner happens to escape the
behaviour but it was always a race -- on Docker Desktop the
daemon picked 127.0.0.1 to fill the empty HostIp; on Docker
Engine it left the binding off entirely.
Setting HostIP to netip.IPv4Unspecified() ("0.0.0.0") matches
the semantics of `docker run -p host:guest` (Docker Engine binds
on every interface) and produces a valid Addr that survives the
v1.54.x JSON round-trip.
Regression test asserts every binding produced by buildHostConfig
carries a valid HostIP.
Verified locally with TestDocker_ProvisionTeardown still passing
(host port 36443) and the four-port reproducer (6443/80/443/8944)
publishing all four bindings on Docker Desktop.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
solsson
added a commit
to Yolean/ystack
that referenced
this pull request
May 3, 2026
Two y-cluster releases unblock the docker provider on ubuntu-latest and let the acceptance script collapse to a single provision call: - v0.3.5 (Yolean/y-cluster#12) added a host-side /readyz probe between the in-container kubeconfig appearing and "k3s ready" being declared, closing the docker port-forward race that made envoy-gateway install fail with "dial tcp 127.0.0.1:6443: connect: connection refused". The 4x retry/sleep-10s workaround in this script is dead code now -- each retry tore the cluster down and reproduced the deterministic race anyway. - v0.3.6 (Yolean/y-cluster#15) fixed a separate silent-drop in the docker provider's PortBindings: HostIP was left as the zero netip.Addr ("invalid IP"), which moby v1.54+ marshals to the empty JSON string and Docker Engine 28 dropped silently. A second issue with PortBindings still surfaces in some CI contexts -- the y-cluster-managed container's NetworkSettings.Ports comes back empty even with v0.3.6 -- but it's distinct from anything this script can work around; filed upstream against y-cluster. The y-kustomize Deployment image is bumped to the matching v0.3.6 tag for consistency. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
an attempt to fix actions' e2e-cluster