[2.3] get_enlist_preseed returns 127.0.0.1 for metadata_url
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Invalid
|
Undecided
|
Unassigned |
Bug Description
2.3.0-6434-
I'm debugging a problem where enlisting nodes get metadata_url=http://
This makes enlisting fail.
After some debugging, I found out that if you access that enlist-preseed URL like this, without a port number (10.0.5.5 is my maas server):
http://
You get:
metadata_url: http://
in the response, which is incorrect.
But if you access the service directly on its port number, like this:
http://
Then you get the correct response:
metadata_url: http://
I believe the error happens because in the former case apache is proxying the request to localhost:5240, and then maas' get_source_
That being said, I have two such maas servers: one a more recent install, and another one an old install that has been upgraded over time until it reached the 2.3.0 version. The enlisting problem is only happening in the old-upgraded-
cloud-config-url=http://
Which leads to the request being proxied by apache and then to the 127.0.0.1 ip in the metadata url that is returned.
I worked around it by setting the port number on both maas urls in /etc/maas/ rackd.conf and /etc/maas/ regiond. conf