Bug 120210 - Problems with redhat-config-cluster on x86_64
Problems with redhat-config-cluster on x86_64
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: redhat-config-cluster (Show other bugs)
3.0
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jim Parsons
James Laska
:
: 123231 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-06 16:31 EDT by Lon Hohberger
Modified: 2013-09-02 01:55 EDT (History)
5 users (show)

See Also:
Fixed In Version: RHCS3.4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-08-15 13:38:20 EDT
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 Lon Hohberger 2004-04-06 16:31:39 EDT
This was submitted by pas37@cornell.edu:

(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 17:07:04 EDT
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 11:12:23 EDT
*** Bug 123231 has been marked as a duplicate of this bug. ***
Comment 3 Jim Parsons 2004-05-27 11:22:53 EDT
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-17 23:07:49 EDT
QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future.
Moving to ON_QA.

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