Bug 120210

Summary: Problems with redhat-config-cluster on x86_64
Product: Red Hat Enterprise Linux 3 Reporter: Lon Hohberger <lhh>
Component: redhat-config-clusterAssignee: Jim Parsons <jparsons>
Status: CLOSED CURRENTRELEASE QA Contact: James Laska <jlaska>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: cluster-maint, danderso, jturner, lhh, pas37
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: RHCS3.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-15 17:38:20 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 Lon Hohberger 2004-04-06 20:31:39 UTC
This was submitted by pas37:

(Original here:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=120085)

1.)  Trying to add or modify a member in the redhat-config-cluster
configuration screen results in the following trace:

Traceback (most recent call last):
  File "/usr/share/redhat-config-cluster/configure/memberDialog.py",
line 68, in on_okbutton_clicked
    self.member.validate(options)
  File
"/usr/share/redhat-config-cluster/configure/clusterpkg/member_module.py",
line 131, in validate
    if not ipconvert.ipIsInSameNetAsHost(dns_ipaddress, netmask):
  File
"/usr/share/redhat-config-cluster/configure/clusterpkg/util_ipconvert_module.py",
line 101, in ipIsInSameNetAsHost
    submitted_ip_num = self.dottedQuadToNum(submitted_ip)
  File
"/usr/share/redhat-config-cluster/configure/clusterpkg/util_ipconvert_module.py",
line 26, in dottedQuadToNum
    return struct.unpack('>L', socket.inet_aton(ip))[0]
struct.error: unpack str size does not match format

Comment 1 Phillip Sorensen 2004-04-06 21:07:04 UTC
I have looked into this more today and found out that the
socket.inet_aton fuction in python returns 8 bytes on 64bit machine.

If I change the '>L' to '>Q' in the "return struct.unpack('>L',
socket.inet_aton(ip))[0]" that is at the bottom of the traceback
everything seems fine.

For my system I have changed that line to the following:

try:
    return struct.unpack('>L', socket.inet_aton(ip))[0]
except struct.error:
    return struct.unpack('>Q', socket.inet_aton(ip))[0]


I'm not a experience python programmer so there may be a better way of
accomplishing this.

Comment 2 Jim Parsons 2004-05-27 15:12:23 UTC
*** Bug 123231 has been marked as a duplicate of this bug. ***

Comment 3 Jim Parsons 2004-05-27 15:22:53 UTC
The problem here is that the python socket module call
socket.inet_aton is returning 8 bytes on 64 bit machines, and 4 bytes
on 32 bit machines, despite the fact that the API documentation for
the socket module states that inet_aton always returns 4 bytes. I
believe this is a bug in the python socket code. 

As a fix, I am now having code that calls socket.inet_aton check the
length of the return value, and if the return val length is 4 bytes,
use the '>L' format chars; if return val length is 8 bytes, use the
'>Q' format chars. BTW, using '>Q' on 32 bit arch's causes problems as
well, requiring this issue to be completely conditionalized.

Comment 4 David Lawrence 2006-07-18 03:07:49 UTC
QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future.
Moving to ON_QA.