maas-region-controller-min overwrites changes to /etc/maas/

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

Bug Description

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


I then upgraded maas and the incorrect value appeared again.

so easy recreate is:
apt-get install maas-region-controller-min
edit /etc/maas/
 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/
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 = "",' /etc/maas/

$ sudo diff -u /etc/maas/ /etc
--- /etc/maas/ 2014-04-10 18:01:50.653305999 +0000
+++ /etc/maas/ 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.

 # 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/

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: 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 :

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

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