maas-region-controller-min overwrites changes to /etc/maas/maas_local_settings.py

Bug #1306178 reported by Scott Moser on 2014-04-10
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
High
Andres Rodriguez
maas (Ubuntu)
Undecided
Unassigned

Bug Description

I installed maas. it picked one IP address for the maas region controller that happened to be wrong (192.168.1.25), and set that in
/etc/maas/maas_local_settings.py and restarted apache so it was fixed:

DEFAULT_MAAS_URL = "http://192.168.1.2/MAAS"

I then upgraded maas and the incorrect value appeared again.

so easy recreate is:
apt-get install maas-region-controller-min
edit /etc/maas/maas_local_settings.py
 apt-get install --reinstall maas-region-controller-min

the changes should be kept, but they're thrown away.

$ dpkg-query --show maas-region-controller-min
maas-region-controller-min 1.5+bzr2236+2237+274~ppa0~ubuntu14.04.1

Scott Moser (smoser) wrote :

actually reproduce is:

apt-get install maas-region-controller-min
edit /etc/maas/maas_local_settings.py
dpkg-reocnfigure maas-region-controller-min

changes gone.

Changed in maas:
assignee: nobody → Andres Rodriguez (andreserl)
Scott Moser (smoser) wrote :

$ apt-get install maas-region-controller-min --assume-yes --quiet
$ sudo sed -i.smdist 's,^DEFAULT_MAAS_URL = .*$,DEFAULT_MAAS_URL = "http://127.0.1.2/MAAS",' /etc/maas/maas_local_settings.py

$ sudo diff -u /etc/maas/maas_local_settings.py.smdist /etc
/maas/maas_local_settings.py
--- /etc/maas/maas_local_settings.py.smdist 2014-04-10 18:01:50.653305999 +0000
+++ /etc/maas/maas_local_settings.py 2014-04-10 18:04:51.445305999 +0000
@@ -4,7 +4,7 @@
 # Default URL specifying protocol, host, and (if necessary) port where
 # systems in this MAAS can find the MAAS server. Configuration can, and
 # probably should, override this.
-DEFAULT_MAAS_URL = "http://10.55.61.17/MAAS"
+DEFAULT_MAAS_URL = "http://127.0.1.2/MAAS"

 # Absolute path to the directory static files should be collected to.
 STATIC_ROOT = '/usr/share/maas/web/static/'

$ sudo dpkg-reconfigure maas-region-controller-min
$ sudo grep DEFAULT_MAAS_URL /etc/maas/maas_local_settings.py
DEFAULT_MAAS_URL = "http://10.55.61.17/MAAS"

Changed in maas:
status: New → Confirmed
importance: Undecided → High
Scott Moser (smoser) wrote :

it seems that if you 'dpkg-reconfigure maas-region-controller' then it gets set correctly and doesn't get throw away on subsequent update.

Diogo Matsubara (matsubara) wrote :

I raised this issue in one of my upgrade tests (Filed bug 1297942 for it). The discussion and rationale to invalidate the bug is here: https://lists.launchpad.net/private-canonical-maas/msg01052.html. Basically users shouldn't update the DEFAULT_MAAS_URL directly, rather use dpkg-reconfigure or set the value with a seed file and debconf-set-selections.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in maas (Ubuntu):
status: New → Confirmed
Scott Moser (smoser) wrote :

Diogo,
  "debconf is not a registry" is the accepted debian response to the suggestion that "users should dpkg-reconfigure".

http://lintian.debian.org/tags/debconf-is-not-a-registry.html
http://debian.2.n7.nabble.com/debconf-as-a-registry-td3113532.html

Diogo Matsubara (matsubara) wrote :

Scott, thanks for the information. I wasn't aware of that.
Given the new rationale, I think we can mark this bug as triaged.

Changed in maas:
status: Confirmed → Triaged
Christian Reis (kiko) on 2015-02-04
Changed in maas:
milestone: none → 1.7.2
Changed in maas:
milestone: 1.7.2 → 1.7.3
Changed in maas:
status: Triaged → Fix Committed
milestone: 1.7.3 → 1.9.0
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers