Bug 525202 - smoltSendProfile fails on EL5 due to urlparse
Summary: smoltSendProfile fails on EL5 due to urlparse
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: smolt
Version: el5
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Mike McGrath
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-09-23 16:18 UTC by Chad Feller
Modified: 2009-11-10 03:24 UTC (History)
4 users (show)

Fixed In Version: 1.4-2.3.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-10 03:24:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
patch (449 bytes, patch)
2009-09-23 16:18 UTC, Chad Feller
no flags Details | Diff

Description Chad Feller 2009-09-23 16:18:10 UTC
Created attachment 362326 [details]
patch

Description of problem:
smoltSendProfile throws traceback

Version-Release number of selected component (if applicable):
smolt-1.3.1-1.1.el5

How reproducible:
always 

Steps to Reproduce:
1. install smolt from EPEL
2. install python-ctypes (satisfy bug 525156)
3. run smoltSendProfile
  
Actual results:
Traceback (most recent call last):
  File "/usr/bin/smoltSendProfile", line 196, in ?
    proxies=proxies)
  File "/usr/share/smolt/client/smolt.py", line 588, in send
    self.write_pub_uuid(smoonURL,pub_uuid,pub_uuid_file)
  File "/usr/share/smolt/client/smolt.py", line 499, in write_pub_uuid
    pub_uuid_file += ("-"+smoonURLparsed.hostname)
AttributeError: 'tuple' object has no attribute 'hostname'

Expected results:
profile should be sent

Additional info:
This appears to be a Python 2.4 vs 2.6 issue.  urlparse behaves differently between python 2.4 and 2.6.  In 2.4 smoonURLparsed is a tuple, where in python 2.6 it is a urlparse.ParseResult.  According to (http://docs.python.org/library/urlparse.html) that is new in Python 2.5.

The quick and dirty hack might be to just replace:
        admin_token_file += ("-"+smoonURLparsed.hostname)
with
        admin_token_file += ("-"+smoonURLparsed[1])
for python 2.4 boxes such as EL5.

smoltSendProfile works after this change on my boxes.  

Attached is the patch for the above fix.

Comment 1 Răzvan Sandu 2009-10-07 23:20:40 UTC
Hello, 


I've hit this bug on about 100 CentOS machines, all running CentOS 5.3 with the most recent updates (as of October 8, 2009).

The message is:

Send this information to the Smolt server? (y/n) y
Traceback (most recent call last):
  File "/usr/bin/smoltSendProfile", line 196, in ?
    proxies=proxies)
  File "/usr/share/smolt/client/smolt.py", line 588, in send
    self.write_pub_uuid(smoonURL,pub_uuid,pub_uuid_file)
  File "/usr/share/smolt/client/smolt.py", line 499, in write_pub_uuid
    pub_uuid_file += ("-"+smoonURLparsed.hostname)
AttributeError: 'tuple' object has no attribute 'hostname'


Programs versions are:
smolt-1.3.1-1.1.el5
python-2.4.3-24.el5_3.6


Best regards,
Răzvan

Comment 2 Fedora Update System 2009-10-13 20:46:08 UTC
smolt-1.4-2.3.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/smolt-1.4-2.3.el5

Comment 3 Fedora Update System 2009-10-16 19:33:44 UTC
smolt-1.4-2.3.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update smolt'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/EL-5/FEDORA-EPEL-2009-0647

Comment 4 Chad Feller 2009-10-16 21:26:43 UTC
appears to be fixed in smolt-1.4-2.3.el5...

Comment 5 Fedora Update System 2009-11-10 03:24:04 UTC
smolt-1.4-2.3.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.


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