Bug 150910 - redhat-config-bind crash on startup
redhat-config-bind crash on startup
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: redhat-config-bind (Show other bugs)
3.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Radek Vokal
:
Depends On:
Blocks: 163853 189875
  Show dependency treegraph
 
Reported: 2005-03-11 17:17 EST by Ian Laurie
Modified: 2011-02-18 04:17 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-18 04:17:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Ian Laurie 2005-03-11 17:17:42 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3)
Gecko/20050104 Red Hat/1.4.3-3.0.7

Description of problem:
redhat-config-bind crashes on startup.  When run from the command line:

server# redhat-config-bind
Traceback (most recent call last):
  File "/usr/sbin/redhat-config-bind", line 95, in ?
    cfg = ConfNamed.ConfNamed("/etc/named.conf",ROOTDIR)
  File "/usr/share/redhat-config-bind/ConfNamed.py", line 324, in __init__
    current[-1].setOpt(val[0],join(val[1:],' '))
IndexError: list index out of range


Version-Release number of selected component (if applicable):
redhat-config-bind-2.0.0-14.2

How reproducible:
Always

Steps to Reproduce:
1. Launch redhat-config-bind
2.
3.
    

Actual Results:  Crashes with the above errors.

Expected Results:  Should not crash.

Additional info:
Comment 1 Jason Vas Dias 2005-03-11 17:26:06 EST
Yes, redhat-config-bind-2.0.0-14.2 has many such problems.

Please download the latest version, system-config-bind-4.0.0-4, from:
  http://people.redhat.com/~jvdias/system-config-bind
which does NOT have this problem. 

system-config-bind-4.0.0-4 is being readied for inclusion in RHEL-4-U2
(I'm just completing the user guide and manual at the moment, and it
lacks non-English locale translations currently) and will be making
its way through our QA process - but it does at least work better than
redhat-config-bind-2.0.0-14.2 .

Comment 3 Ian Laurie 2005-03-11 22:22:38 EST
Jason,  On my RHEL-3-U4 Box:

server# system-config-bind
Traceback (most recent call last):
  File "/usr/sbin/system-config-bind", line 29, in ?
    import Debug
  File "/usr/sbin/../share/system-config-bind/Debug.py", line 9, in ?
    import datetime
ImportError: No module named datetime
server#

I suspect this is a dependancy issue of some kind?

Comment 4 Ian Laurie 2005-03-11 22:34:57 EST
OK, it seems to work on a RHEL-4 box.
Comment 8 Jason Vas Dias 2005-06-02 21:37:52 EDT
A version which fixes these problems, redhat-config-bind-4.0.0-16,
is now submitted to RHEL-3 and should be in RHEL-3-U6 . Meanwhile,
it can be downloaded from: 
http://people.redhat.com/~jvdias/redhat-config-bind
Comment 9 Ian Laurie 2005-06-06 04:53:02 EDT
Still causes me grief (also I notice no icon in the menu):

server# redhat-config-bind
Traceback (most recent call last):
  File "/usr/sbin/redhat-config-bind", line 204, in ?
    GUI(sys.argv)
  File "/usr/sbin/redhat-config-bind", line 104, in __init__
    self.bind=BIND(self, argv)
  File "/usr/sbin/../share/redhat-config-bind/BIND.py", line 88, in __init__
    self.load()
  File "/usr/sbin/../share/redhat-config-bind/BIND.py", line 188, in load
    self.zoneTree = ZoneTree(self)
  File "/usr/sbin/../share/redhat-config-bind/ZoneTree.py", line 1035, in __init__
    s.load()
  File "/usr/sbin/../share/redhat-config-bind/ZoneTree.py", line 1043, in load
    s.store.append(svr,[s.server_pic, _('Server Controls'), '',
DNS.Controls(s.bind.nmdc)])
  File "/usr/sbin/../share/redhat-config-bind/DNS.py", line 986, in __init__
    s.inets.append(
  File "/usr/sbin/../share/redhat-config-bind/DNS.py", line 879, in __init__
    raise ACL.Undefined(s,v)
DNS.Undefinedserver#

As I have "hand crafted" bind files, could it be my coding causing this?
Comment 10 Jason Vas Dias 2005-06-06 13:41:57 EDT
Thanks for reporting this problem - it has exposed an error in the code that is
checking for undefined ACLs .
BIND versions < 9.3.1 have a named-checkconf that does not report
errors where an undefined ACL is referenced, yet these prevent 
named from running (ISC bug #13101), so r-c-b tries to detect and warn 
the user about them. 
However, it seems the checking was getting the case insensitivity
wrong, so if you had named an ACL with uppercase letters, this was not
checked correctly :( . It also wasn't warning for undefined ACLs in  
"controls inet ... allow { ... }"  but would exit with an error.
So either you had referenced an undefined ACL in your controls allow { ... }
ACL, or an ACL with uppercase letters.
This is now fixed with redhat-config-bind-4.0.0-17: it now performs the
undefined ACL check case-insensitively, and will exit with a GUI error
dialog if a genuinely undefined ACL is reference in a controls "allow" ACL .
Please try out the new version, available from:
 http://people.redhat.com/~jvdias/redhat-config-bind
Comment 11 Ian Laurie 2005-06-09 04:55:35 EDT
New version "works" in that it doesn't crash, but it looks like it
isn't processing any "include" statements, would that be right?

I have the following code:

...
include "/etc/rndc.key";
...
controls {
    inet 127.0.0.1 port 953 allow { localhost; } keys { rndckey; };
};
...

On launch I get the error:

named.conf "controls" statement contains a reference to undefined ACL "rndckey".

However if I paste the contents of the include file in named.conf it starts OK.
As the rndc command works I would guess the file is getting included correctly
by the bind package, but not by redhat-config.bind.

Comment 12 Jason Vas Dias 2005-06-09 11:30:45 EDT
This is very strange - I can't reproduce the last problem - I have exactly
the same in my named.conf:

   include "/etc/rndc.key";
   controls {
      inet 127.0.0.1 port 953 allow { localhost; } keys { rndckey; };
   };

Where my rndc.key file contains:
  key "rndckey" {
        algorithm       hmac-md5;
        secret "RXKDbL4YU1pYv0djmAhqXcpM9rnataxk8BVaVBDaoultmOWLL2k9LboIeuu0";
  };

redhat-config-bind starts up fine and displays the "rndckey" key record OK in
the GUI .

Do your rndc.key file contents look any different (aside from the "secret") ? 

Yes, redhat-config-bind DOES process include statements OK. But, as named does,
it prefixes any path given in "include"s with the chroot directory - do you
have $ROOTDIR defined in /etc/sysconfig/named ? 

If so, /etc/rndc.key should be a link to $ROOTDIR/etc/rndc.key - I've verified
that if $ROOTDIR is defined, redhat-config-bind loads $ROOTDIR/etc/rndc.key
regardless of whether the link exists or not. 

If there was a problem reading an include file, you'd get a dialog stating
"Initialisation Error:
 /etc/named.conf:...: open: /etc/rndc.key: file not found
" . I've verified this works too. 

Are you sure you have ONLY redhat-config-bind-4.0.0-17 installed ? 
Try
 # rpm -e redhat-config-bind; rpm -ivh redhat-config-bind-4.0.0-17.noarch.rpm
Does the problem persist after this ? (If so, this could be an RPM upgrade 
problem).

I've also verified that different spellings of the include directive also work:
 '  InCludE
       "rndc.key"
    ;
 '
works for me too.

So I'm a bit at a loss to explain this problem.

If possible, please tar up and email me all your named conf files - I'll ensure
they remain confidential :
  # . /etc/sysconfig/named
  # tar -cpf - $ROOTDIR{/etc/named.conf,/etc/rndc*,/var/named} | 
    gzip > /tmp/named.tar.gz
and email the named.tar.gz file to jvdias@redhat.com - thank you!





       
Comment 13 Ian Laurie 2005-06-09 17:39:18 EDT
Jason, I am also "ROOTDIR=/var/named/chroot" and /etc/rndc.key is a link to
/var/named/chroot/etc/rndc.key.

Thus I've sent you the whole /var/named structure.

If you need anything else pls let me know.
Comment 14 Jason Vas Dias 2005-06-10 13:00:58 EDT
Many thanks for the information - it exposed the bug, which was a
problem when a non "{}" named.conf entity was the FIRST entry in 
named.conf. This is now fixed with redhat-config-bind-4.0.0-18,
available at: http://people.redhat.com/~jvdias/redhat-config-bind .
I've found now problems with this version so far - please try it
out and let me know of any issues. Thank you, Jason.
Comment 15 Ian Laurie 2005-06-10 17:37:27 EDT
Jason, seems to work fine.  I intend to play and explore with it 
over the weekend..... after backing up the hand crafted files :)
I'll report the outcome later.

Please note there is still no icon inserted in the menu structure.
Very minor cosmetic issue, but its the only entry in 
"System Settings:Server Settings" without one.  My FC3 box has an
icon (though its a bit weird having a black rather than transparent
background).  Still using that icon would be better than nothing
while a better icon is created (just make the background transparent).

Thank you for your speedy attention to these start-up issues, it is
much appreciated.

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