maas-dns fails to install due to missing config file for bind9

Bug #1346538 reported by Mike McCracken
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
maas (Ubuntu)
Fix Released
High
Unassigned

Bug Description

This may be due to an earlier partial install, but ideally the install scripts would be able to handle that case correctly.

Somehow I've gotten into a state where dpkg is trying to install bind9 before maas-dns, and it is finding maas specific config file edits in /etc/bind/named.conf, pointing to files that do not exist, because maas-dns is not (fully?) installed yet.

output from installing maas, maas-dhcp and maas-dns as dependencies of cloud-installer:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up bind9 (1:9.9.5.dfsg-3) ...
 * Starting domain name service... bind9 [fail]
invoke-rc.d: initscript bind9, action "start" failed.
dpkg: error processing package bind9 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of maas-dns:
 maas-dns depends on bind9; however:
  Package bind9 is not configured yet.

dpkg: error processing package maas-dns (--configure):
 dependency problems - leaving unconfigured
Setting up maas-dhcp (1.6.0+bzr2539-0ubuntu1~beta6~ppa1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          maas-dhcp-server stop/pre-start, process 2438
Setting up maas-cluster-controller (1.6.0+bzr2539-0ubuntu1~beta6~ppa1) ...
 * Restarting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
                                                                                                                                              [ OK ]
maas-pserv start/running, process 2693
maas-cluster-celery start/running, process 2728

=== at this point, it errors out.

looking at /var/log/syslog, we see this:

Jul 21 15:03:47 blackbox named[2363]: ----------------------------------------------------
Jul 21 15:03:47 blackbox named[2363]: BIND 9 is maintained by Internet Systems Consortium,
Jul 21 15:03:47 blackbox named[2363]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Jul 21 15:03:47 blackbox named[2363]: corporation. Support and training for BIND 9 are
Jul 21 15:03:47 blackbox named[2363]: available at https://www.isc.org/support
Jul 21 15:03:47 blackbox named[2363]: ----------------------------------------------------
Jul 21 15:03:47 blackbox named[2363]: adjusted limit on open files from 4096 to 1048576
Jul 21 15:03:47 blackbox named[2363]: found 4 CPUs, using 4 worker threads
Jul 21 15:03:47 blackbox named[2363]: using 4 UDP listeners per interface
Jul 21 15:03:47 blackbox named[2363]: using up to 4096 sockets
Jul 21 15:03:47 blackbox named[2363]: loading configuration from '/etc/bind/named.conf'
Jul 21 15:03:47 blackbox named[2363]: /etc/bind/named.conf.options:2: open: /etc/bind/maas/named.conf.options.inside.maas: file not found
Jul 21 15:03:47 blackbox named[2363]: loading configuration: file not found
Jul 21 15:03:47 blackbox named[2363]: exiting (due to fatal error)

=== and further investigation shows that /etc/bind/maas exists but is empty:

% ls -l /etc/bind/maas/
total 0

Related branches

Revision history for this message
Mike McCracken (mikemc) wrote :

FWIW, a workaround that worked for me was to remove the line in /etc/bind/named.conf that said 'include "/etc/bind/maas/named.conf.options.inside.maas"; ', and then reinstall bind9, which then reinstalled maas-dns, and everything was populated in the correct order.

summary: - maas-dns fails due to missing config file for bind9
+ maas-dns fails to install due to missing config file for bind9
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Weird, not sure how after removing the old package it hasn't purged the configs. Anyway, packaging bug.

no longer affects: maas
Changed in maas (Ubuntu):
status: New → Confirmed
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Can you please provide an step-by-step on how to reproduce this bug?

Thanks

Revision history for this message
Adam Stokes (adam-stokes) wrote :

Potentional fix attached as an MP along with reproducer steps. I've bumped the importance to get further attention on this.

Thank you,
Adam

Changed in maas (Ubuntu):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package maas - 1.7.0~beta8+bzr3272-0ubuntu1

---------------
maas (1.7.0~beta8+bzr3272-0ubuntu1) utopic; urgency=medium

  * New Upstream Release, Beta 8 bzr 3272.
    - Maintain backward compatibility with status codes to not break
      client MAAS API users. (LP: #1383609)
    - Allow users to disable DHCP NIC scanning during commissioning otherwise
      this can lead machines not being able to commission (LP: #1383384)
    - Ensure that MAAS can correctly download, and install HWE Kernels, and
      not crash in the process. (LP: #1357532, LP: #1382281)
    - Add a lock to ensure we don't give the same 2 systems to two different
      users when acquiring a machine. (LP: #1382575)

  [ Michael McCracken ]
  * debian/maas-dns.postrm: ensure named.conf is cleaned of maas
    includes (LP: #1346538)
 -- Andres Rodriguez <email address hidden> Wed, 22 Oct 2014 12:55:08 -0400

Changed in maas (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Andres Rodriguez (andreserl) wrote :

This has been tested and verified to work accordingly.

tags: added: verification-done
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.