Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote.Command can't resolve mDNS #59

Closed
blampe opened this issue May 19, 2022 · 1 comment
Closed

remote.Command can't resolve mDNS #59

blampe opened this issue May 19, 2022 · 1 comment
Assignees
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Milestone

Comments

@blampe
Copy link
Contributor

blampe commented May 19, 2022

What happened?

The provider is built with CGO_ENABLED=0, which forces the pure Go resolver for DNS.

In the majority of cases this resolver should be fine, however there are a subset of domains the Go resolver can't handle.

Steps to reproduce

new remote.Command("test", {connection: {host: "foo.local"}, create: "echo hello"})

Expected Behavior

The "foo.local" mDNS query should not leak to the DNS server.

Actual Behavior

$ GODEBUG=netdns=1 pulumi up
go package net: using cgo DNS resolver
...
Diagnostics:
  pulumi:pulumi:Stack (...):
    error: update failed

    go package net: built with netgo build tag; using Go's DNS resolver

  command:remote:Command (test):
    error: dial tcp: lookup foo.local on 192.168.1.1:53: no such host

Versions used

No response

Additional context

The user can work around this by resolving the mDNS query in their application code and then passing the IP address to Pulumi. A little kludgy, but it works.

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).

@lukehoban lukehoban added kind/bug Some behavior is incorrect or out of spec and removed bug labels May 26, 2022
@iwahbe iwahbe assigned iwahbe and unassigned aq17 Sep 12, 2023
@iwahbe
Copy link
Member

iwahbe commented Sep 12, 2023

Hey @blampe. It looks like this issue is upstream of golang/go#12524, and it should be fixed now.

Running your example code now gives:

𝛌 GODEBUG=netdns=1 pulumi up
go package net: using cgo DNS resolver
Previewing update (dev)

View in Browser (Ctrl+O): https://app.pulumi.com/pulumi/ts/dev/previews/822a80a2-a23b-4831-8370-06baa9e182ec

     Type                       Name    Plan       
     pulumi:pulumi:Stack        ts-dev             
 +   └─ command:remote:Command  test    create     


Resources:
    + 1 to create
    1 unchanged

Policy Packs run:
    Name                      Version
    pulumi-internal-policies  6

Do you want to perform this update? yes
Updating (dev)

View in Browser (Ctrl+O): https://app.pulumi.com/pulumi/ts/dev/updates/23

     Type                       Name    Status                  Info
     pulumi:pulumi:Stack        ts-dev  **failed**              1 error; 1 message
 +   └─ command:remote:Command  test    **creating failed**     1 error


Diagnostics:
  pulumi:pulumi:Stack (ts-dev):
    go package net: using cgo DNS resolver

    error: update failed

  command:remote:Command (test):
    error: dial tcp: lookup foo.local: no such host

Resources:
    1 unchanged

Policy Packs run:
    Name                      Version
    pulumi-internal-policies  6

Duration: 1m9s

If you are able to reproduce the bug on pulumi-command >=v0.8.x, please open a new issue.

@iwahbe iwahbe added awaiting-feedback Blocked on input from the author resolution/fixed This issue was fixed and removed awaiting-feedback Blocked on input from the author labels Sep 12, 2023
@iwahbe iwahbe closed this as completed Sep 12, 2023
@mikhailshilkov mikhailshilkov added this to the 0.94 milestone Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Some behavior is incorrect or out of spec resolution/fixed This issue was fixed
Projects
None yet
Development

No branches or pull requests

6 participants