Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 549970 - =net-misc/networkmanager-1.0.2: dhcp-start-failed
Summary: =net-misc/networkmanager-1.0.2: dhcp-start-failed
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL: https://forums.gentoo.org/viewtopic-t...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-20 14:18 UTC by Fitzcarraldo
Modified: 2015-06-09 20:37 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fitzcarraldo 2015-05-20 14:18:53 UTC
I was using net-misc/networkmanager-1.0.0, and networking worked.

Then net-misc/networkmanager-1.0.2 appeared in the Portage tree as stable, and I merged it. KDE Notifications now displays the following message after start-up:

"Wired interface (enp4s0f1)

DHCP failed to start"

and the syslog-ng message log shows:

May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  Auto-activating connection 'eth0'.
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): Activation: starting connection 'eth0'
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): Activation: Stage 1 of 5 (Device Prepare) scheduled...
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): Activation: Stage 1 of 5 (Device Prepare) started...
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): device state change: disconnected -> prepare (reason 'none') [30 40 0]
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  NetworkManager state is now CONNECTING
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): Activation: Stage 2 of 5 (Device Configure) scheduled...
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): Activation: Stage 1 of 5 (Device Prepare) complete.
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): Activation: Stage 2 of 5 (Device Configure) starting...
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): device state change: prepare -> config (reason 'none') [40 50 0]
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): Activation: Stage 2 of 5 (Device Configure) successful.
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): Activation: Stage 2 of 5 (Device Configure) complete.
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): Activation: Stage 3 of 5 (IP Configure Start) scheduled.
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): Activation: Stage 3 of 5 (IP Configure Start) started...
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): device state change: config -> ip-config (reason 'none') [50 70 0]
May 20 12:17:15 clevow230ss NetworkManager[2522]: client_start: assertion 'priv->client_type != 0' failed
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): device state change: ip-config -> failed (reason 'dhcp-start-failed') [70 120 15]
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  NetworkManager state is now DISCONNECTED
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  Disabling autoconnect for connection 'eth0'.
May 20 12:17:15 clevow230ss NetworkManager[2522]: <warn>  (enp4s0f1): Activation: failed for connection 'eth0'
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): Activation: Stage 3 of 5 (IP Configure Start) complete.
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): device state change: failed -> disconnected (reason 'none') [120 30 0]
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): deactivating device (reason 'none') [0]	

The crux of the problem appears to be:

May 20 12:17:15 clevow230ss NetworkManager[2522]: client_start: assertion 'priv->client_type != 0' failed
May 20 12:17:15 clevow230ss NetworkManager[2522]: <info>  (enp4s0f1): device state change: ip-config -> failed (reason 'dhcp-start-failed') [70 120 15]	

NetworkManager 1.0.2 installation that does not work:

# eix -I networkmanager
[I] net-misc/networkmanager
     Available versions:  0.9.8.10-r1 0.9.10.1_pre20141101 1.0.0 1.0.2 {avahi bluetooth connection-sharing consolekit (+)dhclient (+)dhcpcd gnutls +introspection +modemmanager ncurses +nss +ppp resolvconf selinux systemd teamd test vala +wext +wifi zeroconf KERNEL="linux"}
     Installed versions:  1.0.2(16:10:49 19/05/15)(bluetooth consolekit dhcpcd introspection modemmanager ncurses nss ppp wext wifi zeroconf -connection-sharing -dhclient -gnutls -resolvconf -selinux -systemd -teamd -test -vala KERNEL="linux")
     Homepage:            https://wiki.gnome.org/Projects/NetworkManager
     Description:         Universal network configuration daemon for laptops, desktops, servers and virtualization hosts

NetworkManager 1.0.0 installation that does work:

# eix -I networkmanager
[U] net-misc/networkmanager
     Available versions:  0.9.8.10-r1 0.9.10.1_pre20141101 1.0.0 1.0.2 {avahi bluetooth connection-sharing consolekit (+)dhclient (+)dhcpcd gnutls +introspection +modemmanager ncurses +nss +ppp resolvconf selinux systemd teamd test vala +wext +wifi zeroconf KERNEL="linux"}
     Installed versions:  1.0.0(12:24:41 20/05/15)(bluetooth consolekit dhcpcd introspection modemmanager ncurses nss ppp wext wifi zeroconf -connection-sharing -dhclient -gnutls -resolvconf -selinux -systemd -teamd -test -vala KERNEL="linux")
     Homepage:            https://wiki.gnome.org/Projects/NetworkManager
     Description:         Universal network configuration daemon for laptops, desktops, servers and virtualization hosts

If I revert to NetworkManager 1.0.0 the problem disappears.

With NetworkManager 1.0.2 the file /etc/resolv.conf contains only:
	
# cat /etc/resolv.conf
# Generated by NetworkManager	

Whereas with NetworkManager 1.0.0 the file contains:
	
# cat /etc/resolv.conf
# Generated by NetworkManager
search home
nameserver 192.168.1.254	

If I merge net-dns/openresolv (which has never been installed before, and I assume would have been merged automatically had the USE flag resolvconf been set) then /etc/resolv.conf is OK again and networking works:
	
# cat /etc/resolv.conf
# Generated by NetworkManager
search home
nameserver 192.168.1.254	

So this looks like the same bug seen in Arch Linux:

NetworkManager upgrade to 1.0.2 broke DNS
https://bbs.archlinux.org/viewtopic.php?id=197051

NetworkManager update broke domain name resolving for me and how I fixed it
http://www.reddit.com/r/archlinux/comments/34z57d/networkmanager_update_broke_domain_name_resolving/

and already fixed in Arch Linux:

https://bbs.archlinux.org/viewtopic.php?pid=1526641#p1526641

Arch Linux user outschi wrote: "I had this issue too. Because I use my laptop at different locations the method to copy /ect/resolv.conf.temp does not work for me.
Installing openresolv worked.
After upgrading to 1.0.2-3 I do not need openresolv anymore. Thanks for the quick bugfix to Jan Stefens and all others working on it."

Reproducible: Always

Steps to Reproduce:
1.Merge net-misc/networkmanager-1.0.2
2.
3.
Comment 1 Fitzcarraldo 2015-05-24 22:57:35 UTC
The following patch to networkmanager 1.0.2 by Debian developer Michael Biebl fixes the problem:

--- a/src/dns-manager/nm-dns-manager.c
+++ b/src/dns-manager/nm-dns-manager.c
@@ -782,13 +782,16 @@ update_dns (NMDnsManager *self,
 
 #ifdef NETCONFIG_PATH
    if (success == FALSE) {
+      g_clear_error (error);
       success = dispatch_netconfig (searches, nameservers,
                                     nis_domain, nis_servers, error);
    }
 #endif
 
-   if (success == FALSE)
+   if (success == FALSE) {
+      g_clear_error (error);
       success = update_resolv_conf (searches, nameservers, error);
+   }
 
    /* signal that resolv.conf was changed */
    if (success)

See https://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg1320164.html
Comment 2 Joakim Tjernlund 2015-05-25 18:20:03 UTC
Here is another error I seen with dhcpcd:
 $ ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --libdir=/usr/lib64 --docdir=/usr/share/doc/networkmanager-1.0.2 --disable-maintainer-mode --disable-gtk-doc --disable-more-warnings --disable-static --localstatedir=/var --disable-lto --disable-config-plugin-ibft --disable-ifnet --without-netconfig --with-dbus-sys-dir=/etc/dbus-1/system.d --with-udev-dir=/lib/udev --with-config-plugins-default=keyfile --with-iptables=/sbin/iptables --with-libsoup=yes --enable-concheck --with-crypto=gnutls --with-session-tracking=consolekit --with-suspend-resume=upower --enable-bluez5-dun --enable-introspection --enable-ppp --disable-wimax --without-dhclient --with-dhcpcd --without-modem-manager-1 --with-nmtui --with-resolvconf --without-selinux --disable-teamdctl --disable-tests --enable-vala --without-valgrind --with-wext --with-pppd-plugin-dir=/usr/lib64/pppd/2.4.7

....

configure:23483: checking for dhcpcd
configure:23502: found /sbin/dhcpcd
configure:23514: result: /sbin/dhcpcd
configure:23528: WARNING: Cannot use dhcpcd, version 4.x or higher is required
configure:23540: WARNING: Could not find a suitable DHCP client, falling back to dhclient

changing --with-dhcpcd to --with-dhcpcd=/sbin/dhcpcd makes the test pass
No more testing by me though.
Comment 3 Joakim Tjernlund 2015-05-25 19:05:44 UTC
looks lite http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/configure.ac?h=nm-1-0&id=7daf63461de4195b1626ca15f835fc7cbc56e847
introduced the error

Not sure why but autoconf removes one [ so you need [[ to get one [ left
Comment 4 Joakim Tjernlund 2015-05-25 21:48:08 UTC
(In reply to Joakim Tjernlund from comment #2)

> 
> changing --with-dhcpcd to --with-dhcpcd=/sbin/dhcpcd makes the test pass
> No more testing by me though.

Changing the ebuild to use --with-dhcpcd=/sbin/dhcpcd will work for
cross compile too.
Comment 5 Joakim Tjernlund 2015-05-27 10:45:32 UTC
(In reply to Joakim Tjernlund from comment #2)
> Here is another error I seen with dhcpcd:
>  $ ./configure --prefix=/usr --build=x86_64-pc-linux-gnu
> --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info
> --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib
> --disable-dependency-tracking --disable-silent-rules --libdir=/usr/lib64
> --docdir=/usr/share/doc/networkmanager-1.0.2 --disable-maintainer-mode
> --disable-gtk-doc --disable-more-warnings --disable-static
> --localstatedir=/var --disable-lto --disable-config-plugin-ibft
> --disable-ifnet --without-netconfig --with-dbus-sys-dir=/etc/dbus-1/system.d
> --with-udev-dir=/lib/udev --with-config-plugins-default=keyfile
> --with-iptables=/sbin/iptables --with-libsoup=yes --enable-concheck
> --with-crypto=gnutls --with-session-tracking=consolekit
> --with-suspend-resume=upower --enable-bluez5-dun --enable-introspection
> --enable-ppp --disable-wimax --without-dhclient --with-dhcpcd
> --without-modem-manager-1 --with-nmtui --with-resolvconf --without-selinux
> --disable-teamdctl --disable-tests --enable-vala --without-valgrind
> --with-wext --with-pppd-plugin-dir=/usr/lib64/pppd/2.4.7
> 
> ....
> 
> configure:23483: checking for dhcpcd
> configure:23502: found /sbin/dhcpcd
> configure:23514: result: /sbin/dhcpcd
> configure:23528: WARNING: Cannot use dhcpcd, version 4.x or higher is
> required
> configure:23540: WARNING: Could not find a suitable DHCP client, falling
> back to dhclient
> 
> changing --with-dhcpcd to --with-dhcpcd=/sbin/dhcpcd makes the test pass
> No more testing by me though.

Fixed uptream by:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=6baca260d11b4c2f92e8765ff0f66786e507022a
Comment 6 Joakim Tjernlund 2015-05-31 14:30:09 UTC
I just want to point out that stable NM 1.0.2 is broken w.r.t dhcpcd. It
would be better to revert stable NM to 1.0.0 than keeping 1.0.2 as is.
Comment 7 Pacho Ramos gentoo-dev 2015-06-04 09:33:36 UTC
+*networkmanager-1.0.2-r1 (04 Jun 2015)
+
+  04 Jun 2015; Pacho Ramos <pacho@gentoo.org>
+  +files/networkmanager-1.0.2-configure-dhcpcd.patch,
+  +networkmanager-1.0.2-r1.ebuild:
+  Fix dhcpcd detection (#549970 by Joakim Tjernlund)
+
Comment 8 Bjoern Olausson 2015-06-09 20:37:39 UTC
(In reply to Joakim Tjernlund from comment #6)
> I just want to point out that stable NM 1.0.2 is broken w.r.t dhcpcd. It
> would be better to revert stable NM to 1.0.0 than keeping 1.0.2 as is.

Mhhh, is this in some way related to #551358?
The interesting thing is that I am using DHCPCD and it worked fine for me with 1.0.2 but it broke with 1.0.2-r1 - Sory for not digging deeper into it by myself, but time does not permit to do so :(

Cheers,
Bjoern