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

fix: extdns crashes when virtual service points to nonexistent … #3686

Merged
merged 1 commit into from Jun 17, 2023
Merged

fix: extdns crashes when virtual service points to nonexistent … #3686

merged 1 commit into from Jun 17, 2023

Conversation

rumstead
Copy link
Contributor

@rumstead rumstead commented Jun 14, 2023

Description
As of 0.13.5, a nonexistent gateway referenced by a virtual service causes external-dns to exit here, which means a developer could accidentally take down external-dns by deploying an invalid VirtualService.

Fixes #3628

Checklist

  • Unit tests updated
  • End user documentation updated

@k8s-ci-robot k8s-ci-robot added the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Jun 14, 2023
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 14, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @rumstead!

It looks like this is your first PR to kubernetes-sigs/external-dns 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/external-dns has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 14, 2023
@rumstead rumstead changed the title fix: #3628 extdns crashes when virtual service points to nonexistent … fix: extdns crashes when virtual service points to nonexistent … Jun 14, 2023
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/invalid-commit-message Indicates that a PR should not merge because it has an invalid commit message. label Jun 14, 2023
@johngmyers
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jun 16, 2023
Copy link
Contributor

@johngmyers johngmyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not crashing, it's refusing to reconcile. A better commit message would be something like "ignore VirtualServices which reference a nonexistent Gateway"

source/istio_virtualservice_test.go Outdated Show resolved Hide resolved
@rumstead
Copy link
Contributor Author

rumstead commented Jun 16, 2023

It's not crashing, it's refusing to reconcile. A better commit message would be something like "ignore VirtualServices which reference a nonexistent Gateway"

Can you elaborate on why you think the container isn’t crashing? It’s getting to the log.Fatal as described in the description of the PR

@johngmyers
Copy link
Contributor

Man, I even LGTMed that change to Fatalf. I suppose it could clear out any stuck cached state, but it seems overkill for something that could be transient. I'll not block on the commit message.

@szuecs
Copy link
Contributor

szuecs commented Jun 16, 2023

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rumstead, szuecs

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 Jun 16, 2023
Signed-off-by: rumstead <37445536+rumstead@users.noreply.github.com>

updating test

Update source/istio_virtualservice_test.go

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>

Update source/istio_virtualservice_test.go

Co-authored-by: John Gardiner Myers <jgmyers@proofpoint.com>
@johngmyers
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 17, 2023
@k8s-ci-robot k8s-ci-robot merged commit d468a33 into kubernetes-sigs:master Jun 17, 2023
10 of 11 checks passed
@rumstead rumstead deleted the fix/crashback-virtual-service-no-gateway branch June 17, 2023 16:13
@rumstead
Copy link
Contributor Author

Thanks for the quick turnaround and review @johngmyers and @szuecs

@eduardobaitello
Copy link

Is there any forecast for a release to be generated with this fix?

@rumstead
Copy link
Contributor Author

Yea, we are seeing this more and more as we roll out istio adoption. Would be great to have this released.

@eduardobaitello
Copy link

@rumstead the fix was included on v0.13.6 release

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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DNS sync stops in presence of any Virtual Service that points to nonexistent gateway
5 participants