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
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.