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/commissioningscript.py (+5/-0)
src/metadataserver/models/tests/test_commissioningscript.py (+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: mp+190244@code.launchpad.net

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 http://security.ubuntu.com saucy-security InRelease
Ign http://nova.clouds.archive.ubuntu.com saucy InRelease
Hit http://security.ubuntu.com saucy-security Release.gpg
Ign http://nova.clouds.archive.ubuntu.com saucy-updates InRelease
Hit http://security.ubuntu.com saucy-security Release
Get:1 http://nova.clouds.archive.ubuntu.com saucy Release.gpg [933 B]
Hit http://nova.clouds.archive.ubuntu.com saucy-updates Release.gpg
Get:2 http://nova.clouds.archive.ubuntu.com saucy Release [49.6 kB]
Hit http://nova.clouds.archive.ubuntu.com saucy-updates Release
Hit http://security.ubuntu.com saucy-security/main Sources
Hit http://security.ubuntu.com saucy-security/universe Sources
Hit http://security.ubuntu.com saucy-security/main amd64 Packages
Hit http://security.ubuntu.com saucy-security/universe amd64 Packages
Hit http://security.ubuntu.com saucy-security/main Translation-en
Hit http://security.ubuntu.com saucy-security/universe Translation-en
Get:3 http://nova.clouds.archive.ubuntu.com saucy/main Sources [1,010 kB]
Ign http://security.ubuntu.com saucy-security/main Translation-en_US
Ign http://security.ubuntu.com saucy-security/universe Translation-en_US
Get:4 http://nova.clouds.archive.ubuntu.com saucy/universe Sources [6,109 kB]
Get:5 http://nova.clouds.archive.ubuntu.com saucy/main amd64 Packages [1,255 kB]
Get:6 http://nova.clouds.archive.ubuntu.com saucy/universe amd64 Packages [5,652 kB]
Hit http://nova.clouds.archive.ubuntu.com saucy/main Translation-en
Get:7 http://nova.clouds.archive.ubuntu.com saucy/universe Translation-en [3,887 kB]
Hit http://nova.clouds.archive.ubuntu.com saucy-updates/main Sources
Hit http://nova.clouds.archive.ubuntu.com saucy-updates/universe Sources
Hit http://nova.clouds.archive.ubuntu.com saucy-updates/main amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com saucy-updates/universe amd64 Packages
Hit http://nova.clouds.archive.ubuntu.com saucy-updates/main Translation-en
Hit http://nova.clouds.archive.ubuntu.com saucy-updates/universe Translation-en
Ign http://nova.clouds.archive.ubuntu.com saucy/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com saucy/universe Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com saucy-updates/main Translation-en_US
Ign http://nova.clouds.archive.ubuntu.com 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 http://paste.ubuntu.com/6215715/

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/commissioningscript.py'
2--- src/metadataserver/models/commissioningscript.py 2013-10-08 15:37:59 +0000
3+++ src/metadataserver/models/commissioningscript.py 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"))
14
15
16
17=== modified file 'src/metadataserver/models/tests/test_commissioningscript.py'
18--- src/metadataserver/models/tests/test_commissioningscript.py 2013-10-08 15:35:23 +0000
19+++ src/metadataserver/models/tests/test_commissioningscript.py 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.