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

Watcher Refresh failure crashes Retina agent #565

Closed
anubhabMajumdar opened this issue Jul 26, 2024 · 0 comments · Fixed by #576
Closed

Watcher Refresh failure crashes Retina agent #565

anubhabMajumdar opened this issue Jul 26, 2024 · 0 comments · Fixed by #576
Assignees
Labels
area/controllers good first issue Good for newcomers help wanted Extra attention is needed lang/go The Go Programming Language priority/1 P1

Comments

@anubhabMajumdar
Copy link
Contributor

Describe the bug

Expected behavior
Single failure to find ApiServerIPs shouldn't crash agent

Screenshots
If applicable, add screenshots to help explain your problem.

Platform (please complete the following information):

  • OS: Linux
  • Kubernetes Version: All
  • Host: AKS
  • Retina Version: Current

Additional context
Add any other context about the problem here.

@anubhabMajumdar anubhabMajumdar added good first issue Good for newcomers help wanted Extra attention is needed lang/go The Go Programming Language area/controllers priority/1 P1 labels Jul 26, 2024
@jimassa jimassa linked a pull request Jul 31, 2024 that will close this issue
7 tasks
github-merge-queue bot pushed a commit that referenced this issue Aug 20, 2024
# Description

This PR modifies the APIServer watcher to improve error handling and
optimize performance:

1. **Error Handling**: Instead of returning a resolution error to the
caller, watcher now retries the host lookup, after 3 refresh, if we
still can't resolve the apiserver IP, we bail and return the error to
the watcher manager.
2. **Optimization**: Moved the hostname retrieval to the initialization
function. This change ensures that the hostname is obtained once during
initialization and not on every refresh, as the hostname does not
change.

## Related Issue

[#565](#565)

If this pull request is related to any issue, please mention it here.
Additionally, make sure that the issue is assigned to you before
submitting this pull request.

## Checklist

- [x] I have read the [contributing
documentation](https://retina.sh/docs/contributing).
- [x] I signed and signed-off the commits (`git commit -S -s ...`). See
[this
documentation](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification)
on signing commits.
- [x] I have correctly attributed the author(s) of the code.
- [x] I have tested the changes locally.
- [x] I have followed the project's style guidelines.
- [x] I have updated the documentation, if necessary.
- [ ] I have added tests, if applicable.

## Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes
made.

## Additional Notes

Add any additional notes or context about the pull request here.

---

Please refer to the [CONTRIBUTING.md](../CONTRIBUTING.md) file for more
information on how to contribute to this project.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/controllers good first issue Good for newcomers help wanted Extra attention is needed lang/go The Go Programming Language priority/1 P1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants