-
Notifications
You must be signed in to change notification settings - Fork 170
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
APIcast hostname resolution issue #939
Comments
@estevaobk thank you! Great steps to reproduce. Here is some additional research: Using docker nameserver:
And using our dnsmasq:
We are starting dnsmasq with: That was done in b58bab8. We need to verify if that is still needed. |
@estevaobk as a workaround you can set proper search scope in /etc/resolv.conf like:
In plain docker that is possible by using |
@mikz That didn't work for me. I've added the nginx 'resolver' directive to conf/nginx.conf (127.0.0.11) and now my Docker hostnames are properly resolved. We are still on v3.0.0. Maybe my issue is not the same as above. Docker hostnames were not resolved by Lua. Similar to this issue: openresty/lua-resty-redis#59 Setting the RESOLVER env var to 127.0.0.11:53 did not work. @mikz I've also found your comment here: nmasse-itix/apicast-logger#2 (comment) Sorry for the confusion. Your answer was meant for newer versions. |
@ddevaal v3.0.0 is significantly different from now. The logic of resolving changed several times since then. |
Yes, this documentation issue is related #1373 |
[APIcast doesn't resolve hostname without a TLD (.)]
Version
Containers from both APIcast v3.2.0 and v3.3.0 (possibly reproduced on earlier versions as well):
Steps To Reproduce
NOTE: The steps below are being reproduced using the Docker implementation of APIcast.
$ docker network create --internal internal_network
$ docker container run --name webhost --network internal_network httpd
Create a new API calling "webhost" and using a self-managed APIcast:
3.1. Private Base URL: http://webhost:80
3.2. Staging and Production Public Base URL: http://localhost:8080
3.3. Update the Staging Environment and Promote to Production.
Deploy an APIcast self-managed container based on any of the Versions described above (in the example below, 'registry.access.redhat.com/3scale-amp23/apicast-gateway:latest' is being used):
$ docker container run --name apicast -e THREESCALE_PORTAL_ENDPOINT=https://<token>@<user>-admin.3scale.net registry.access.redhat.com/3scale-amp23/apicast-gateway:latest
$ docker network connect internal_network apicast
$ docker exec -it apicast bash
$ curl -X GET -I http://webhost:80
$ curl -X GET -I http://localhost:8080?user_key=<user_key>
$ curl -X GET -I http://webhost.internal_network
$ curl -X GET -I http://localhost:8080?user_key=<user_key>
Current Result
APIcast doesn't resolve hostname, only hostname.domain.
Expected Result
APIcast should resolve both hostname and hostname.domain.
Additional Information
Since the O.S. resolves both hostname and hosnamet.domain, we are able to isolate this issue to the APIcast name resolution.
Adding the host in /etc/hosts doesn't solve the issue.
The text was updated successfully, but these errors were encountered: