Bug 125465 - Crashes. Key Error: 'file', File "/usr/sbin/system-config-bind-gui", line 95
Summary: Crashes. Key Error: 'file', File "/usr/sbin/system-config-bind-gui", line 95
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: system-config-bind
Version: rawhide
Hardware: athlon
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-06-07 18:24 UTC by Ivan Gyurdiev
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-07-12 22:58:32 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
named.conf (1.08 KB, text/plain)
2004-06-09 20:14 UTC, Ivan Gyurdiev
no flags Details
localhost-reverse (415 bytes, text/plain)
2004-06-15 20:51 UTC, Ivan Gyurdiev
no flags Details
localhost6-reverse (497 bytes, text/plain)
2004-06-15 20:52 UTC, Ivan Gyurdiev
no flags Details
bluenet (428 bytes, text/plain)
2004-06-15 20:52 UTC, Ivan Gyurdiev
no flags Details
bluenet-reverse (337 bytes, text/plain)
2004-06-15 20:52 UTC, Ivan Gyurdiev
no flags Details
bluenet6-reverse (384 bytes, text/plain)
2004-06-15 20:52 UTC, Ivan Gyurdiev
no flags Details
cnet (525 bytes, text/plain)
2004-06-15 20:53 UTC, Ivan Gyurdiev
no flags Details
screenshot (86.71 KB, image/png)
2004-06-15 20:53 UTC, Ivan Gyurdiev
no flags Details
Teh patch. (18.71 KB, patch)
2004-07-12 13:03 UTC, Ivan Gyurdiev
no flags Details | Diff
New Screenshot (119.34 KB, image/png)
2004-07-12 13:06 UTC, Ivan Gyurdiev
no flags Details

Description Ivan Gyurdiev 2004-06-07 18:24:05 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)
Gecko/20040518 Firefox/0.8

Description of problem:
It just doesn't work :)
Maybe it doesn't like my bind root being at /var/named/chroot - I
don't know..but this has never worked for me. /etc/named.conf is a
symlink to /var/named/chroot/etc/named.conf

[root@cobra /]# system-config-bind
Traceback (most recent call last):
  File "/usr/sbin/system-config-bind-gui", line 95, in ?
    cfg = ConfNamed.ConfNamed("/etc/named.conf",ROOTDIR)
  File "/usr/share/system-config-bind/ConfNamed.py", line 312, in __init__
    current[-1].done()
  File "/usr/share/system-config-bind/ConfNamed.py", line 133, in done
    self.zone=Zone.Zone(self.name,self.getFullFile())
  File "/usr/share/system-config-bind/ConfNamed.py", line 189, in
getFullFile
    return "%s/%s" %
(self.parent.rootdir+self.dir.strip('";"'),self.getFile())
  File "/usr/share/system-config-bind/ConfNamed.py", line 183, in getFile
    return self.getOpt("file").strip('";')
  File "/usr/share/system-config-bind/ConfNamed.py", line 22, in getOpt
    return self.opts[name]
KeyError: 'file'


Version-Release number of selected component (if applicable):
system-config-bind-2.0.2-5

How reproducible:
Always

Steps to Reproduce:
1. Run system-config-bind
2.
3.
    

Additional info:

Comment 1 Daniel Walsh 2004-06-09 18:29:26 UTC
Could you send me your named.conf?

Comment 2 Ivan Gyurdiev 2004-06-09 20:14:13 UTC
Created attachment 101009 [details]
named.conf

Comment 3 Ivan Gyurdiev 2004-06-09 20:15:28 UTC
This is /var/named/chroot/etc/named.conf
All dirs have mode 750, files have mode 640, owner is root, group is
named. I can provide the zone files if you'd like. I don't actually
use bind right now - I just wanted to look at the config tool. However
this file should parse, since named starts successfully after reading it.



Comment 4 Daniel Walsh 2004-06-09 21:28:44 UTC
system-config-bind-2.0.2-7.src.rpm is able to read your config file. 
There probably are problems with the IPV6 stuff.

Should be in rawhide tomorrow.

Dan

Comment 5 Ivan Gyurdiev 2004-06-15 02:00:26 UTC
Well, it gets further:

[root@cobra phantom]# system-config-bind
Traceback (most recent call last):
  File "/usr/sbin/system-config-bind-gui", line 95, in ?
    cfg = ConfNamed.ConfNamed("/etc/named.conf",ROOTDIR)
  File "/usr/share/system-config-bind/ConfNamed.py", line 321, in __init__
    current[-1].done()
  File "/usr/share/system-config-bind/ConfNamed.py", line 133, in done
    self.zone=Zone.Zone(self.name,self.getFullFile())
  File "/usr/share/system-config-bind/Zone.py", line 394, in __init__
    SOAList.append(self.translate(val[0]))
  File "/usr/share/system-config-bind/Zone.py", line 415, in translate
    return atoi(val[:-1])
  File "/usr/lib/python2.3/string.py", line 220, in atoi
    return _int(s, base)
ValueError: invalid literal for int(): 1D
[root@cobra phantom]#


Comment 6 Ivan Gyurdiev 2004-06-15 02:04:57 UTC
That's 1 day in the SOA record I assume... you seem to be expecting a
number.

$ORIGIN .
$TTL 3D
\[x0000000000000000/64].ip6.arpa IN      SOA     localhost.
ivg2.cornell.edu. (
                                200308081       ; Serial
                                8H      ; Refresh
                                2H      ; Retry
                                4W      ; Expire
                                1D)     ; Minimum TTL
                                                        NS      localhost.
$ORIGIN \[x0000000000000000/64].ip6.arpa.
\[x0000000000000001/64]                               PTR     localhost.


Comment 7 Daniel Walsh 2004-06-15 11:21:32 UTC
The following patch should fix that problem.

RCS file: /usr/local/CVS/bindconf/Zone.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -r1.12 -r1.13
405a406
>         val=val.strip().upper()
415c416
<             return atoi(val[:-1])
---
>             return translate(val[:-1])
416a418
> 

Comment 8 Daniel Walsh 2004-06-15 12:17:21 UTC
Fix in system-config-bind-2.0.2-8

Comment 9 Ivan Gyurdiev 2004-06-15 16:32:29 UTC
[root@cobra system-config-bind]# system-config-bind
Traceback (most recent call last):
  File "/usr/sbin/system-config-bind-gui", line 95, in ?
    cfg = ConfNamed.ConfNamed("/etc/named.conf",ROOTDIR)
  File "/usr/share/system-config-bind/ConfNamed.py", line 321, in __init__
    current[-1].done()
  File "/usr/share/system-config-bind/ConfNamed.py", line 133, in done
    self.zone=Zone.Zone(self.name,self.getFullFile())
  File "/usr/share/system-config-bind/Zone.py", line 394, in __init__
    SOAList.append(self.translate(val[0]))
  File "/usr/share/system-config-bind/Zone.py", line 416, in translate
    return translate(val[:-1])
TypeError: translate() takes at least 2 arguments (1 given)
[root@cobra system-config-bind]#


Comment 10 Daniel Walsh 2004-06-15 17:12:09 UTC
Oops needs to be self.translate(val[:-1])

If you send me your Zone files I can attempt run your environment through.

Dan

Comment 11 Ivan Gyurdiev 2004-06-15 17:22:16 UTC
Hey, it worked! I'm seeing this tool for the first time... cool.
I'll have a bunch more bugs to file, once I figure out which ones
are bugs, and which ones are mistakes in my zone files.





Comment 12 Daniel Walsh 2004-06-15 17:25:27 UTC
Yes, this tool is a back burner project.  Now if you could get some
students to work on developing it ...

Good Luck,

Dan

Comment 13 Ivan Gyurdiev 2004-06-15 20:48:41 UTC
Hmmm...

That just doesn't look right somehow.
...and since I've already attached my named file here, I might as well
add the zone files and a Screenshot.png to go with it..

I don't quite understand.
First, I don't see my PTR records.
Second, the NS records seem to show up as subdomains (or do they?)
Third, the ipv6 reverse zones show up as forward zones.

I don't know what's going on...maybe those $ORIGIN statements 
in my zones are wrong - I'm not a DNS expert, but I thought they
worked. Some of those got placed there automatically by named.

Anyway, take a look and see what you think.
Attaching..





Comment 14 Ivan Gyurdiev 2004-06-15 20:51:43 UTC
Created attachment 101166 [details]
localhost-reverse

Comment 15 Ivan Gyurdiev 2004-06-15 20:52:05 UTC
Created attachment 101167 [details]
localhost6-reverse

Comment 16 Ivan Gyurdiev 2004-06-15 20:52:32 UTC
Created attachment 101168 [details]
bluenet

Comment 17 Ivan Gyurdiev 2004-06-15 20:52:45 UTC
Created attachment 101169 [details]
bluenet-reverse

Comment 18 Ivan Gyurdiev 2004-06-15 20:52:58 UTC
Created attachment 101170 [details]
bluenet6-reverse

Comment 19 Ivan Gyurdiev 2004-06-15 20:53:10 UTC
Created attachment 101171 [details]
cnet

Comment 20 Ivan Gyurdiev 2004-06-15 20:53:41 UTC
Created attachment 101172 [details]
screenshot

Comment 21 Ivan Gyurdiev 2004-07-12 13:01:32 UTC
So check this out... I wrote a patch that fixes a bunch of stuff. Look
and see if it makes any sense. Considering I just learned some python
from a tutorial and reading your code, it's probably all wrong - it
fixes (some of) the stuff I see broken, however.

- adds IsReverse detection for IPV6 zones
- the f1,f2,f3,f4,f5 stuff was all off-by-one.. I don't know why, but
IMHO the whole zone file parsing is incorrect since a lot of those
records are optional. I believe the correct RR format is:
{ name } { ttl } class type data
{ name } is optional where the default is the last RR used
{ ttl } is optional where the default is the SOA TTL
{ ttl } and class("IN") can be interchanged, byt type is always last

So I rewrote that part. I also got rid of the f1,f2..vars, and
replaced them with friendlier ones. Now basically all of my records
are parsed 90% correctly. I use lists to pass to the RR classes, 
and the lists require 5 elements (name,ttl, class, type, and data),
where the data is a list in itself.

Also, the nameserver served_by thing didn't make sense to me. Maybe
this part is wrong - look at it more carefully. The way it showed up
was that the nameserver was served by the RR name. I didn't understand
that since I thought it was exactly the other way around - the NS
serves the RR (the domain/subdomain). So I renamed a whole lot of
stuff and reversed the way it shows up.

Will post 2 attachments.
1: patch
2: screenshot (compare to my previous sshot).





Comment 22 Ivan Gyurdiev 2004-07-12 13:03:25 UTC
Created attachment 101809 [details]
Teh patch.

Comment 23 Ivan Gyurdiev 2004-07-12 13:06:15 UTC
Created attachment 101810 [details]
New Screenshot

Comment 24 Ivan Gyurdiev 2004-07-12 16:51:53 UTC
Ok the whole served_by renaming stuff that I've put in there looks
completely wrong so you can get rid of it...but I still am having
difficulty figuring out which thing is the server (the nameserver) and
which is the thing being served (the domain/subdomain) from all the
served_by_entry and host_entry code..





Comment 25 Ivan Gyurdiev 2004-07-12 21:34:24 UTC
Why am I looking at this at all  - it seems like the entire FwdZone.py
file is not being used from anywhere...or am I wrong? If so, why is it
there? Are you redesigning this to use FwdZone or is it obsolete?

[root@cobra system-config-bind]# grep FwdZone *
FwdZone.bak:class FwdZone:
FwdZone.bak:        return FwdZone.ORDER
Binary file FwdZone.pyc matches
[root@cobra system-config-bind]#

 



Comment 26 Ivan Gyurdiev 2004-07-12 21:36:32 UTC
Never mind statement - I need to wake up.


Comment 27 Ivan Gyurdiev 2004-07-12 22:56:13 UTC
Comment on attachment 101809 [details]
Teh patch.

This is totally broken. I'll fix it and split it up.

Comment 28 Ivan Gyurdiev 2004-07-12 22:58:32 UTC
Closing Bug. I'll email directly - this is unrelated to original
problem at all.


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