-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Vault needs to be built with CGO to use native macOS DNS resolution -- Split DNS not working #94030
Comments
Upstream seem to have adopted a different approach: hashicorp/vault#13728 |
Great news that there is movement upstream! |
Can you try applying this patch and rebuilding diff --git a/Formula/vault.rb b/Formula/vault.rb
index 85a637afa86..5b98e45eba2 100644
--- a/Formula/vault.rb
+++ b/Formula/vault.rb
@@ -32,7 +32,7 @@ class Vault < Formula
def install
ENV.prepend_path "PATH", "#{ENV["GOPATH"]}/bin"
- system "make", "bootstrap", "static-dist", "dev-ui"
+ ENV["CGO_ENABLED"] = "1"
+ system "make", "BUILD_TAGS=netcgo", "bootstrap", "static-dist", "dev-ui"
bin.install "bin/vault"
end Just copy the patch above and then do
(Of course, you'll need to have the patch as the contents of your clipboard to make sure |
You need to have |
I updated the patch. I guess that works? |
@carlocab I have validated that the patch you provided works with a minor change, I am also setting
With this patch I am able to use split DNS for accessing various different vaults. It would be great to get that into homebrew itself so that this works out of the box for everyone. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
Trying to use the vault binary installed from brew:
With a split DNS setup using OpenVPN from Viscosity and vault is unable to do the DNS lookup because it is attempting to use the DNS server located in
/etc/resolv.conf
as it is using the netdns (go internal DNS server)Upstream issue: hashicorp/vault#12012
Issue on Golang specifying work-around by using CGO enabled build: golang/go#12524 (comment)
What happened (include all command output)?
What did you expect to happen?
Have vault properly resolve the DNS, such as for example ping:
Step-by-step reproduction instructions (by running
brew
commands)brew install vault export VUALT_ADDR=https://vault.example.internal/ vault login -method=oidc
Split DNS can be seen with:
Which results in output similar to:
The text was updated successfully, but these errors were encountered: