network-manager uses wrong path for dhclient lease

Bug #329105 reported by Jamie Strandboge
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Fix Released
High
Alexander Sack
Jaunty
Fix Released
High
Alexander Sack

Bug Description

Binary package hint: network-manager

On up to date Jaunty, network-manager calls dhclient with:
/sbin/dhclient -d -sf /usr/lib/NetworkManager/nm-dhcp-client.action -pf /var/run/dhclient-eth1.pid -lf /var/lib/dhclient/dhclient-eth1.lease -cf /var/run/nm-dhclient-eth1.conf eth1

Which causes this error in daemon.log:
dhclient: can't create /var/lib/dhclient/dhclient-eth1.lease: No such file or directory

On Jaunty (at least), the leases are stored in /var/lib/dhcp3/. Eg "/var/lib/dhcp3/dhclient.eth0.leases"

Revision history for this message
Jonas Pedersen (jonasped) wrote :

I can confirm this issue. I see two ways of solving this.
1. Change the -lf option to the correct path.
2. make /var/lib/dhclient directory during installation.

I think option 1 is the correct way to solve this because running dhclient manually without -lf option puts the lease file in /var/dhcp3 directory.

When I get a bit more time one of the next couple of days I will create a patch for this.

Changed in network-manager:
status: New → Confirmed
assignee: nobody → jonasped
status: Confirmed → In Progress
Revision history for this message
Alexander Sack (asac) wrote :

taking over.

Changed in network-manager:
assignee: jonasped → asac
importance: Undecided → High
status: In Progress → Triaged
Revision history for this message
Alexander Sack (asac) wrote :

Jonas, if you want to prepare a patch, just go ahead. otherwise i will do this for jaunty.

Revision history for this message
Alexander Sack (asac) wrote :

oh. maybe wait a few more days and do the patch against 0.7.1 which will end up in jaunty soonish.

Revision history for this message
Jonas Pedersen (jonasped) wrote : Re: [Bug 329105] Re: network-manager uses wrong path for dhclient lease

Alexander Sack wrote:
> oh. maybe wait a few more days and do the patch against 0.7.1 which will
> end up in jaunty soonish.
>

If 0.7.1 is soon to be released and will end up in Jaunty lets wait for
that release. I looked a bit around in the upstream source and can see
it is fixed in upstream GIT repository, so assume it will be fixed with
0.7.1.

Revision history for this message
Alexander Sack (asac) wrote : Re: [Bug 329105] Re: network-manager uses wrong path for dhclient lease

On Sun, Feb 15, 2009 at 09:26:31AM -0000, Jonas Pedersen wrote:
> Alexander Sack wrote:
> > oh. maybe wait a few more days and do the patch against 0.7.1 which will
> > end up in jaunty soonish.
> >
>
> If 0.7.1 is soon to be released and will end up in Jaunty lets wait for
> that release. I looked a bit around in the upstream source and can see
> it is fixed in upstream GIT repository, so assume it will be fixed with
> 0.7.1.
>

its in jaunty now. Thanks!

 - Alexander

Revision history for this message
Jeroen Roovers (jer-gentoo) wrote :

There is still a problem here. nm apparently doesn't handle properly what dhclient is feeding back.

Feb 19 20:23:43 patricia NetworkManager: <info> Activation (ra0) Beginning DHCP transaction.
Feb 19 20:23:43 patricia dhclient: Internet Systems Consortium DHCP Client V3.1.1
Feb 19 20:23:43 patricia dhclient: Copyright 2004-2008 Internet Systems Consortium.
Feb 19 20:23:43 patricia dhclient: All rights reserved.
Feb 19 20:23:43 patricia dhclient: For info, please visit http://www.isc.org/sw/dhcp/
Feb 19 20:23:43 patricia dhclient:
Feb 19 20:23:43 patricia NetworkManager: <info> dhclient started with pid 7231
Feb 19 20:23:43 patricia NetworkManager: <info> Activation (ra0) Stage 3 of 5 (IP Configure Start) complete.
Feb 19 20:23:43 patricia dhclient: Listening on LPF/ra0/00:22:43:5d:4b:d4
Feb 19 20:23:43 patricia dhclient: Sending on LPF/ra0/00:22:43:5d:4b:d4
Feb 19 20:23:43 patricia dhclient: Sending on Socket/fallback
Feb 19 20:23:43 patricia dhclient: Sending on LPF/ra0/00:22:43:5d:4b:d4
Feb 19 20:23:43 patricia dhclient: Sending on Socket/fallback
Feb 19 20:23:46 patricia dhclient: DHCPDISCOVER on ra0 to 255.255.255.255 port 67 interval 7
Feb 19 20:23:46 patricia dhclient: DHCPOFFER of 172.16.24.220 from 172.16.27.1
Feb 19 20:23:46 patricia dhclient: DHCPREQUEST of 172.16.24.220 on ra0 to 255.255.255.255 port 67
Feb 19 20:23:46 patricia dhclient: DHCPACK of 172.16.24.220 from 172.16.27.1
Feb 19 20:23:46 patricia dhclient: bound to 172.16.24.220 -- renewal in 3588 seconds.
Feb 19 20:24:29 patricia NetworkManager: <info> Device 'ra0' DHCP transaction took too long (>45s), stopping it.
Feb 19 20:24:29 patricia NetworkManager: <info> ra0: canceled DHCP transaction, dhcp client pid 7231
Feb 19 20:24:29 patricia NetworkManager: <info> Activation (ra0) Stage 4 of 5 (IP Configure Timeout) scheduled...
Feb 19 20:24:29 patricia NetworkManager: <info> Activation (ra0) Stage 4 of 5 (IP Configure Timeout) started...
Feb 19 20:24:29 patricia NetworkManager: <info> (ra0): device state change: 7 -> 9
Feb 19 20:24:29 patricia NetworkManager: <info> Activation (ra0) failed for access point (orxnet)
Feb 19 20:24:29 patricia NetworkManager: <info> Marking connection 'ORXNET' invalid.
Feb 19 20:24:29 patricia NetworkManager: <info> Activation (ra0) failed.
Feb 19 20:24:29 patricia NetworkManager: <info> Activation (ra0) Stage 4 of 5 (IP Configure Timeout) complete.
Feb 19 20:24:29 patricia NetworkManager: <info> (ra0): device state change: 9 -> 3
Feb 19 20:24:29 patricia NetworkManager: <info> (ra0): deactivating device (reason: 0).

Revision history for this message
Jeroen Roovers (jer-gentoo) wrote :

It's the same with eth0 by the way. Both interfaces worked fine and still work fine when nm[1] doesn't interfere.

[1] network-manager_0.7.1~20090213+gitf142e15-0ubuntu1_i386.deb

Revision history for this message
Id2ndR (id2ndr) wrote :

I use hamachi and wippien VPN tools. NM fail to get the IP with these, and this may be related to this bug so I have subscribed to it and will report test results if needed.

Revision history for this message
Jonas Pedersen (jonasped) wrote :

This bug was originally about wrong path for the lease file. That issue have been solved. Not sure in which version as I have been offline for some days, but it is for sure solved in version 0.7.1~rc1-0ubuntu2.

The issue reported by jeroen and id2ndr looks to be another issue. Suggest that is reported in a seperate bug.

Alexander, do you agree? If you do suggest this one is marked as fix released.

Revision history for this message
Thomas Novin (thomasn80) wrote :

This issue also exists in the PPA version for Intrepid which I'm running.

 *** 0.7-0ubuntu1~nm1~intrepid1 0
        500 http://ppa.launchpad.net intrepid/main Packages
        100 /var/lib/dpkg/status

Feb 25 08:56:09 thonov-ubuntu dhclient: can't create /var/lib/dhclient/dhclient-eth0.lease: No such file or directory

Revision history for this message
Alexander Sack (asac) wrote :

should be easy to fix.

Revision history for this message
Alexander Sack (asac) wrote :

oh ... its indeed fixed. /me should have read comments better.

Changed in network-manager (Ubuntu Jaunty):
status: Triaged → Fix Released
Revision history for this message
Abelardo Jara-Berrocal (abelardojarab-gmail) wrote :

Can you please backport it to Hardy PPA? Hardy is LTTS. Please if you can help. Thanks a lot :)

Also please if you can solve problem mentioned here:

https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/105251

Also with network manager.

Revision history for this message
Alexander Sack (asac) wrote :

On Mon, Apr 13, 2009 at 09:58:03PM -0000, Abelardo Jara-Berrocal wrote:
> Can you please backport it to Hardy PPA? Hardy is LTTS. Please if you
> can help. Thanks a lot :)

Hardy PPA has 0.7.1 now ... is that good enough?

 - Alexander

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.