Bug 758766

Summary: DNS-Server-Module CNAME on whole Zone broken
Product: [openSUSE] openSUSE 12.1 Reporter: Forgotten User QtBI7gWTIh <forgotten_QtBI7gWTIh>
Component: YaST2Assignee: E-mail List <yast2-maintainers>
Status: RESOLVED NORESPONSE QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None CC: ancor, forgotten_QtBI7gWTIh, locilka
Version: FinalFlags: lslezak: needinfo? (forgotten_QtBI7gWTIh)
Target Milestone: ---   
Hardware: x86-64   
OS: SLES 11   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: The YaST2 log

Description Forgotten User QtBI7gWTIh 2012-04-24 09:34:35 UTC
User-Agent:       Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20100101 Firefox/11.0

I have a webserver defined in the zonen file

www.example.com

www IN A xxx.xxx.xxx.xxxx

and like to have a resolution to example.com

example.com. IN CNAME www

then I have in the zone file (example.com. is translated to)

             IN CNAME wwww 

but this is not working with bind

I must have a

@   IN CNAME www

or

example.com. IN CNAME www

without this, bind don't load the zone file, but Yast2-dns-server module give
no error, I have to check the LOG files to find out the mistake. 

Lucas Ocilka: // ;)

For the another issue, I think you should rather file another bugreport.
I've even tried this:

  www             IN      A       1.1.1.100
  webserver       IN      CNAME   www

and webserver doesn't return anything. CNAME is ignored if CNAME is filed
for the whole domain this way:

--- /var/lib/named/master/example.org ---
$TTL 172800
@       IN      SOA     dhcp70.suse.cz. root.dhcp70.suse.cz. (
                        2012042313
                        10800
                        3600
                        604800
                        86400)
        IN      NS      ns2.example.org.
        IN      NS      ns1.example.org.
        IN      MX      0 mx1.example.org.
        IN      MX      0 mx2.example.org.
        IN      CNAME   www
ns      IN      A       1.1.1.102
mx1     IN      A       1.1.1.103
mx2     IN      A       1.1.1.104
www     IN      A       1.1.1.100
webserver       IN      CNAME   www
--- /var/lib/named/master/example.org ---

BTW, NS and MX records work for the domain well. So the buggy one seems to
be just CNAME. It also works with TXT entries for the whole domain.

When you file a new bug, please, attach relevant part of /var/log/messages
My says:

dns_master_load: master/example.org:13: example.org: CNAME and other data
zone example.org/IN: loading from master file master/example.org failed: CNAME
and other data
zone example.org/IN: not loaded due to errors.


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Comment 1 Kun Kun Zhang 2012-04-26 02:20:33 UTC
Thank you for your report.Could you please help to provide y2logs according to the following URL?Thank you.
http://en.opensuse.org/openSUSE:Bugreport_YaST.;)
Comment 2 Forgotten User QtBI7gWTIh 2012-04-27 09:47:27 UTC
Created attachment 488511 [details]
The YaST2 log
Comment 3 Lukas Ocilka 2012-05-02 10:56:46 UTC
As a workaround, this might work (untested):

*       IN      CNAME   www

(use "*" instead of "@" or "example.org." when entering the record)
Comment 4 Forgotten User QtBI7gWTIh 2012-05-02 11:27:25 UTC
Hello,

NO, exampla.org. is not working, it is automatic translated to "@" and this was not written to ldap, or in the zone file.

the "*" i have not tested. Can bind this "*" read (?).
Comment 5 Lukas Ocilka 2012-05-02 12:15:40 UTC
(In reply to comment #4)
> NO, exampla.org. is not working, it is automatic translated to "@" and this was
> not written to ldap, or in the zone file.

@ means the same as $zone_name. and it's not written into the file
because if a key is missing, the last-defined key is used.

This works for NS, MX and TXT records in that file and should IMO also
work for CNAME.

> the "*" i have not tested. Can bind this "*" read (?).

Well, it should work, you need to test it yourself.
See, for instance, this example http://serverfault.com/questions/156078/how-to-do-multiple-wildcard-subdomains-in-a-single-zone-file
Comment 7 Reinhard Max 2015-11-13 15:46:41 UTC
This bug report is about the YaST module, not about bind itself, right?
Comment 8 Forgotten User QtBI7gWTIh 2015-11-16 12:51:48 UTC
I don't remember correct, but I mean it was the YaST2 Module.
Comment 9 Ladislav Slezák 2015-11-18 14:32:51 UTC
Um, I'm a bit lost. How can I reproduce the bug in the yast2-dns-server module? Could you write a step-by-step how to?
Comment 10 Ladislav Slezák 2015-11-18 15:31:46 UTC
BTW 12.1 is not supported anymore, could you test in the latest version (Leap 42.1)? Attach fresh y2logs if you can still reproduce the problem.
Comment 11 Ancor Gonzalez Sosa 2015-12-02 10:30:13 UTC
No response after two weeks. Closing the bug report. Feel free to reopen if you can provide the requested step-by-step how-to or if you can confirm that the error is still present in a supported version like Leap 42.1.