maas_url not returned to the UI

Bug #1926140 reported by Alberto Donato
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Björn Tillenius

Bug Description

The config.list websocket handler always returns "http://localhost:5240/MAAS" as "maas_url" value.

Currently the MAAS url selected at init time is only written to the regiond.conf file, not to the database.
The config websocket handler module has some code to add it from reading it there, but it's not actually used.
Also, the value is only read at startup, and might be set to different values on different controllers.

I think we should have the value set in the database, and fall back to the request url if it isn't (e.g. if you have multiple controllers with no reverseproxy in front)

Related branches

Revision history for this message
Björn Tillenius (bjornt) wrote :

The issue is that websocket handler (maasserver/websocket/handlers/config.py) tries to add the maas_url from regiond.conf to CONFIG_ITEMS. But the problem is that CONFIG_ITEMS only defines which config items are editable, it doesn't define the actual values.

So later on, the handler reads all the keys from CONFIG_ITEMS, but then reads the value from the database (which won't exist and return the default "localhost").

Eventually, we want to remove maas_url from regiond.conf and have it in the database, since maas_url is meant to specify the public URL to the MAAS deployment.

Deprecating maas_url in regiond.conf might be bit tricky, but for now we could have the region sync the value to the database. That would fix this bug, and then we can deal with deprecating maas_url in regiond.conf later.

Considering this should be an easy fix, let's try to get this done for 3.0.

Changed in maas:
milestone: none → 3.0.0-rc1
Changed in maas:
assignee: nobody → Björn Tillenius (bjornt)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers