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
Resolve HOST to ADDRESS only if ADDRESS is not already set #1114
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This sounds good to me, but I am not in favor of backporting immediately to 1.7. I would first give it a chance in master, then if we validate that the behavior is unchanged in a default setup maybe backport it for larger scale testing. |
Another review is more than welcome :) |
Conflicts with most of the things done in #940. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thanks for this PR, I imagine functionality like this is most welcome. I've left some comments that reflect my opinions. But you know what they say about opinions ;). Anyway, it's open to discussion. |
@muhlemmer I wrote that PR before #940 was merged. I will rethink and rewrite it when I understand fully why the hosts are resolved at all. IMO hosts should not be resolved at startup at all because it breaks service discovery on both, docker and kubernetes. |
This comment has been minimized.
This comment has been minimized.
Pull request has been modified.
This comment has been minimized.
This comment has been minimized.
Thanks for submitting this pull request. bors try Note: if this build fails, read this. |
@muhlemmer Looks like I broke my test system with a combination of too many different services from different pull requests. I try to fix it to give you feedback. I'm quite busy this weekend, so it might take a few days. |
tryBuild succeeded |
@muhlemmer I got the system running again, now replacing the services one by one with my builds for #1114.
works (inbound+outbound mail)
works (inbound+outbound mail)
(i have no webmail set up, so i just set the variable it to localhost) Fails. Reason is that nginx resolver requires full qualified domain names. Updated the environment for nginx:
works (inbound+outbound mail, webui)
fails because nginx expects an ip address as response from the auth server, not a hostname. Modified the admin code: if it's a host, it is resolved on demand for each request. works (inbound+outbound mail, webui)
works (inbound+outbound mail) |
Thanks for submitting this pull request. bors try Note: if this build fails, read this. |
tryBuild succeeded |
Thanks for submitting this pull request. bors try Note: if this build fails, read this. |
tryBuild succeeded |
Thanks for submitting this pull request. bors try Note: if this build fails, read this. |
tryBuild failed |
bors try |
tryBuild succeeded |
return hostname, port | ||
|
||
@tenacity.retry(stop=tenacity.stop_after_attempt(100), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not like this here, I would have prevered something more generic on the path to getting back to resolving things dynamically. But I guess it is a necessary evil toward it :)
bors r+ |
1114: Resolve HOST to ADDRESS only if ADDRESS is not already set r=mergify[bot] a=micw ## What type of PR? bug-fix ## What does this PR do? ~Makes the rsolving from hosts to ips at startup configurable~ I rewrote the pull request after #940 was merged. Now it resolves HOSTs to ADDRESSes only of ADDRESSes are not already set. So on kubernetes we can jsut set the address and have working service discovery. ### Related issue(s) - closes #1113 ## Prerequistes ~Minor change, backward compatible~ Changelog will be added Co-authored-by: Michael Wyraz <michael@wyraz.de>
Build succeeded |
What type of PR?
bug-fix
What does this PR do?
Makes the rsolving from hosts to ips at startup configurableI rewrote the pull request after #940 was merged. Now it resolves HOSTs to ADDRESSes only of ADDRESSes are not already set. So on kubernetes we can jsut set the address and have working service discovery.
Related issue(s)
Prerequistes
Minor change, backward compatibleChangelog will be added