MAAS Server ISO install fails when network is disconnected

Bug #1172566 reported by Nicholas Skaggs on 2013-04-25
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Release Notes for Ubuntu
Undecided
Andy Whitcroft
maas (Ubuntu)
Medium
Unassigned

Bug Description

Using today's server iso, the maas server will fail to install if no network is connected. It fails to dpkg-reconfigure maas-region-controller. see the attached tarball for the logs. This occurs on bare metal and VM.

== RELEASE NOTE TEXT ==

 * MAAS Server install fails without a network connection during install of maas-region-controller (LP: #1172566)

Nicholas Skaggs (nskaggs) wrote :
description: updated
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1172566

tags: added: iso-testing
Colin Watson (cjwatson) on 2013-04-25
affects: debian-installer (Ubuntu) → maas (Ubuntu)
Andy Whitcroft (apw) on 2013-04-25
Changed in ubuntu-release-notes:
status: New → In Progress
assignee: nobody → Andy Whitcroft (apw)
description: updated
Andy Whitcroft (apw) on 2013-04-25
description: updated
Changed in ubuntu-release-notes:
status: In Progress → Fix Released
Dave Walker (davewalker) wrote :

I am marking this medium, as I think it is a marginal use case of people that would want to install a network dependant application, without a network.

Thanks.

Changed in maas (Ubuntu):
status: New → Confirmed
importance: Undecided → Low
importance: Low → Medium
summary: - MAAS Server install fails when network is disconnected
+ MAAS Server ISO install fails when network is disconnected
Ryan Beisner (1chb1n) wrote :

Issue confirmed on Trusty daily ISO.

tags: added: trusty
Ryan Beisner (1chb1n) wrote :

More detail, see also attached tarball:
Apr 14 17:26:05 in-target: dpkg: error processing package maas-region-controller-min (--configure):
Apr 14 17:26:05 in-target: subprocess installed post-installation script returned error exit status 255
Apr 14 17:26:05 in-target: dpkg: dependency problems prevent configuration of maas-region-controller:
Apr 14 17:26:05 in-target: maas-region-controller depends on maas-region-controller-min (= 1.5+bzr2236-0ubuntu1); however:
Apr 14 17:26:05 in-target: Package maas-region-controller-min is not configured yet.
Apr 14 17:26:05 in-target:
Apr 14 17:26:05 in-target: dpkg: error processing package maas-region-controller (--configure):
Apr 14 17:26:05 in-target: dependency problems - leaving unconfigured
Apr 14 17:26:05 in-target: dpkg: dependency problems prevent configuration of maas:
Apr 14 17:26:05 in-target: maas depends on maas-region-controller; however:
Apr 14 17:26:05 in-target: Package maas-region-controller is not configured yet.
Apr 14 17:26:05 in-target:
Apr 14 17:26:05 in-target: dpkg: error processing package maas (--configure):
Apr 14 17:26:05 in-target: dependency problems - leaving unconfigured
Apr 14 17:26:05 in-target: dpkg: dependency problems prevent configuration of maas-dns:
Apr 14 17:26:05 in-target: maas-dns depends on maas-region-controller-min (= 1.5+bzr2236-0ubuntu1); however:
Apr 14 17:26:05 in-target: Package maas-region-controller-min is not configured yet.
Apr 14 17:26:05 in-target:
Apr 14 17:26:05 in-target: dpkg: error processing package maas-dns (--configure):
Apr 14 17:26:05 in-target: dependency problems - leaving unconfigured
Apr 14 17:26:05 in-target: Errors were encountered while processing:
Apr 14 17:26:05 in-target: maas-region-controller-min
Apr 14 17:26:05 in-target: maas-region-controller
Apr 14 17:26:05 in-target: maas
Apr 14 17:26:05 in-target: maas-dns
Apr 14 17:26:06 main-menu[220]: WARNING **: Configuring 'pkgsel' failed with error code 100
Apr 14 17:26:06 main-menu[220]: WARNING **: Menu item 'pkgsel' failed.

Scott Moser (smoser) wrote :

so the bug here is actually in 'get_default_route_ip' of the postinst for maas-region-controller-min and maas-region-controller.

They run with 'set -e' (which i'm never a fan of), and then have:

get_default_route_ip() {
   while read Iface Destination Gateway Flags RefCnt Use Metric Mask MTU Window IRTT; do [ "$Mask" = "00000000" ] && break
   done < /proc/net/route
   interface="$Iface"
   ipaddr=$(LC_ALL=C /sbin/ip -4 addr list dev "$interface" scope global)
   ipaddr=${ipaddr#* inet }
   ipaddr=${ipaddr%%/*}
        echo $ipaddr
}

That method has many issues.
a.) will stomp over global variables 'iface' 'Destination' Gateway, Flags .... and 'interface'. luckily it is only run in a subshell, so thats not really a problem here.
b.) if interface is empty it runs : ip -4 addr list dev "" scope global

ip fails, thus the method fails, and thus the dpkg postinst fails (thanks to set -e).

the simpllist fix is just to add:
 [ -n "$interface" ] || return 0

right after the loop that reads /proc/net/route.

Scott Moser (smoser) wrote :
Changed in maas (Ubuntu):
status: Confirmed → Triaged
Ryan Beisner (1chb1n) wrote :

Thanks, Scott. Further confirmation:

In previous no-network MAAS tests, the environment had no default gateway set.

So, the missing dependency claim is debunked. This is not a dependency, nor an ISO issue. Dependencies are indeed met on the Trusty ISO.

I confirmed this by successful installation of MAAS from ISO on a machine with a fully configured ip interface, but with no internet access.

The 'no-network MAAS install failure' issue that we're seeing is specifically caused by having no default gateway set.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers