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

Proposed by Andres Rodriguez
Status: Merged
Approved by: Andres Rodriguez
Approved revision: no longer in the source branch.
Merged at revision: 1693
Proposed branch: lp:~andreserl/maas/maas_saucy_fix_commissioning
Merge into: lp:~maas-committers/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
Raphaël Badin (community) Approve
Gavin Panella (community) Approve
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.
Revision history for this message
Gavin Panella (allenap) wrote :

Tip top, nicely sleuthed.

review: Approve
Revision history for this message
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...

Revision history for this message
Raphaël Badin (rvb) wrote :

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

review: Approve
Revision history for this message
Raphaël Badin (rvb) wrote :

Btw, you need to fix the related test with something like http://paste.ubuntu.com/6215715/

Revision history for this message
Andres Rodriguez (andreserl) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/metadataserver/models/commissioningscript.py'
--- src/metadataserver/models/commissioningscript.py 2013-10-08 15:37:59 +0000
+++ src/metadataserver/models/commissioningscript.py 2013-10-09 22:33:23 +0000
@@ -257,6 +257,11 @@
257 fd.write('\n') # Ensure there's a newline.257 fd.write('\n') # Ensure there's a newline.
258 fd.write('# Configured by MAAS:\n')258 fd.write('# Configured by MAAS:\n')
259 fd.write('DAEMON_ARGS="-c -f -s -e -r"\n')259 fd.write('DAEMON_ARGS="-c -f -s -e -r"\n')
260 # Reload initctl configuration in order to make sure that the
261 # lldpd init script is available before restart, otherwise
262 # it might cause commissioning to fail. This is due bug
263 # (LP: #882147) in the kernel.
264 check_call(("initctl", "reload-configuration"))
260 check_call(("service", "lldpd", "restart"))265 check_call(("service", "lldpd", "restart"))
261266
262267
263268
=== modified file 'src/metadataserver/models/tests/test_commissioningscript.py'
--- src/metadataserver/models/tests/test_commissioningscript.py 2013-10-08 15:35:23 +0000
+++ src/metadataserver/models/tests/test_commissioningscript.py 2013-10-09 22:33:23 +0000
@@ -232,8 +232,11 @@
232 # lldpd is installed and restarted.232 # lldpd is installed and restarted.
233 self.assertEqual(233 self.assertEqual(
234 check_call.call_args_list,234 check_call.call_args_list,
235 [call(("apt-get", "install", "--yes", "lldpd")),235 [
236 call(("service", "lldpd", "restart"))])236 call(("apt-get", "install", "--yes", "lldpd")),
237 call(("initctl", "reload-configuration")),
238 call(("service", "lldpd", "restart"))
239 ])
237 # lldpd's config was updated to include an updated DAEMON_ARGS240 # lldpd's config was updated to include an updated DAEMON_ARGS
238 # setting. Note that the new comment is on a new line, and241 # setting. Note that the new comment is on a new line, and
239 # does not interfere with existing config.242 # does not interfere with existing config.