Bug 120210
| Summary: | Problems with redhat-config-cluster on x86_64 | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 3 | Reporter: | Lon Hohberger <lhh> |
| Component: | redhat-config-cluster | Assignee: | Jim Parsons <jparsons> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | James Laska <jlaska> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.0 | CC: | 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
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.
*** Bug 123231 has been marked as a duplicate of this bug. *** 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. QA_READY has been deprecated in favor of ON_QA. Please use ON_QA in the future. Moving to ON_QA. |