Bug 169858 - Network configuration ignores DNS info when using DHCP and Network Manager
Summary: Network configuration ignores DNS info when using DHCP and Network Manager
Status: RESOLVED FIXED
: 171124 (view as bug list)
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: RC 2
Hardware: i686 SuSE Linux 10.1
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Martin Vidner
QA Contact: Stanislav Visnovsky
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-26 17:58 UTC by Andrew Lofthouse
Modified: 2006-05-05 08:53 UTC (History)
3 users (show)

See Also:
Found By: Beta-Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Correct DNS configuration obtained prior to writing configuration in Yast (104 bytes, text/plain)
2006-04-26 17:59 UTC, Andrew Lofthouse
Details
Incorrect resolve.conf configuration after writing system configuration in Yast (102 bytes, text/plain)
2006-04-26 18:01 UTC, Andrew Lofthouse
Details
/var/log/YaST2 archive (2.51 MB, application/x-gzip)
2006-04-26 18:04 UTC, Andrew Lofthouse
Details
/etc/resolv.conf and Connection Information (41.39 KB, image/png)
2006-05-03 16:17 UTC, Robert Vojta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Lofthouse 2006-04-26 17:58:21 UTC
I use Network Manager and DHCP for IP address.  I specify the nameservers and hostname to use in Yast.  After configuration is complete (selecting OK in the Hostname and Name Server Configuration window), the resolve.conf file correctly shows the specified nameservers (see attachment resolve.conf.1st).  However, once the network configuration is written and the network service restarted, the resolve.conf file has overwritten the correct results with incorrect results obtained from the DHCP server (see attachment resolve.conf.2nd).
Comment 1 Andrew Lofthouse 2006-04-26 17:59:47 UTC
Created attachment 80350 [details]
Correct DNS configuration obtained prior to writing configuration in Yast
Comment 2 Andrew Lofthouse 2006-04-26 18:01:30 UTC
Created attachment 80351 [details]
Incorrect resolve.conf configuration after writing system configuration in Yast
Comment 3 Andrew Lofthouse 2006-04-26 18:04:40 UTC
Created attachment 80352 [details]
/var/log/YaST2 archive
Comment 4 JP Rosevear 2006-04-27 13:31:31 UTC
it sounds like MODIFY_RESOLV_CONF_DYNAMICALLY is not set to "no" in /etc/sysconfig/network/config , not sure how to do this in yast.
Comment 5 Robert Love 2006-04-28 16:03:14 UTC
Nod.

Reporter, can you edit /etc/sysconfig/network/config and set MODIFY_RESOLV_CONF_DYNAMICALLY to "no", restart NM (or just reboot), and confirm if that makes the behavior work as you expect?
Comment 6 Andrew Lofthouse 2006-04-28 16:15:56 UTC
Yes, that corrects the behavior...
Comment 7 Robert Love 2006-04-28 16:59:05 UTC
Alright.  The intended behavior is the original behavior -- we allow it to be changed by this option, but its not the default.
Comment 8 Andrew Lofthouse 2006-04-28 17:05:44 UTC
No, I don't think this is right.  Yast should change the variable in /etc/sysconfig/network/config, not the user.  This bug is because Yast has an option where the DNS configuration is specified, but then the variable in /etc/sysconfig/network/config is not properly changed, so the Yast setting does not good.
Comment 9 Robert Love 2006-04-28 19:59:28 UTC
Martin, your call.
Comment 10 Martin Vidner 2006-05-03 06:32:53 UTC
Oh joy, we have TWO variables that control the behavior. /etc/sysconfig/network/config:MODIFY_RESOLV_CONF_DYNAMICALLY and /etc/sysconfig/network/dhcp:DHCLIENT_MODIFY_RESOLV_CONF.

NM uses the former (bug 147703), YaST uses the latter.

I am not if we can fix the mess properly now. But a quick fix would be to have both programs agree on one variable. Since NM uses it read-only, I suggest changing NM to use /etc/sysconfig/network/dhcp:DHCLIENT_MODIFY_RESOLV_CONF. Robert, what do you think?

Christian, please mention the other variable in network/config too please.
Comment 11 Robert Love 2006-05-03 14:16:07 UTC
Martin: I have no problem making the change.  Christian, is this change correct in your eyes?  What is the other variable?
Comment 12 Robert Vojta 2006-05-03 16:17:05 UTC
Created attachment 81810 [details]
/etc/resolv.conf and Connection Information
Comment 13 Robert Vojta 2006-05-03 16:19:42 UTC
Another annoyance here is wrong Connection Information from NM when you set MODIFY_RESOLV_CONF_DYNAMICALLY to "no". Look at the attached screenshot.

Real primary DNS is not shown, secondary DNS is displayed as primary, third DNS is displayed as second, etc.
Comment 14 Christian Zoz 2006-05-03 19:21:31 UTC
MODIFY_RESOLV_CONF_DYNAMICALLY is used by modify_resolvconf. It is not
restricted to the dhcp case, but also for modem, isdn and whatever else calls
modify_resolvconf. This is the global switch.

DHCLIENT_MODIFY_RESOLV_CONF is an extra variable for dhcp. Since NM uses dhcp it
should better use this variable.
Comment 15 Robert Love 2006-05-03 19:32:48 UTC
Alright.

Committed to CVS and submitted to autobuild.  We now use DHCLIENT_MODIFY_RESOLV_CONF.

Martin: Bug should be resolved.  Feel free to close.
Comment 16 Robert Vojta 2006-05-04 05:47:07 UTC
*** Bug 171124 has been marked as a duplicate of this bug. ***
Comment 17 Martin Vidner 2006-05-05 08:53:48 UTC
Closing per comment 15.

Robert Vojta, please do not mix separate problems into one report. Open another bug for rml for comment 13.