maas-dhcp backport does not start on precise

Bug #1231693 reported by David Britton
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
High
Unassigned
Ubuntu Cloud Archive
Fix Released
High
Unassigned
maas (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

The upstart config contains this bit:

    # As of Quantal, the leases file must be owned by root:root (even though
    # the daemon will run under an unprivileged user).
    # In Precise, ownership was supposed to be dhcpd:dhcpd.
    mkdir -p $LEASES_DIR
    if [ "$RELEASE" = "precise" ]; then
        owner_group="root:root"
        dhcpd_owner_opts="-user dhcpd -group dhcpd"
    else
        owner_group="root:root"
        dhcpd_owner_opts="-user dhcpd -group dhcpd"
    fi

Which seems to cause this error:

root@peuchen:/var/log/upstart# /usr/sbin/dhcpd -f -d -4 -pf /run/maas/dhcp/dhcpd.pid -cf /etc/maas/dhcpd.conf -lf /var/lib/maas/dhcp/dhcpd.leases eth0
Internet Systems Consortium DHCP Server 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Can't open /var/lib/maas/dhcp/dhcpd.leases for append.

If I remove the custom "precise" clause from that if, things start up fine.

Related branches

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: [Bug 1231693] [NEW] maas-dhcp backport does not start on precise

Hi David!

Can you let us know what version of isc-dhcp are you using? Where did you
install Maas from?
On Sep 26, 2013 5:12 PM, "Launchpad Bug Tracker" <email address hidden>
wrote:

> You have been subscribed to a public bug by David Britton (davidpbritton):
>
> The upstart config contains this bit:
>
>
> # As of Quantal, the leases file must be owned by root:root (even
> though
> # the daemon will run under an unprivileged user).
> # In Precise, ownership was supposed to be dhcpd:dhcpd.
> mkdir -p $LEASES_DIR
> if [ "$RELEASE" = "precise" ]; then
> owner_group="root:root"
> dhcpd_owner_opts="-user dhcpd -group dhcpd"
> else
> owner_group="root:root"
> dhcpd_owner_opts="-user dhcpd -group dhcpd"
> fi
>
> Which seems to cause this error:
>
> root@peuchen:/var/log/upstart# /usr/sbin/dhcpd -f -d -4 -pf
> /run/maas/dhcp/dhcpd.pid -cf /etc/maas/dhcpd.conf -lf
> /var/lib/maas/dhcp/dhcpd.leases eth0
> Internet Systems Consortium DHCP Server 4.2.4
> Copyright 2004-2012 Internet Systems Consortium.
> All rights reserved.
> For info, please visit https://www.isc.org/software/dhcp/
> Can't open /var/lib/maas/dhcp/dhcpd.leases for append.
>
> If I remove the custom "precise" clause from that if, things start up
> fine.
>
> ** Affects: maas
> Importance: Undecided
> Status: New
>
> --
> maas-dhcp backport does not start on precise
> https://bugs.launchpad.net/bugs/1231693
> You received this bug notification because you are subscribed to the bug
> report.
>

Revision history for this message
David Britton (dpb) wrote :

Hey -- should have included that

ubuntu@peuchen:~$ apt-cache policy maas-dhcp
maas-dhcp:
  Installed: 1.4+bzr1551+dfsg-0ubuntu1~ctools0
  Candidate: 1.4+bzr1551+dfsg-0ubuntu1~ctools0
  Version table:
 *** 1.4+bzr1551+dfsg-0ubuntu1~ctools0 0
        500 http://ubuntu-cloud.archive.canonical.com/ubuntu/precise-updates/cloud-tools/main
amd64 Packages
        100 /var/lib/dpkg/status
     1.2+bzr1373+dfsg-0ubuntu1~12.04.2 0
        500 http://archive.ubuntu.com/ubuntu/ precise-updates/universe
amd64 Packages
     0.1+bzr482+dfsg-0ubuntu1 0
        500 http://archive.ubuntu.com/ubuntu/ precise/universe amd64
Packages
ubuntu@peuchen:~$

On Thu, Sep 26, 2013 at 3:18 PM, Andres Rodriguez
<email address hidden>wrote:

> Hi David!
>
> Can you let us know what version of isc-dhcp are you using? Where did you
> install Maas from?
> On Sep 26, 2013 5:12 PM, "Launchpad Bug Tracker" <
> <email address hidden>>
> wrote:
>
> > You have been subscribed to a public bug by David Britton
> (davidpbritton):
> >
> > The upstart config contains this bit:
> >
> >
> > # As of Quantal, the leases file must be owned by root:root (even
> > though
> > # the daemon will run under an unprivileged user).
> > # In Precise, ownership was supposed to be dhcpd:dhcpd.
> > mkdir -p $LEASES_DIR
> > if [ "$RELEASE" = "precise" ]; then
> > owner_group="root:root"
> > dhcpd_owner_opts="-user dhcpd -group dhcpd"
> > else
> > owner_group="root:root"
> > dhcpd_owner_opts="-user dhcpd -group dhcpd"
> > fi
> >
> > Which seems to cause this error:
> >
> > root@peuchen:/var/log/upstart# /usr/sbin/dhcpd -f -d -4 -pf
> > /run/maas/dhcp/dhcpd.pid -cf /etc/maas/dhcpd.conf -lf
> > /var/lib/maas/dhcp/dhcpd.leases eth0
> > Internet Systems Consortium DHCP Server 4.2.4
> > Copyright 2004-2012 Internet Systems Consortium.
> > All rights reserved.
> > For info, please visit https://www.isc.org/software/dhcp/
> > Can't open /var/lib/maas/dhcp/dhcpd.leases for append.
> >
> > If I remove the custom "precise" clause from that if, things start up
> > fine.
> >
> > ** Affects: maas
> > Importance: Undecided
> > Status: New
> >
> > --
> > maas-dhcp backport does not start on precise
> > https://bugs.launchpad.net/bugs/1231693
> > You received this bug notification because you are subscribed to the bug
> > report.
> >
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1231693
>
> Title:
> maas-dhcp backport does not start on precise
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1231693/+subscriptions
>

--
David Britton <email address hidden>

David Britton (dpb)
tags: added: theme-oil
Scott Moser (smoser)
Changed in maas:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Scott Moser (smoser) wrote :

The reason for this would be that that start up sript is checking the lsb_release isnt sufficient as the cloud archive has a newer dhcpd so it changes the behavior there.

This patch just tries harder to figure out what version of dhcpd is running rather than what version of ubuntu is running.

Revision history for this message
Scott Moser (smoser) wrote :

Whoops. suggested patch again.

Revision history for this message
David Britton (dpb) wrote : Re: [Bug 1231693] Re: maas-dhcp backport does not start on precise

I hand patched the file on the system with the latest patch from Scott, and
that works for this environment.

On Thu, Sep 26, 2013 at 6:09 PM, Scott Moser <email address hidden> wrote:

> Whoops. suggested patch again.
>
> ** Patch added: "suggested patch"
>
> https://bugs.launchpad.net/maas/+bug/1231693/+attachment/3843532/+files/out.diff
>
> ** Patch removed: "suggested patch"
>
> https://bugs.launchpad.net/maas/+bug/1231693/+attachment/3843525/+files/out.diff
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1231693
>
> Title:
> maas-dhcp backport does not start on precise
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1231693/+subscriptions
>

--
David Britton <email address hidden>

Revision history for this message
Gavin Panella (allenap) wrote :

Out of interest, why do we fix this ownership issue in MAAS and not ISC dhcpd?

Revision history for this message
Scott Moser (smoser) wrote :

Gavin, I dont' know. I can't find an original bug that explains that code in the upstart job. Its attributed to julian.

It seems like we were probably responding to this bug:
https://bugzilla.redhat.com/show_bug.cgi?id=866714
The patch for a fix is at
http://pkgs.fedoraproject.org/cgit/dhcp.git/commit/?id=58a3b6ca5db9af95ebfa1184fd1089da3c4a825b
The patch mentions they filed upstream bug 25806 (isc-dhcp has no public bug tracker that I can find).

Reading that bug, and thinking about this more, it seems like the 'old_dhcpd' route was actually correct
I recall that we were seeing app armor fallout.

This does make me feel like we're going to possibly be seeing this again as dhcpd really should handle it inside itself.

So, we *should* fix isc-dhcpd, but thats not going to make life any easier.

Revision history for this message
Scott Moser (smoser) wrote :

I filed bug 1231988 for the isc-dhcp-server issue.
Note, isc-dhpc-server is consistent among itself, so the package itself gets it right. The problem for maas is that we're now trying to run with 2 different versions of the package, so our upstart job has to have knowledge of both (and in the future possibly 3) conditions.

Scott Moser (smoser)
Changed in cloud-archive:
status: New → Confirmed
importance: Undecided → High
Changed in maas (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
tags: added: patch
Revision history for this message
Scott Moser (smoser) wrote :

complex patch that seemingly works, but we've decided not to do this.

cloud-archive will deliver isc-dhcp-server of quantal version (same as saucy) to 12.04.
maas packages will not be supported on 12.04 without cloud archive.

This simplifies the code dramatically, and means we can just revert to the "saucy working" code.

Changed in maas:
status: Confirmed → Invalid
Changed in cloud-archive:
status: Confirmed → Fix Released
Changed in maas (Ubuntu):
status: Confirmed → Fix Released
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.