Merge lp:~andreserl/maas/maas_saucy_fix_commissioning into lp:maas/trunk

Proposed by Andres Rodriguez on 2013-10-09
Status: Merged
Approved by: Andres Rodriguez on 2013-10-09
Approved revision: 1694
Merged at revision: 1693
Proposed branch: lp:~andreserl/maas/maas_saucy_fix_commissioning
Merge into: lp:maas/trunk
Diff against target: 33 lines (+10/-2)
2 files modified
src/metadataserver/models/ (+5/-0)
src/metadataserver/models/tests/ (+5/-2)
To merge this branch: bzr merge lp:~andreserl/maas/maas_saucy_fix_commissioning
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve on 2013-10-09
Raphaël Badin (community) Approve on 2013-10-09
Gavin Panella (community) 2013-10-09 Approve on 2013-10-09
Review via email:

Commit message

Fix commissioning by reload initctl configuration in order to make sure that the lldpd init script is available before restart, otherwise # it might cause commissioning to fail. This is due bug # (LP: #882147) in the kernel.

To post a comment you must log in.
Gavin Panella (allenap) wrote :

Tip top, nicely sleuthed.

review: Approve
MAAS Lander (maas-lander) wrote :
Download full text (14.4 KiB)

The attempt to merge lp:~andreserl/maas/maas_saucy_fix_commissioning into lp:maas failed. Below is the output from the failed tests.

Ign saucy-security InRelease
Ign saucy InRelease
Hit saucy-security Release.gpg
Ign saucy-updates InRelease
Hit saucy-security Release
Get:1 saucy Release.gpg [933 B]
Hit saucy-updates Release.gpg
Get:2 saucy Release [49.6 kB]
Hit saucy-updates Release
Hit saucy-security/main Sources
Hit saucy-security/universe Sources
Hit saucy-security/main amd64 Packages
Hit saucy-security/universe amd64 Packages
Hit saucy-security/main Translation-en
Hit saucy-security/universe Translation-en
Get:3 saucy/main Sources [1,010 kB]
Ign saucy-security/main Translation-en_US
Ign saucy-security/universe Translation-en_US
Get:4 saucy/universe Sources [6,109 kB]
Get:5 saucy/main amd64 Packages [1,255 kB]
Get:6 saucy/universe amd64 Packages [5,652 kB]
Hit saucy/main Translation-en
Get:7 saucy/universe Translation-en [3,887 kB]
Hit saucy-updates/main Sources
Hit saucy-updates/universe Sources
Hit saucy-updates/main amd64 Packages
Hit saucy-updates/universe amd64 Packages
Hit saucy-updates/main Translation-en
Hit saucy-updates/universe Translation-en
Ign saucy/main Translation-en_US
Ign saucy/universe Translation-en_US
Ign saucy-updates/main Translation-en_US
Ign saucy-updates/universe Translation-en_US
Fetched 18.0 MB in 8s (2,061 kB/s)
Reading package lists...
sudo DEBIAN_FRONTEND=noninteractive apt-get -y \
     --no-install-recommends install apache2 avahi-daemon avahi-utils bind9 bind9utils build-essential curl daemontools distro-info dnsutils firefox freeipmi-tools ipython isc-dhcp-common libjs-raphael libjs-yui3-full libjs-yui3-min libpq-dev make postgresql-9.1 python-amqplib python-avahi python-bzrlib python-celery python-convoy python-cssselect python-curtin python-dbus python-dev python-distro-info python-django python-django-piston python-django-south python-djorm-ext-pgarray python-docutils python-formencode python-httplib2 python-jinja2 python-lockfile python-lxml python-netaddr python-netifaces python-oauth pyt...

Raphaël Badin (rvb) wrote :

I just tested this fix in the lab… and it worked \o/. Well done Andres!

review: Approve
Raphaël Badin (rvb) wrote :

Btw, you need to fix the related test with something like

1694. By Andres Rodriguez on 2013-10-09

update test

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/metadataserver/models/'
2--- src/metadataserver/models/ 2013-10-08 15:37:59 +0000
3+++ src/metadataserver/models/ 2013-10-09 22:33:23 +0000
4@@ -257,6 +257,11 @@
5 fd.write('\n') # Ensure there's a newline.
6 fd.write('# Configured by MAAS:\n')
7 fd.write('DAEMON_ARGS="-c -f -s -e -r"\n')
8+ # Reload initctl configuration in order to make sure that the
9+ # lldpd init script is available before restart, otherwise
10+ # it might cause commissioning to fail. This is due bug
11+ # (LP: #882147) in the kernel.
12+ check_call(("initctl", "reload-configuration"))
13 check_call(("service", "lldpd", "restart"))
17=== modified file 'src/metadataserver/models/tests/'
18--- src/metadataserver/models/tests/ 2013-10-08 15:35:23 +0000
19+++ src/metadataserver/models/tests/ 2013-10-09 22:33:23 +0000
20@@ -232,8 +232,11 @@
21 # lldpd is installed and restarted.
22 self.assertEqual(
23 check_call.call_args_list,
24- [call(("apt-get", "install", "--yes", "lldpd")),
25- call(("service", "lldpd", "restart"))])
26+ [
27+ call(("apt-get", "install", "--yes", "lldpd")),
28+ call(("initctl", "reload-configuration")),
29+ call(("service", "lldpd", "restart"))
30+ ])
31 # lldpd's config was updated to include an updated DAEMON_ARGS
32 # setting. Note that the new comment is on a new line, and
33 # does not interfere with existing config.