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

Add docker DNS resolver configuration option #14959

Open
5 of 9 tasks
jacobmaussocc opened this issue Mar 6, 2024 · 2 comments
Open
5 of 9 tasks

Add docker DNS resolver configuration option #14959

jacobmaussocc opened this issue Mar 6, 2024 · 2 comments

Comments

@jacobmaussocc
Copy link

Please confirm the following

  • I agree to follow this project's code of conduct.
  • I have checked the current issues for duplicates.
  • I understand that AWX is open source software provided for free and that I might not receive a timely response.

Feature type

New Feature

Feature Summary

USING DOCKER INSTALL

I was running into issues with my DNS not resolving inside of the UI or in the container exec.

When first setting up my environment I was unable to resolve the name of my hashicorp vault server when created the credentials for it, and I had to use the ip address of the server, this made it so the wildcard cert I use does not work.
this was the error when using the hostname

<urllib3.connection.HTTPSConnection object at 0x7ff9d15bee50>: Failed to establish a new connection: [Errno -2] Name or service not known

I fear I over thought a lot of stuff, but my current solution was to make a changed to the jinja template for rendering the docker compose to manually add

dns:
  - nameserver1
  - nameserver2

This worked just as expected, I was just wondering if there would be a better way to implement this feature, or it very well could be that I am honestly not all that well versed on docker, but I do not want all of my containers to have this functionality so I did not like the idea of changing the daemon. I would like if this was maybe included in the inventory file.

Select the relevant components

  • UI
  • API
  • Docs
  • Collection
  • CLI
  • Other

Steps to reproduce

Basic install to get error, edit jinja as noted for fix.

Current results

Currently, with no configuration I cannot resolve using the hosts /etc/resolv.conf

Sugested feature result

Add options for DNS configuration?

Additional information

I am young, and not familiar with a lot of this software I apologize if this is an elementary question, just trying to either learn or help.

@dmzoneill
Copy link
Member

@jacobmaussocc

Thank you for your feedback.

Can you provide the details of your host?
Some distros provide intermediate dns cachers, which give rise to problematic behaviours. (systemd-resolved/...). You might see that your /etc/resolve conf points to 127.0.0.1 which is an intermediate caching and resolver.

The reason I ask this is that per the docker documentation, docker is configured to use host DNS.
https://docs.docker.com/network/

There are any number of configuration scenarios and intermediate DNS cachers that could provide an undesired experience like the one you are describing.

In some cases system administrators turn off these local daemons and just maintain /etc/resolve with the appropriate upstream DNS servers.

I'm not suggesting you do this, but if you can provide a better understanding of your configuration, we might be able to provide better guidance with your particular setup.

docker-compose absolutely does provide for the type of request you are suggesting, that may very well be a good enhancement for AWX/tower/AAP.

If look forward to understanding this issue further.

@thedoubl3j
Copy link
Member

@jacobmaussocc @dmzoneill the docker-compose env is for development purposes only. If you are hitting this issue because you are trying to develop a feature for AWX, we are definitely happy to help debug that but the docker-compose environment is not built to persist. If this instance needs to persist, I would suggest installing via the operator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants