fix "host-gateway-ip" label not set for builder workers#47187
Merged
thaJeztah merged 1 commit intomoby:masterfrom Jan 23, 2024
Merged
fix "host-gateway-ip" label not set for builder workers#47187thaJeztah merged 1 commit intomoby:masterfrom
thaJeztah merged 1 commit intomoby:masterfrom
Conversation
933aa73 to
53fabba
Compare
53fabba to
7a29763
Compare
Commit 21e50b8 added a label on the buildkit worker to advertise the host-gateway-ip. This option can be either set by the user in the daemon config, or otherwise defaults to the gateway-ip. If no value is set by the user, discovery of the gateway-ip happens when initializing the network-controller (`NewDaemon`, `daemon.restore()`). However d222bf0 changed how we handle the daemon config. As a result, the `cli.Config` used when initializing the builder only holds configuration information form the daemon config (user-specified or defaults), but is not updated with information set by `NewDaemon`. This patch adds an accessor on the daemon to get the current daemon config. An alternative could be to return the config by `NewDaemon` (which should likely be a _copy_ of the config). Before this patch: docker buildx inspect default Name: default Driver: docker Nodes: Name: default Endpoint: default Status: running Buildkit: v0.12.4+3b6880d2a00f Platforms: linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6 Labels: org.mobyproject.buildkit.worker.moby.host-gateway-ip: <nil> After this patch: docker buildx inspect default Name: default Driver: docker Nodes: Name: default Endpoint: default Status: running Buildkit: v0.12.4+3b6880d2a00f Platforms: linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6 Labels: org.mobyproject.buildkit.worker.moby.host-gateway-ip: 172.18.0.1 Signed-off-by: Sebastiaan van Stijn <[email protected]>
7a29763 to
00c9785
Compare
thaJeztah
commented
Jan 23, 2024
Comment on lines
+183
to
+184
| // Config returns daemon's config. | ||
| func (daemon *Daemon) Config() config.Config { |
Member
Author
There was a problem hiding this comment.
FWIW, not "stoked" by this solution, but it should get us going.
Member
Author
|
Failure is unrelated; and tracked in #47119 |
vvoland
approved these changes
Jan 23, 2024
crazy-max
approved these changes
Jan 23, 2024
Member
Author
|
New failure is also unrelated (other flaky test); #46508 |
laurazard
approved these changes
Jan 23, 2024
Member
laurazard
left a comment
There was a problem hiding this comment.
LGTM (but yeah, this is a messy area and we should track this somewhere to improve)
Member
Author
|
@laurazard yeah, agreed. I did an ever-so-slightly cleanup after I worked on this here; #47188 (nothing for the "global picture" though. |
This was referenced Jan 24, 2024
FelixLinn
added a commit
to FelixLinn/IGinX
that referenced
this pull request
Feb 28, 2026
Remove --add-host=host.docker.internal:host-gateway from run_docker.bat. Docker 25+ on GitHub Actions Windows fails to resolve host-gateway (docker/buildx#2201, moby/moby#47187). On Windows, host.docker.internal is provided by Docker Desktop, so the flag is unnecessary and causes "unable to derive the IP value for host-gateway".
zhuyuqing
pushed a commit
to IGinX-THU/IGinX
that referenced
this pull request
Apr 28, 2026
#674) * feat(storage): tighten ALTER STORAGEENGINE rules and option key grammar - Add ALTER_ENGINE_IMMUTABLE_PARAMS in Constants; reject altering immutable params (ip, port, data_prefix, schema_prefix, has_data, is_read_only, engine) with explicit error message - Reject adding new extra params via ALTER (modify existing options only) - Change storageEngineOptionKey to ID (DOT ID)* (plain identifiers only) - Add ALTER STORAGEENGINE integration tests in BaseCapacityExpansionIT * fix(storage): fix the option param * fix(test): fix expPort storageengine remove * fix(test): change the alter storageengine order * fix(test): change the alter storageengine order * fix(docker): fix host-gateway error on Windows CI Remove --add-host=host.docker.internal:host-gateway from run_docker.bat. Docker 25+ on GitHub Actions Windows fails to resolve host-gateway (docker/buildx#2201, moby/moby#47187). On Windows, host.docker.internal is provided by Docker Desktop, so the flag is unnecessary and causes "unable to derive the IP value for host-gateway". * fix(test): recover test
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.
Commit 21e50b8 added a label on the buildkit worker to advertise the host-gateway-ip. This option can be either set by the user in the daemon config, or otherwise defaults to the gateway-ip.
If no value is set by the user, discovery of the gateway-ip happens when initializing the network-controller (
NewDaemon,daemon.restore()).However d222bf0 changed how we handle the daemon config. As a result, the
cli.Configused when initializing the builder only holds configuration information form the daemon config (user-specified or defaults), but is not updated with information set byNewDaemon.This patch adds an accessor on the daemon to get the current daemon config. An alternative could be to return the config by
NewDaemon(which should likely be a copy of the config).Before this patch:
After this patch:
- What I did
- How I did it
- How to verify it
- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)