Closed moritzheiber closed 2 months ago
https://github.com/pulumi/pulumi-docker/issues/1106 is a similar issue related to refresh
and host values, in case that's relevant here.
Perusing the logs reveals that pulumi is using the local docker daemon via a socket connection instead of the configuration setting:
I think this is actually a red herring. These logs come from the "native" portion of the provider which is only responsible for building images. The Volume
resource is managed by the "bridged" portion, which is configured according to upstream/internal/provider/config.go
with some patches applied.
running a pulumi refresh without passing DOCKER_HOST as a variable will fail with the following error:
There's a good comment from Pat in https://github.com/pulumi/esc/issues/199#issuecomment-2164123853 that explains how refresh
determines which configuration to use. In particular, it should be using the previously persisted value of the host.
the bug is 100% reproducible with the example I posted above.
Thank you for including the code sample! Unfortunately I haven't been able to reproduce the issue using local sockets or local tcp listeners (which AFAIK should trigger the same ssh code path).
@moritzheiber can you confirm the order of operations?
pulumi config set docker:host ssh://...
pulumi up
pulumi refresh
Describe what happened
According to the documention one can set the
DOCKER_HOST
variable through apulumi
setting utilizing assh
connection, i.e.However, although commands like
update
ordestroy
do respect the configuration setting (i.e.DOCKER_HOST
is set properly and the command connects to the rightdocker
daemon viassh
successfully), running apulumi refresh
without passingDOCKER_HOST
as a variable will fail with the following error:Note: the
Volume
in this example is just one of many resources that fail.Perusing the logs reveals that
pulumi
is using the localdocker
daemon via a socket connection instead of the configuration setting:Sample program
Log output
I can provide further logs upon request. Currently it would require significant work to redact output I cannot submit publicly, and the bug is 100% reproducible with the example I posted above.
Affected Resource(s)
The resources I've tested this with were
Volume
,Container
andNetwork
but I reckon all resources are affected here given the nature of this bug.Output of
pulumi about
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).