[1.9,2.x] doesn't let you set a database port

Bug #1613862 reported by Andreas Hasenack
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Unassigned
1.9
Won't Fix
Critical
Unassigned
2.0
Fix Released
Critical
Unassigned

Bug Description

I have a situation where I need MAAS to talk to postgresql on port 5433 instead of the default 5432.

In MAAS 1.8, this was exposed in the django settings file in /etc/maas.

In MAAS 1.9, the closest setting file is /etc/maas/regiond.conf, but it has no database_port setting, just host and some others:
atabase_host: localhost
database_name: maasdb
database_pass: secret
database_user: maas
maas_url: http://10.245.200.25/MAAS

maas/settings.py has an empty setting for it:
    DATABASES = {
        'default': {
            'ENGINE': 'django.db.backends.postgresql_psycopg2',
            'NAME': config.database_name,
            'USER': config.database_user,
            'PASSWORD': config.database_pass,
            'HOST': config.database_host,
            'PORT': '',
        }

And maasserver/config.py needs to have database_port in RegionConfiguration, then we can add it to the settings file above.

Tags: landscape

Related branches

tags: removed: kanban-cross-team
summary: - MAAS 1.9 doesn't let you set a database port
+ [1.9,2.x] doesn't let you set a database port
Changed in maas:
milestone: 2.1.0 → 2.1.1
Changed in maas:
milestone: 2.1.1 → 2.1.2
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

Remote bug watches

Bug watches keep track of this bug in other bug trackers.