Bug 10981 - drakwizard needs to be fixed to handle bind configuration.
Summary: drakwizard needs to be fixed to handle bind configuration.
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 3
Hardware: All Linux
Priority: Normal major
Target Milestone: ---
Assignee: Derek Jennings
QA Contact:
URL:
Whiteboard:
Keywords: Junior_job
Depends on: 10830
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-12 07:47 CEST by Dave Hodgins
Modified: 2013-09-10 20:43 CEST (History)
5 users (show)

See Also:
Source RPM: drakwizard-3.9-1.mga3.src.rpm
CVE:
Status comment:


Attachments

Description Dave Hodgins 2013-08-12 07:47:01 CEST
Currently, drakwizard fails to configure the dns server with ...
cp: cannot stat â/var/lib/named/var/named/zone/*â: No such file or directory
can't cp to file /var/lib/named/etc/named.conf: Read-only file system

It needs to be changed to use /var/named/.


Reproducible: 

Steps to Reproduce:
Manuel Hiebel 2013-08-12 19:31:04 CEST

Keywords: (none) => Junior_job
CC: (none) => mageia, thierry.vignaud

Comment 1 Jim Dines 2013-08-13 21:31:14 CEST
I changed /usr/lib/perl5/vendor_perl/5.16.3/MDK/Wizard
/Bind.pm line 35 (i.e. my $BIND_CHROOT = "/var/lib/named";) to "/var/named" but that just changed the error line to say it couldn't stat "/var/lib/named/var/named/zone/*' instead :-(

I might not be changing the right line of course, but that was the only place I could find it after querying the rpm for file locations.

In any case, I provide this merely for informational purposes to whomever tries to solve this issue.  I don't really have time to chase it down any further, unfortunately.

CC: (none) => jdines

Comment 2 Jim Dines 2013-08-13 21:33:38 CEST
I should have reviewed my earlier comment better (apologies), but I meant of course that one gets: "cp: cannot stat â/var/named/var/named/zone/*â: No such file or directory" after changing Bind.pm, which suggests I'm changing the right line but that there is more to the story I think.
Comment 3 Derek Jennings 2013-08-29 14:30:01 CEST
I am using the latest Bind.pm from git and I do not see that error.  Neither do I see any commits since mga3 was released that might have fixed it.

Perhaps you might like to give it a try
http://gitweb.mageia.org/software/drakwizard/plain/dns_wizard/Bind.pm

With the latest Bind.pm the wizard still fails with the message
"/tmp/dnstest/named.conf:136: zone 'localdomain': already exists previous definition: /tmp/dnstest/named.conf:94"  and it loses my /etc/hosts file for me :-(

CC: (none) => derekjenn

Comment 4 Derek Jennings 2013-08-29 16:24:23 CEST
If I fix the configuration to avoid duplicate localdomain entries the wizard still fails this time with the messages


"loading from master file master/localdomain.zone failed: file not found
zone TMPlocaldomain/IN: not loaded due to errors.
_default/TMPlocaldomain/IN: file not found
 zone localhost/IN: loading from master file master/localhost.zone failed: file not found
zone localhost/IN: not loaded due to errors.
_default/localhost/IN: file not found
zone 0.0.127.in-addr.arpa/IN: loading from master file reverse/named.local failed: file not found
zone 0.0.127.in-addr.arpa/IN: not loaded due to errors.
_default/0.0.127.in-addr.arpa/IN: file not found
zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: loading from master file reverse/named.ip6.local failed: file not found
zone 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: not loaded due to errors.
 _default/0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/IN: file not found
loading from master file reverse/named.broadcast failed: file not found
zone 255.in-addr.arpa/IN: not loaded due to errors.
_default/255.in-addr.arpa/IN: file not found
zone 0.in-addr.arpa/IN: loading from master file reverse/named.zero failed: file not found
zone 0.in-addr.arpa/IN: not loaded due to errors.
_default/0.in-addr.arpa/IN: file not found
zone 1.168.192.in-addr.arpa/IN: loaded serial 20130829
zone localdomain/IN: loaded serial 20130829
 control process exited, code=exited status=1
Failed to start Berkeley Internet Name Domain (DNS).

It is looking for example files that were dropped from the bind package at bind-9.9.2.P2-2.mga3

CC'ing guillomovitch   for advice/suggestions

CC: (none) => guillomovitch

Comment 5 Derek Jennings 2013-08-29 21:22:05 CEST
OK I think I understand it now.

bind-9.9.2.P2-2.mga3 dropped the example config files drakwizard requires. I will put them into drakwizard itself and put out an update.

There is also an issue with the pid file not being what systemd expects, and another issue is that if the domainname of the named server is localdomain, then it creates an invalid configuration. I will not do anything about that for the moment, and will leave it for another bug report.

Status: NEW => ASSIGNED
Assignee: bugsquad => derekjenn

Comment 6 Derek Jennings 2013-09-01 00:34:09 CEST
drakwizard-3.9.2-1.mga3 is in core/updates_testing.

This is one of the bugs it fixes.
If the folders 
/var/lib/named/var/named/master/
/var/lib/named/var/named/reverse/, and the file named.ca  are not provided by bind, then drakwizard will copy them into the correct location itself.

Test procedure is at Bug 10830

Depends on: (none) => 10830

Comment 7 Derek Jennings 2013-09-01 02:13:19 CEST
 
> There is also an issue with the pid file not being what systemd expects, and
> another issue is that if the domainname of the named server is localdomain,
> then it creates an invalid configuration. I will not do anything about that
> for the moment, and will leave it for another bug report.

This bug is also fixed by drakwizard-3.9.2-1.mga3  and drakwizard-3.7.7-1.mga2
Comment 8 Derek Jennings 2013-09-10 20:43:23 CEST
fixed in

drakwizard-3.9.2-1.mga3
drakwizard-3.7.7-1.mga2
drakwizard-3.11-1.mga4

Status: ASSIGNED => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.