fail to install maas-dhcp in a container

Bug #1197641 reported by Jian Wen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

As we can see from bug 978297.
In precise, apparmor doesn't start in a container.
So in debian/maas-dhcp.postinst and debian/maas-dhcp.postinst, we should
not call the apparmor_parser command in a container.

/bin/running-in-container is used in /etc/init.d/apparmor to find out if it is running in a container.
ubuntu@ubuntu-lxc-virtual-maas-0:~$ dpkg -S /bin/running-in-container
upstart: /bin/running-in-container

install log

2013-07-03 14:24:28,334 unit:virtual-maas/0: hook.output INFO: Setting up maas-dhcp (1.2+bzr1373+dfsg-0ubuntu1~12.04.1) ...
2013-07-03 14:24:29,614 unit:virtual-maas/0: hook.output ERROR: Unable to open /sys/kernel/security/apparmor/.replace - Permission denied
2013-07-03 14:24:29,616 unit:virtual-maas/0: hook.output ERROR: apparmor_parser: Unable to replace "/usr/sbin/dhcpd".
2013-07-03 14:24:29,617 unit:virtual-maas/0: hook.output ERROR: Permission denied; attempted to load a profile while confined?
2013-07-03 14:24:29,623 unit:virtual-maas/0: hook.output ERROR: Warning failed to create cache: usr.sbin.dhcpd
2013-07-03 14:24:29,631 unit:virtual-maas/0: hook.output INFO: Setting up python-bson-ext (2.2-4~cloud0) ...
2013-07-03 14:24:29,641 unit:virtual-maas/0: hook.output ERROR: dpkg: error processing maas-dhcp (--configure):
 subprocess installed post-installation script returned error exit status 234
dpkg: dependency problems prevent configuration of maas-dns:
 maas-dns depends on maas-dhcp (= 1.2+bzr1373+dfsg-0ubuntu1~12.04.1); however:
  Package maas-dhcp is not configured yet.
dpkg: error processing maas-dns (--configure):
 dependency problems - leaving unconfigured

Changed in maas (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Note that as a workaround you can run your container unconfined, and hopefully soon it will be possible to use stacked apparmor profiles.

Revision history for this message
Jian Wen (wenjianhn) wrote :

Thanks for the workaround.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.