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

RDMO not reachable if via Docker host IP or if Docker host's hostname is not "rdmo" #2

Closed
kaibutsu opened this issue Jun 21, 2019 · 2 comments

Comments

@kaibutsu
Copy link

kaibutsu commented Jun 21, 2019

First let me say thank you for making this nice piece of software and dockerizing it!

When trying to deploy RDMO in our environment we weren't able to access our Docker host via URL as the hostname was not made available to the DNS so we tried to access it via IP address. This led to HTTP 400 errors (Bad Request) as the IP was not listed under ALLOWED_HOSTS in template_local.py:

ALLOWED_HOSTS = ['localhost', 'ip6-localhost', '127.0.0.1', '[::1]', 'rdmo']

The same error occurs if the Docker host's hostname differs from "rdmo".

@triole
Copy link
Member

triole commented Jun 24, 2019

Thanks for the compliments.

The issue described is something we need to think about. My first impression is being a little unsure about how I could contribute to fix the problem. The ALLOWED_HOSTS setting is a part of Django and serving security matters. As it would not be a good idea to remove it or use a wildcard to allow everything, we might need to think about what to add to the list to make the setup a little easier. Basically there are two options which unfortunately immediately lead to two problems which boil down to the question what to add to the list.

  1. IP address: The docker containers do not have static IP addresses. Their IPs might differ from host to host. So what to add? Of course I could assign static IPs but I do not consider this being a good option because it could lead to address range clashes depending on docker host setups.
  2. Hostname: I am unable to anticipate the hostname an RDMO docker setup might be using which is why I couldn't know what to add.

The best idea I have at the moment is to write a remark into the readme.md that the local.py needs to be adjusted to the specific needs. I suppose my misjudgement was taking this for being clear because it is mentioned in the RDMO documentation.

Or do you have any better idea?

@triole
Copy link
Member

triole commented Jun 26, 2019

I decided to move the ALLOWED_HOSTS setting into the variables.env to raise awareness that there is something the needs to be adjusted. Therefore I consider this ticket being ready to be closed.

@triole triole closed this as completed Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants