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

Remove forcing disabled cgos Darwin #7914

Merged

Conversation

joshbranham
Copy link
Contributor

@joshbranham joshbranham commented Nov 12, 2019

Unsure if this is the right approach but wanted to get some others input. I often run into issues on macOS where I cannot run kops validate cluster due to failed DNS resolution. I am using OpenVPN Connect which does not edit /etc/resolv.conf (which is not standard anymore in macOS anyways at least). By forcing cgos to be disabled, kops validate cluster uses the net packages default resolver that only uses the nameserver listed in /etc/resolv.conf. In this case, that is the DHCP DNS, which fails.

To see the DNS difference, you can see the single nameserver listed in /etc/resolv.conf and then other resolvers which are populated via my VPN client.

(⎈ |kube-development-01.<redacted>)[kops] cat /etc/resolv.conf                                                                                                                                        remove-disabling-darwin-cgos  ✱
#
# macOS Notice
#
# This file is not consulted for DNS hostname resolution, address
# resolution, or the DNS query routing mechanism used by most
# processes on this system.
#
# To view the DNS configuration used by this system, use:
#   scutil --dns
#
# SEE ALSO
#   dns-sd(1), scutil(8)
#
# This file is automatically generated.
#
nameserver 10.0.1.1
(⎈ |kube-development-01.<redacted>)[kops] scutil --dns                                                                                                                                                   remove-disabling-darwin-cgos  ✱
DNS configuration

resolver #1
  nameserver[0] : 10.0.1.1
  if_index : 8 (en0)
  flags    : Request A records
  reach    : 0x00020002 (Reachable,Directly Reachable Address)

resolver #2
  domain   : ops.<redacted>.com
  nameserver[0] : 172.27.0.2
  flags    : Supplemental, Request A records
  reach    : 0x00000002 (Reachable)
  order    : 101000

resolver #3
  domain   : services.<redacted>.com
  nameserver[0] : 172.27.0.2
  flags    : Supplemental, Request A records
  reach    : 0x00000002 (Reachable)
  order    : 101001

The PR that added this functionality was from a few years ago, and it seems all tests still pass and it did resolve my issue. Curious on others thoughts here. Links below for more detail:

PR adding it: #3709
Kubernetes/kubernetes PR for building on darwin for darwin_ to use cgos: kubernetes/kubernetes#64219

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 12, 2019
@joshbranham
Copy link
Contributor Author

cc @chrislovecnm regarding this commit, any thoughts on how to validate if your change is still needed (short of the normal test suite passing.)

c7ef856#diff-b0ce76c214af36d89279c38161d1d727

@johngmyers
Copy link
Member

/test pull-kops-verify-staticcheck

@justinsb
Copy link
Member

justinsb commented Jan 6, 2020

I fired up a mac and wasn't able to reproduce the issues that motivated this a few years ago - I think it's reasonable to assume they are fixed by now (but we should be careful about cherry-picking this back so that we have plenty of time to see if there are still lingering bugs)

Thanks for tracking down the problem and fixing @joshbranham

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 6, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: joshbranham, justinsb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 6, 2020
@johngmyers
Copy link
Member

/test pull-kops-e2e-kubernetes-aws

1 similar comment
@johngmyers
Copy link
Member

/test pull-kops-e2e-kubernetes-aws

@k8s-ci-robot k8s-ci-robot merged commit 6cf8671 into kubernetes:master Jan 6, 2020
@k8s-ci-robot k8s-ci-robot added this to the v1.18 milestone Jan 6, 2020
@joshbranham joshbranham deleted the remove-disabling-darwin-cgos branch June 15, 2020 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants