|
Bugzilla – Full Text Bug Listing |
| Summary: | modify_resolvconf does not read named.d/forwarders.conf | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 10.2 | Reporter: | Christian Zoz <zoz> |
| Component: | Network | Assignee: | Marius Tomaschewski <mt> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | hmuelle, lmuelle, locilka |
| Version: | Final | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | maint:planned:sle10-sp3 maint:released:11.0:23139 maint:released:sle10-sp2:23141 maint:released:sle10-sp2-rt:23141 | ||
| Found By: | Development | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
last 1000 lines of y2log
Proposed /sbin/modify_resolvconf fixes for forwarders.conf creation |
||
|
Description
Christian Zoz
2005-11-21 16:17:14 UTC
I don't know who moved the forwarders from the main named.conf to named.d/forwarders.conf. This is not our default configuration. We moved the zone definitions from named.conf to independet files in /etc/named./ to allow modify_resolvconf to modify the forwarder settings in /etc/named.conf whithout losing any changes made to zone configs. I suggest to ignore /etc/named.d/forwarders.conf as long as you don't get a request to even check this file for forwarder statements. There was a request for ... 9.3 (?) to move forwarders to this file because of modify_resolvconf script which modifies the configuration when it wants. Just to prevent from data loses. But this is an old history :) So this means modify_resolvconf should stay modifying named.conf and leave everything in named.d/ alone? No, this means that modify_resolvconf should modify only named.d/forwarders.conf and leave named.conf alone. It should have been already adjusted to do it long time ago. I have no clue why it haven't. Thanks, Lukas. Does that mean we won't have to change named.conf no more at all? Sorry for my repeated request, but i am really unsure, because i did not use local nameservers since some years. And in in bug 136844 comment 2 Peter Poeml wrote on 2005-12-12: > Rewriting forwarders in local named.conf works fine Peter, did you use MODIFY_NAMED_CONF_DYNAMICALLY recently? YaST DNS Server changes /etc/named.conf. Forwarders were moved to the separate file just only because of the modify_resolvconf script. There were no other reasons. See Bug 55610, comment #13 (2004-07-26) and later (some discussion went out of bugzilla). It works fine on a 9.2, for example. Maybe I didn't use it on newer systems. I was not aware of the change in bind configuration. OK, we now modify /etc/named.d/forwarders.conf Will be in beta4. This does not work at all. modify_resolvconf does not create forwarders.conf if this file does not exist. This is intention, because a forwarders.conf wich is not included in named.conf is useless. YaST DNS Server does not create forwarders.conf (and the include) if i select 'change fw via ppp'. And if i select static forwarders i don't want it to modufied dynamically. *** Bug 173407 has been marked as a duplicate of this bug. *** YaST2 DNS server sets MODIFY_*_CONF_DYNAMICALLY properly, but it does neither create a forwarders.conf nor does it add an include statement for this file. Further, this all cannot work if bind is configured manually, because nobody knows that he has to use forwarders.conf Thus, it was completely wrong to change modify_resolvconf. I will change that back in a YOUpdate. y2log:
Moving forwarders into single file /etc/named.d/forwarders.conf
Writing forwarders to file /etc/named.d/forwarders.conf
cat /etc/named.d/forwarders.conf
--- out ---
# Copyright (c) 2001-2004 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
# Forwarders file for PPPD updates (only)
#
# /etc/named.d/forwarders.conf
forwarders { 10.20.0.2; };
--- out ---
grep "/etc/named.d/forwarders.conf" /etc/named.conf
--- out ---
include "/etc/named.d/forwarders.conf";
--- out ---
so, to comment #9:
file exists when YaST is used for the configuration
file is "included" in named.conf in the same case
YaST DNS Server creates the forwarders file
to comment #11:
manual configuration is not a supported feature, you a user creates his manual configuration and includes forwarders in the named.conf, YaST would move them into that separate file after tries to change the configuration with YaST.
It behaves as it was defined in the bug 55610. According to comment #26 we might need to add that file into the default configuration but for me, this is INVALID or WORKSFORME.
I just used YaST2 DNS Server and was choosing 'PPP Daemon Sets Forwarders'. Then MODIFY_*_CONF_DYNAMICALLY was properly set but there was no forwarders.conf. You have to create it also if 'PPP Daemon Sets Forwarders' is choosen. Add an empty forwarders line then. OK, gimme yast logs, please. But I've tried both cases and both created that file... Created attachment 83242 [details]
last 1000 lines of y2log
OK, please, attach also the /etc/named.conf file :) It appears that there are no forwarders defined so the file is not written at all. Exactly that. named.conf was fresh from bind.rpm and not modified. When i get forwarders via ppp i have no static one. modify_resolvconf expects at least an empty or commented forwarders line. Like it is in default named.conf. Otherwise it won't add one. Confirmed by my tests -> forwarfders file is not created when there is nothing to write into. On the other hand, is it really the expected (who expects it?) behavior to write the file allways :)? modify_resolvconf could (it does not currently) create the file if it doesn't exist. But i don't want to have to add the include line in named.conf. So it would be nice if you could create both. We should add that to the default named.conf already. Then modify_resolvconf will work with manually created configurations as well. If you use that feature "modify resolv conf" it is still not going to work until you call YaST to create it, right. In this view, it should be added (empty) into the default configuration. [I see you have written almost the same ;)] Lars? - Special file /etc/named.d/forwarders.conf is allways written and
included in the configuration of /etc/named.conf because of the
feature 'PPP daemon sets forwarders'. The file is allways written
even the list of forwarders is empty (#134692).
- yast2-dns-server-2.13.12
So this is fixed for me.
Lars, please, include the empty file /etc/named.d/forwarders.conf in the bind package if possible and create and 'include' in the /etc/named.conf. Thanks.
--- cut ---
options {
...
include "/etc/named.d/forwarders.conf";
...
}
--- cut ---
--- /etc/named.d/forwarders.conf ---
# Copyright (c) 2001-2004 SuSE Linux AG, Nuernberg, Germany.
# All rights reserved.
# Forwarders file for PPPD updates (only)
#
# /etc/named.d/forwarders.conf
forwarders {};
--- /etc/named.d/forwarders.conf ---
It seems this is still not fixed properly in 10.2.
For some reason, I ended up with an empty /etc/named.d/forwarders.conf file after an update 10.1->10.2. I also only get name servers dynamically (in this case even with a VPN tunnel).
So here's what I would suggest to change:
1) modify_resolvconf: If forwarders.conf exists but doesn't contain the "forwarders {}" line, modify_resolvconf replaces this file, writes a nice header, but your name server is simply not added. So everything looks correct, but it's not working finally. I think this case shall be checked in modify_resolvconf and a warning produced in modify_resolvconf.
2) Further on, /etc/sysconfig/network/config still says that enabling MODIFY_NAMED_CONF_DYNAMICALLY means it will change /etc/named.conf which is quite misleading.
3) To fix all that stuff I just deleted forwarders.conf as it wasn't provided by the bind-utils package. So please add it to the package as suggested in the last comment.
1) I won't change modify_resolvconf, since it will become obsolete soon. We are heading for NetworkManager (SUSE enhanced NM of course). I don't want to spend my time with fixing rare problems. --> WONTFIX from my side 2) Fixed comment. 3) That's up to Uwe. Wow, now I'm totally confused. I just found that /etc/named.d/forwarders.conf isn't included any more by default in /etc/named.conf. It's also not working if I include it in /etc/sysconfig/named:NAMED_CONF_INCLUDE_FILES because these files are included out of the scope of options{};. And it won't end up in the chroot environment which is enabled by default if I don't put it there...
So I start to think that the combination modify_resolvconf/bind isn't working at all for SUSE 10.2, right? I'm not sure whether this is a "rare problem", but well...
I'd also say that it makes no sense to fix 3) if we won't have 1) fixed. As forwarders.conf was only invented because of modify_resolvconf it also doesn't make sense any more to add it to the package if modify_resolvconf is dying, right?
Ok, the include for forwarders.conf is added to named.conf if one walks through the YaST named configuration once. Not very intuitive, but ok... So only my last paragraph stays valid: I'd suggest to either fix 1) + 3) or neither of both makes sense... #25 and #27 -> wontfix I find the following on two 10.1 machines, when I research why DNS resolution works badly: Sep 25 03:30:03 zeus modify_resolvconf: Service pppd tried to modify /etc/named.d/forwarders.conf, but named seems not to be installed Sep 25 03:30:03 zeus modify_resolvconf: Check your settings of MODIFY_RESOLV\NAMED_CONF_DYNAMICALLY If this is really a "wontfix" (which I don't really understand [*]), what is the expected way to work around this problem? Could it be documented? [*] Couldn't modify_resolvconf simply modify /etc/named.conf if /etc/named.d/forwarders.conf doesn't exist? Package sysconfig is now maintained by Marius Tomaschewski Created attachment 272729 [details] Proposed /sbin/modify_resolvconf fixes for forwarders.conf creation I found a little bit time to fix modify_resolvconf so far. - Check if the directory exists instead of forwarders.conf, so when there is no forwarders.conf but named is installed, it will be created. - Fixed creation of the forwarders.conf to not to expect any options block. [There is still legacy code in case the user changed NAMEDCONF back to /etc/named.conf]. - Add debug message about missed inclusion in /etc/named.conf [IMO it is not needed to flood the logs with this and yast2 adds the include statement as far as I read the comments correctly]. Too late for 10.2 but may go into 10.3 and 11.0 or sles10 sp3 updates... I'll submit test packages to build.opensuse.org at home:mtomaschewski:<version>/sysconfig soon. The comment in sysconfig, that the /etc/named.d/forwarders.conf is modified is fixed at least on >= 10.3. (In reply to comment #29) [...] > I find the following on two 10.1 machines, when I research why > DNS resolution works badly: Yes. A 'echo 'forwarders {};' > /etc/named.d/forwarders.conf" IMO fixed the problem in the past, the patch fixes it now too. Modifying of /etc/named.conf is a bad idea because of many reasons that are referenced in this bug report [one is, it may be not in options but in a zone block ;-)], but you can adjust the NAMEDCONF variable in /sbin/modify_resolvconf if you really want go back. Test packages are in: http://download.opensuse.org/repositories/home://mtomaschewski://10.3/openSUSE_10.3/ http://download.opensuse.org/repositories/home://mtomaschewski://11.0/openSUSE_11.0/ Note: it has to be build on 16-Feb-2009 or later / see changelog in the repodata subdirectory. submitted: 10.3, 11.0, sles10 Update released for: sysconfig Products: openSUSE 10.3 (i386, ppc, x86_64) Update released for: sysconfig Products: openSUSE 11.0 (debug, i386, ppc, x86_64) Update released for: sysconfig Products: SLE-DEBUGINFO 10-SP2 (i386, ia64, ppc, s390x, x86_64) SLE-DESKTOP 10-SP2 (i386, x86_64) SLE-RT 10-SP2 (i386, x86_64) SLE-SERVER 10-SP2 (i386, ia64, ppc, s390x, x86_64) |