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

dns: use resolved region rather than re-resolving every time #16778

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

justinsb
Copy link
Member

This should allow the fallback behaviour to work as expected.

@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 Aug 25, 2024
@justinsb
Copy link
Member Author

/hold

As I'm not very sure about this

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 25, 2024
@rifelpet
Copy link
Member

I want to make sure we dont reintroduce #16645

My initial idea for this fix was to only include the awsconfig.WithEC2IMDSRegion() call if IMDS is available - that is if imdsClient.GetRegion() returns a nil error.

@justinsb
Copy link
Member Author

My initial idea for this fix was to only include the awsconfig.WithEC2IMDSRegion() call if IMDS is available - that is if imdsClient.GetRegion() returns a nil error.

Ah - that does sound like a better approach than mine here! Do you want to send a PR, or if you want I can adapt this one?

@rifelpet
Copy link
Member

Feel free to test my theory in this PR :)

This should allow use to IMDS on EC2, but not when not running on EC2,
for example when running `kops update cluster`.
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 25, 2024
@rifelpet
Copy link
Member

/retest pull-kops-e2e-k8s-aws-amazonvpc
/retest pull-kops-e2e-k8s-aws-calico

@k8s-ci-robot
Copy link
Contributor

@rifelpet: The /retest command does not accept any targets.
The following commands are available to trigger required jobs:

  • /test presubmit-kops-aws-boskos
  • /test presubmit-kops-aws-boskos-kubetest2
  • /test presubmit-kops-aws-scale-amazonvpc
  • /test presubmit-kops-aws-small-scale-amazonvpc-using-cl2
  • /test presubmit-kops-gce-scale-ipalias-using-cl2
  • /test presubmit-kops-gce-small-scale-ipalias-using-cl2
  • /test pull-kops-aws-distro-al2023
  • /test pull-kops-aws-distro-amazonlinux2
  • /test pull-kops-aws-distro-debian10
  • /test pull-kops-aws-distro-debian11
  • /test pull-kops-aws-distro-debian12
  • /test pull-kops-aws-distro-flatcar
  • /test pull-kops-aws-distro-rhel8
  • /test pull-kops-aws-distro-rhel9
  • /test pull-kops-aws-distro-rocky9
  • /test pull-kops-aws-distro-ubuntu2004
  • /test pull-kops-aws-distro-ubuntu2004arm64
  • /test pull-kops-aws-distro-ubuntu2204
  • /test pull-kops-aws-distro-ubuntu2204arm64
  • /test pull-kops-aws-distro-ubuntu2404
  • /test pull-kops-aws-distro-ubuntu2404arm64
  • /test pull-kops-build
  • /test pull-kops-e2e-arm64
  • /test pull-kops-e2e-aws-apiserver-nodes
  • /test pull-kops-e2e-aws-cloud-controller-manager
  • /test pull-kops-e2e-aws-dns-none
  • /test pull-kops-e2e-aws-external-dns
  • /test pull-kops-e2e-aws-ipv6-external-dns
  • /test pull-kops-e2e-aws-ipv6-karpenter
  • /test pull-kops-e2e-aws-ipv6-terraform
  • /test pull-kops-e2e-aws-karpenter
  • /test pull-kops-e2e-aws-load-balancer-controller
  • /test pull-kops-e2e-aws-nlb
  • /test pull-kops-e2e-aws-node-local-dns
  • /test pull-kops-e2e-aws-terraform
  • /test pull-kops-e2e-cni-amazonvpc
  • /test pull-kops-e2e-cni-calico
  • /test pull-kops-e2e-cni-canal
  • /test pull-kops-e2e-cni-cilium
  • /test pull-kops-e2e-cni-cilium-eni
  • /test pull-kops-e2e-cni-cilium-etcd
  • /test pull-kops-e2e-cni-flannel
  • /test pull-kops-e2e-k8s-aws-amazonvpc
  • /test pull-kops-e2e-k8s-aws-calico
  • /test pull-kops-e2e-k8s-ci
  • /test pull-kops-e2e-k8s-ci-ha
  • /test pull-kops-e2e-k8s-gce-calico-u2004-k22-containerd
  • /test pull-kops-e2e-k8s-gce-ci
  • /test pull-kops-e2e-k8s-gce-cilium
  • /test pull-kops-e2e-k8s-gce-cilium-etcd
  • /test pull-kops-e2e-k8s-gce-ipalias
  • /test pull-kops-e2e-k8s-gce-long-cluster-name
  • /test pull-kops-e2e-kubernetes-do-dns-none
  • /test pull-kops-e2e-kubernetes-do-fqdn
  • /test pull-kops-e2e-kubernetes-do-gossip
  • /test pull-kops-e2e-metrics-server
  • /test pull-kops-e2e-pod-identity-webhook
  • /test pull-kops-test
  • /test pull-kops-verify-boilerplate
  • /test pull-kops-verify-generated
  • /test pull-kops-verify-gofmt
  • /test pull-kops-verify-golangci-lint
  • /test pull-kops-verify-gomod
  • /test pull-kops-verify-govet
  • /test pull-kops-verify-hashes
  • /test pull-kops-verify-terraform

The following commands are available to trigger optional jobs:

  • /test presubmit-kops-aws-scale-amazonvpc-using-cl2
  • /test pull-kops-e2e-aws-upgrade-k124-ko124-to-k125-kolatest
  • /test pull-kops-e2e-aws-upgrade-k125-kolatest-to-k126-kolatest
  • /test pull-kops-e2e-aws-upgrade-k127-ko127-to-k128-kolatest-karpenter
  • /test pull-kops-e2e-aws-upgrade-k127-ko127-to-klatest-kolatest-many-addons
  • /test pull-kops-e2e-cni-amazonvpc-ipv6
  • /test pull-kops-e2e-cni-calico-ipv6
  • /test pull-kops-e2e-cni-cilium-ipv6
  • /test pull-kops-e2e-cni-kuberouter
  • /test pull-kops-e2e-gce-dns-none
  • /test pull-kops-kubernetes-e2e-cos-gce
  • /test pull-kops-kubernetes-e2e-cos-gce-serial
  • /test pull-kops-kubernetes-e2e-cos-gce-slow
  • /test pull-kops-kubernetes-e2e-ubuntu-gce-build

Use /test all to run the following jobs that were automatically triggered:

  • pull-kops-build
  • pull-kops-e2e-k8s-aws-amazonvpc
  • pull-kops-e2e-k8s-aws-calico
  • pull-kops-e2e-k8s-gce-cilium
  • pull-kops-e2e-k8s-gce-ipalias
  • pull-kops-test
  • pull-kops-verify-boilerplate
  • pull-kops-verify-generated
  • pull-kops-verify-gofmt
  • pull-kops-verify-golangci-lint
  • pull-kops-verify-gomod
  • pull-kops-verify-govet

In response to this:

/retest pull-kops-e2e-k8s-aws-amazonvpc
/retest pull-kops-e2e-k8s-aws-calico

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@rifelpet
Copy link
Member

/test pull-kops-e2e-k8s-aws-amazonvpc
/test pull-kops-e2e-k8s-aws-calico

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rifelpet

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 Aug 26, 2024
@rifelpet
Copy link
Member

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Aug 26, 2024
@k8s-ci-robot k8s-ci-robot merged commit bdb283e into kubernetes:master Aug 26, 2024
22 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.31 milestone Aug 26, 2024
@rifelpet
Copy link
Member

Looks like this didn't fix the problem:

https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/e2e-kops-aws-addon-resource-tracking/1827929845212909568

Error: error reading cluster configuration "e2e-c0d41e2af2-13250.tests-kops-aws.k8s.io": error reading s3://k8s-kops-ci-prow-state-store/e2e-c0d41e2af2-13250.tests-kops-aws.k8s.io/config: Unable to list AWS regions: NoCredentialProviders: no valid providers in chain
caused by: EnvAccessKeyNotFound: failed to find credentials in the environment.
SharedCredsLoad: failed to load profile, .
CredentialsEndpointError: invalid endpoint host, "169.254.170.23", only loopback hosts are allowed.
Error: exit status 1 

k8s-ci-robot added a commit that referenced this pull request Aug 28, 2024
…78-origin-release-1.30

Automated cherry pick of #16778: dns: don't use IMDS region resolver when it previously failed
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants