Your message dated Wed, 14 Jan 2015 14:14:22 +0100
with message-id 
<cajn8kfcz4fswkywwkqkt05oszathzejkxusokk8oywfojg_...@mail.gmail.com>
and subject line Re: Bug#773749: Resolvconf vs wicd
has caused the Debian Bug report #773749,
regarding resolvconf prevents dhclient-script from updating /etc/resolv.conf
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
773749: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773749
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: isc-dhcp-client
Version: 4.3.1-5
Severity: grave
Justification: renders package unusable
[Well, correction can be done manually, but this is really annoying.]

I've been using wicd to connect via WiFi for years, and this has
always worked, but now the /etc/resolv.conf file is no longer
updated. The /etc/wicd/dhclient.conf.template file is used by
wicd and contains here (this is the default + the prepend line):

------------------------------------------------------------------------
# If you're reading this, you're probably reading either:
#  /etc/wicd/dhclient.conf.template.default
# or
#  /etc/wicd/dhclient.conf.template
# or
#  a generated dhclient configuration in /var/run
# (these files could be in different locations, as determined by your
# packager or system administrator, but those are the default pathes)
#
# Here's what you need to know:
#  The .default file is copied by wicd to dhclient.conf.template if
#  dhclient.conf.template does not exist. If dhclient.conf.template
#  does exist, the .default file is not used. This is to allow
#  upgrades of the package without destroying user changes.
#
#  In other words, if you want to change the generated dhclient
#  configuration, you need to change dhclient.conf.template,
#  NOT dhclient.conf.template.default

# wicd will replace $_HOSTNAME in the following line with
# the appropriate hostname for this system
send host-name "$_HOSTNAME";

# Prepend the local DNS server (BIND), but also Google DNS servers,
# as BIND times out on network congestion.
prepend domain-name-servers 127.0.0.1, 8.8.8.8, 8.8.4.4;
------------------------------------------------------------------------

As you can see, there is a prepend line, but the /etc/resolv.conf
file was still unmodified (last modified on 2014-09-30 00:39:52),
with incorrect settings ("nameserver 192.168.1.1" only). I had to
modify it manually.

/var/log/syslog says about dhclient:

Dec 22 21:39:18 xvii dhclient: Internet Systems Consortium DHCP Client 4.3.1
Dec 22 21:39:18 xvii dhclient: Copyright 2004-2014 Internet Systems Consortium.
Dec 22 21:39:18 xvii dhclient: All rights reserved.
Dec 22 21:39:18 xvii dhclient: For info, please visit 
https://www.isc.org/software/dhcp/
Dec 22 21:39:18 xvii dhclient: 
Dec 22 21:39:18 xvii dhclient: Listening on LPF/wlan0/00:21:6a:47:b3:80
Dec 22 21:39:18 xvii dhclient: Sending on   LPF/wlan0/00:21:6a:47:b3:80
Dec 22 21:39:18 xvii dhclient: Sending on   Socket/fallback
Dec 22 21:39:18 xvii dhclient: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 
interval 8
Dec 22 21:39:20 xvii dhclient: DHCPREQUEST on wlan0 to 255.255.255.255 port 67
Dec 22 21:39:20 xvii dhclient: DHCPOFFER from 192.168.0.1
Dec 22 21:39:20 xvii dhclient: DHCPACK from 192.168.0.1
Dec 22 21:39:20 xvii dhclient: bound to 192.168.0.6 -- renewal in 124409 
seconds.

Note: resolvconf is installed, but the files in the /etc/resolvconf
directory have old timestamps:

-rw-r--r-- 1  481 2013-02-06 20:55:06 interface-order
-rw-r--r-- 1    0 2012-09-10 11:55:45 resolv.conf.d/base
-rw-r--r-- 1  151 2012-09-10 11:55:45 resolv.conf.d/head
-rw-r--r-- 1   72 2012-10-21 13:51:50 resolv.conf.d/original
-rw-r--r-- 1    0 2012-10-21 14:45:20 resolv.conf.d/tail
lrwxrwxrwx 1   15 2012-10-21 14:45:12 run -> /run/resolvconf/
-rwxr-xr-x 1  249 2009-01-28 03:59:31 update-libc.d/avahi-daemon*
-rwxr-xr-x 1  426 2012-04-27 17:54:50 update-libc.d/postfix*
-rwxr-xr-x 1 3195 2012-09-10 11:55:45 update.d/dnscache*
-rwxr-xr-x 1 4624 2013-02-06 20:55:06 update.d/libc*

thus have not been modified for a long time.

/run/resolvconf/resolv.conf was modified on 2014-12-22 21:39:20 and
contains correct settings:

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4

but isn't taken into account, since /etc/resolv.conf is not a symlink
to it (I don't know why, but it was a symlink in the past).

So, it appears that dhclient modifies the wrong file.

-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages isc-dhcp-client depends on:
ii  debianutils       4.4+b1
ii  iproute2          3.16.0-2
ii  isc-dhcp-common   4.3.1-5
ii  libc6             2.19-13
ii  libdns-export100  1:9.9.5.dfsg-7
ii  libirs-export91   1:9.9.5.dfsg-7
ii  libisc-export95   1:9.9.5.dfsg-7

isc-dhcp-client recommends no packages.

Versions of packages isc-dhcp-client suggests:
ii  avahi-autoipd  0.6.31-4+b2
ii  resolvconf     1.76

-- Configuration Files:
/etc/dhcp/dhclient.conf changed:
option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
send host-name = gethostname();
prepend domain-name-servers 127.0.0.1, 8.8.8.8, 8.8.4.4;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name,
        dhcp6.name-servers, dhcp6.domain-search,
        netbios-name-servers, netbios-scope, interface-mtu,
        rfc3442-classless-static-routes, ntp-servers;


-- no debconf information

--- End Message ---
--- Begin Message ---
On 14 January 2015 at 01:18, Vincent Lefevre <[email protected]> wrote:
> On 2015-01-13 20:47:56 +0100, Thomas Hood wrote:
>> 1. When (if ever) does wicd modify dhclient.conf?
>
> In the past, wicd was creating its own dhclient.conf and was
> invoking dhclient with this config file:
>
> 2011/12/17 03:16:46 :: /sbin/dhclient -v -cf /var/lib/wicd/dhclient.conf wlan0
>
> Though this is still the way it should work according to the
> documentation, this is no longer the case; wicd just executes:
>
>   /sbin/dhclient -v wlan0
>
> so that /etc/dhcp/dhclient.conf is used by dhclient (but it has not
> been modified by wicd). Well, this is what happens on my machine.


Understood. This seems to be a separate issue which can be discussed
in another bug report.


>> 2. When the malfunction occurs are the contents
>> /run/resolvconf/resolv.conf correct (i.e., what one would expect to
>> find in resolv.conf)?
>
> Yes, it appears to be correct.
>
>> So that the problem is that /etc/resolv.conf is not a symbolic link
>> to /run/resolvconf/resolv.conf?
>
> More or less.


OK so the solution is for the administrator to do "ln -s
/run/resolvconf/resolv.conf /etc/resolv.conf". I am closing this
report because it turns out to be a local configuration issue, but
read on.


> The problem is actually a lack of consistency: only
> /run/resolvconf/resolv.conf is modified *but* it is not used.


This is an allowed configuration (which is sometimes even useful).
Resolvconf writes /run/resolvconf/resolv.conf and the administrator
gets to decide whether /etc/resolv.conf should be a symbolic link to
this or whether it should be a static file or a link to something
else. Some people install resolvconf just so that its presence will
stop other software from futzing with /etc/resolv.conf which those
people want to be static or want to manage with a custom script.

When the resolvconf package is initially installed it optionally and
by default creates the symlink at /etc/resolv.conf, but after that the
admin is free to do what he or she likes with /etc/resolv.conf and
resolvconf won't interfere. Resolvconf will only print a warning
message which can be disabled by setting REPORT_ABSENT_SYMLINK=yes.
This is all intentional and in accordance with the letter and spirit
of Debian policy.


> IMHO, there would be two possible correct behaviors concerning
> the /etc/dhcp/dhclient-enter-hooks.d/resolvconf hook script:
>
> 1. The hook script assumes that resolvconf should be used, so that
>   a) it should disable the default behavior;
>   b) it should modify /run/resolvconf/resolv.conf;
>   c) it should make sure that /etc/resolv.conf is a symlink to
>      /etc/resolvconf/run/resolv.conf (e.g. by removing the old
>      file if there is one and adding the symlink).
>
> Currently, the hook script does (a)[*] and (b), but not (c).


Doing (c) would violate the principle that software (other than
configurators) should preserve configuration files.


[...]
> 2. The hook script assumes that the symlink is not there because
> the user didn't want to use resolvconf (without having to remove
> the resolvconf package), e.g. temporarily, so that
>   a) it should test whether /etc/resolv.conf is a symlink to
>      /etc/resolvconf/run/resolv.conf;
>   b) if it isn't, terminate;
>   c) otherwise the script should disable the default behavior
>      and modify /run/resolvconf/resolv.conf (this is what it
>      currently does).
>
> Here, what is missing is the test (a).


There is no need to have a feature whereby resolvconf is installed but
entirely deactivated. To deactivate resolvconf entirely, simply
uninstall it. In any case, that is how resolvconf has been designed.


> I suppose that changing the line
>
> if [ -x /sbin/resolvconf ] ; then
>
> to
>
> if [ -x /sbin/resolvconf ] && \
>    [ "$(readlink /etc/resolv.conf)" = /etc/resolvconf/run/resolv.conf ] ; then
>
> would be sufficient.


In Ubuntu they made a change similar to the one you propose

     if [ -x /sbin/resolvconf ] && [ -L /etc/resolv.conf ]; then

but this has given rise to complaints too, e.g.,
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1385010.

Cheers!
-- 
Thomas

--- End Message ---

Reply via email to