← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~matsubara/maas/dhcpd-workaround-raring into lp:~maas-maintainers/maas/qa-lab-tests

 

Diogo Matsubara has proposed merging lp:~matsubara/maas/dhcpd-workaround-raring into lp:~maas-maintainers/maas/qa-lab-tests.

Requested reviews:
  MAAS Maintainers (maas-maintainers)

For more details, see:
https://code.launchpad.net/~matsubara/maas/dhcpd-workaround-raring/+merge/147377

This branch updates the apparmor profile for dhcpd on raring to workaround bug 1107686
-- 
https://code.launchpad.net/~matsubara/maas/dhcpd-workaround-raring/+merge/147377
Your team MAAS Maintainers is requested to review the proposed merge of lp:~matsubara/maas/dhcpd-workaround-raring into lp:~maas-maintainers/maas/qa-lab-tests.
=== modified file 'maas-integration.py'
--- maas-integration.py	2013-02-04 13:56:27 +0000
+++ maas-integration.py	2013-02-08 14:45:27 +0000
@@ -291,6 +291,19 @@
 
     @timeout(60)
     def test_09_set_up_dhcp(self):
+        #XXX: matsubara Update apparmor profile on raring due to bug 1107686
+        if "raring" in platform.linux_distribution():
+            dhcpd_fd = open("/etc/apparmor.d/usr.sbin.dhcpd", "r+")
+            dhcpd_file = dhcpd_fd.read()
+            dhcpd_file = dhcpd_file.replace(
+                'network packet packet,',
+                'network packet packet,\n  network packet raw,')
+            dhcpd_fd.seek(0)
+            dhcpd_fd.write(dhcpd_file)
+            dhcpd_fd.close()
+            output, err = self._run_command(["service", "apparmor", "reload"])
+            self.assertThat(output, Contains('* Reloading AppArmor profiles'))
+
         output, err = self._run_maas_cli(["node-groups", "list"])
         node_groups = loads(output)
         output, err = self._run_maas_cli([