Bug 146475

Summary: Unable to startup "system-config-bind"
Product: [Fedora] Fedora Reporter: Makoto YUI <yuin>
Component: system-config-bindAssignee: Jason Vas Dias <jvdias>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: patpertusus
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: system-config-bind-4.0.0-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-01-30 18:12:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Makoto YUI 2005-01-28 17:56:01 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5)
Gecko/20041111 Firefox/1.0

Description of problem:
When I execute the command "system-config-bind", following error is
caused.
Returing value of lookup_addr function is invalid.

$ system-config-bind
Traceback (most recent call last):
  File "/usr/sbin/system-config-bind", line 32, in ?
    from BIND import *
  File "/usr/share/system-config-bind/BIND.py", line 12, in ?
    import Lookup
  File "/usr/share/system-config-bind/Lookup.py", line 136, in ?
    localhost = Lookup()
  File "/usr/share/system-config-bind/Lookup.py", line 125, in __init__
    (name,s.addr) = s.lookup_addr(host)


Version-Release number of selected component (if applicable):
system-config-bind-4.0.0-1

How reproducible:
Always

Steps to Reproduce:
1. just execute "system-config-bind" as for my environment.

Python 2.3.4 (#1, Oct 26 2004, 16:42:40)
[GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] on linux2


Actual Results:  


Additional info:

This is a patch to resolve the problem.

--- /usr/share/system-config-bind/Lookup.py.orig        2005-01-29
02:22:31.000000000 +0900
+++ /usr/share/system-config-bind/Lookup.py     2005-01-29
02:21:37.000000000 +0900
@@ -46,7 +46,7 @@
                 else:
                     addrs.append(dn)
             return (ipdn, string.join(addrs,' ') + ' ' +
string.join(cns,' '))
-        return None
+        return (None, None)

     def hostname(s):
         r = commands.getstatusoutput(s.hostname_cmd)

Comment 1 Jason Vas Dias 2005-01-28 18:33:31 UTC
Aha, it appears you've discovered an interesting edge case where
the local host's name is neither "localhost", nor is it defined in
DNS - which it appears I did not test - sorry!  
Yes, part of the fix is to apply the patch you've suggested, but 
moreover, in case the local hostname is not "localhost" nor in DNS,
but IS in /etc/hosts, we should use the /etc/hosts values; if it is
not in /etc/hosts either, we should revert to localhost.
Unfortunately, we cannot simply use gethostbyaddr() for this purpose,
because this can potentially hang python forever.
I will implement this fix in the next version of system-config-bind.



Comment 2 Jason Vas Dias 2005-01-30 18:10:59 UTC
*** Bug 146606 has been marked as a duplicate of this bug. ***

Comment 3 Jason Vas Dias 2005-01-30 18:12:43 UTC
This is now fixed with system-config-bind-4.0.0-2, which will be in
FC4/rawhide 2005-02-02, and which can be downloaded from:
   http://people.redhat.com/~jvdias/system-config-bind