MAAS dhcp fails to start on up-to-date Xenial with MAAS built from source

Bug #1537789 reported by Ricardo Bánffy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Won't Fix
Critical
Unassigned
isc-dhcp (Ubuntu)
Fix Released
Critical
LaMont Jones

Bug Description

/var/log/kern.log

Jan 25 03:54:41 autopkgtest kernel: [ 598.488307] audit: type=1400 audit(1453712081.200:20): apparmor="DENIED" operation="capable" profile="/usr/sbin/dhcpd" pid=13381 comm="dhcpd" capability=0 capname="chown"

/var/log/syslog

Jan 25 05:21:37 autopkgtest systemd[1]: Starting MAAS instance of ISC DHCP server for IPv4...
Jan 25 05:21:37 autopkgtest systemd[1]: Started MAAS instance of ISC DHCP server for IPv4.
Jan 25 05:21:37 autopkgtest dhcpd[17722]: Can't chown new lease file: Operation not permitted
Jan 25 05:21:37 autopkgtest dhcpd[17722]:
Jan 25 05:21:37 autopkgtest dhcpd[17722]: If you think you have received this message due to a bug rather
Jan 25 05:21:37 autopkgtest dhcpd[17722]: than a configuration issue please read the section on submitting
Jan 25 05:21:37 autopkgtest dhcpd[17722]: bugs on either our web page at www.isc.org or in the README file
Jan 25 05:21:37 autopkgtest dhcpd[17722]: before submitting a bug. These pages explain the proper
Jan 25 05:21:37 autopkgtest dhcpd[17722]: process and the information we find helpful for debugging..
Jan 25 05:21:37 autopkgtest dhcpd[17722]:
Jan 25 05:21:37 autopkgtest dhcpd[17722]: exiting.
Jan 25 05:21:37 autopkgtest systemd[1]: maas-dhcpd.service: Main process exited, code=exited, status=1/FAILURE
Jan 25 05:21:37 autopkgtest systemd[1]: maas-dhcpd.service: Unit entered failed state.
Jan 25 05:21:37 autopkgtest systemd[1]: maas-dhcpd.service: Failed with result 'exit-code'.

root@autopkgtest:~# ls -l /var/lib/maas/dhcp/dhcpd.leases
-rw-r--r-- 1 maas maas 0 Jan 25 03:54 /var/lib/maas/dhcp/dhcpd.leases

Revision history for this message
Ricardo Bánffy (rbanffy) wrote :
  • logs Edit (120.2 KiB, application/x-tar)

Sorry. Precocious submit.

The machine is the CI environment. It's installed from a Xenial image that's fully updated and MAAS is built from source. Even though maas owns the lease file, there seems to be an issue with its ownership and apparmor blocking it.

Gavin Panella (allenap)
Changed in maas:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Ricardo Bánffy (rbanffy) wrote :

Small correction. This was running on a modified branch of lp:~maas-maintainers/maas/packaging. With the original packaging, root owns /var/lib/maas/dhcp/dhcpd.leases:

root@autopkgtest:~# ls -l /var/lib/maas/dhcp/dhcpd.leases
-rw-r--r-- 1 root root 0 Jan 25 05:55 /var/lib/maas/dhcp/dhcpd.leases

DHCP fails in both cases, with identical errors. Chowning it to dhcpd results in the same failure.

Revision history for this message
Ricardo Bánffy (rbanffy) wrote :

http://paste.ubuntu.com/14665284/ is a possible solution

affects: maas → isc-dhcp (Ubuntu)
affects: isc-dhcp (Ubuntu) → maas
Revision history for this message
LaMont Jones (lamont) wrote :

encountered with (and fixed in-situ under) 4.3.3-5ubuntu2

Changed in isc-dhcp (Ubuntu):
assignee: nobody → LaMont Jones (lamont)
Revision history for this message
LaMont Jones (lamont) wrote :

Fixed in 4.3.3-5ubuntu3

Revision history for this message
LaMont Jones (lamont) wrote :

And bug attributed in 4.3.3-5ubuntu4. :(

Changed in isc-dhcp (Ubuntu):
importance: Undecided → Critical
status: New → Fix Committed
LaMont Jones (lamont)
Changed in isc-dhcp (Ubuntu):
milestone: none → trusty-updates
milestone: trusty-updates → ubuntu-16.04
milestone: ubuntu-16.04 → trusty-updates
milestone: trusty-updates → ubuntu-16.04
Changed in isc-dhcp (Ubuntu Trusty):
milestone: none → trusty-updates
no longer affects: isc-dhcp (Ubuntu Trusty)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package isc-dhcp - 4.3.3-5ubuntu4

---------------
isc-dhcp (4.3.3-5ubuntu4) xenial; urgency=medium

  * Allow chown - PARANOIA means that dhcpd tries to chown the leases file
    for later use. LP: #1537789

 -- LaMont Jones <email address hidden> Mon, 25 Jan 2016 12:17:39 -0700

Changed in isc-dhcp (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Dear user,

This is an automated message.

We believe this bug report is no longer an issue in the latest version of MAAS. For such reason, we are making this issue as Won't Fix. If you believe this issue is still present in the latest version of MAAS, please re-open this bug report.

Changed in maas:
status: Triaged → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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