Bug 1471946 - osad-5.11.63-11.el6 fails with error "AttributeError: 'module' object has no attribute 'convert_url_to_puny'"
osad-5.11.63-11.el6 fails with error "AttributeError: 'module' object has no ...
Status: CLOSED ERRATA
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client (Show other bugs)
570
x86_64 Linux
high Severity high
: ---
: ---
Assigned To: Michael Mráka
Radovan Drazny
:
Depends On:
Blocks: sat58-errata
  Show dependency treegraph
 
Reported: 2017-07-17 14:20 EDT by Mahesh Taru
Modified: 2017-08-15 09:27 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-15 09:27:53 EDT
Type: Bug
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 Mahesh Taru 2017-07-17 14:20:15 EDT
Description of problem:
After upgrading osad package to latest version osad-5.11.63-11.el6 it fails with error.

Version-Release number of selected component (if applicable):
osad-5.11.63-11.el6

Steps to Reproduce:
1. Update osad to 5.11.63-11.el6 and its dependent packages to latest version i.e
python
jabberpy
osa-common
rhn-client-tools
rhnlib
spacewalk-usix
systemd-sysv
systemd-units

2. Update satellite packages to latest version and schema version
3. Run osad from client:

# osad -vv


Actual results:
Starting osad: 2017-07-12 08:32:12 rhn_log.log_error: Error caught:
Error caught:
2017-07-12 08:32:12 rhn_log.log_error: Traceback (most recent call last):
  File "/usr/share/rhn/osad/jabber_lib.py", line 118, in main
    config = self.read_config()
  File "/usr/share/rhn/osad/osad.py", line 313, in read_config
    server_url = [config.convert_url_to_puny(i.strip()) for i in
server_url.split(';')]
AttributeError: 'module' object has no attribute 'convert_url_to_puny'

Traceback (most recent call last):
  File "/usr/share/rhn/osad/jabber_lib.py", line 118, in main
    config = self.read_config()
  File "/usr/share/rhn/osad/osad.py", line 313, in read_config
    server_url = [config.convert_url_to_puny(i.strip()) for i in
server_url.split(';')]
AttributeError: 'module' object has no attribute 'convert_url_to_puny'

Expected results:

osad should successfully connect to satellite

Additional info:
Lower version of osad works fine.
Comment 1 Michael Mráka 2017-07-25 09:43:04 EDT
Reproducer:
1) # register client to satellite
2) # install osad
   yum install -y osad
3) # put server url twice into server_url
   sed "s|^server_url = .*|server_url = $(awk -F= '/serverURL=/ {print $2 ";" $2}' /etc/sysconfig/rhn/up2date)|" /etc/sysconfig/rhn/osad.conf
4) # run osad
   osad -vv
Comment 2 Michael Mráka 2017-07-25 09:50:28 EDT
Fixed in upstream spacewalk.git by
commit 15b93892d9e4c15017400cb3f5e43d7a19527de9
    1471946 - allow osad to work with older RHEL6 and RHEL7 rhnlib
Comment 4 Michael Mráka 2017-08-03 04:43:33 EDT
Backported to SATELLITE-5.8 
commit 285ce920ff35ffb0539e263a164982b91ddee79a
    1471946 - allow osad to work with older RHEL6 and RHEL7 rhnlib
Comment 7 Radovan Drazny 2017-08-09 05:41:55 EDT
Reproduced on osad-5.11.63-11 using the reproducer from the initial report and comment #1. 

# osad -vv
2017-08-09 05:22:21 rhn_log.log_error: Error caught:
Error caught:
2017-08-09 05:22:21 rhn_log.log_error: Traceback (most recent call last):
  File "/usr/share/rhn/osad/jabber_lib.py", line 118, in main
    config = self.read_config()
  File "/usr/share/rhn/osad/osad.py", line 313, in read_config
    server_url = [config.convert_url_to_puny(i.strip()) for i in server_url.split(';')]
AttributeError: 'module' object has no attribute 'convert_url_to_puny'

Traceback (most recent call last):
  File "/usr/share/rhn/osad/jabber_lib.py", line 118, in main
    config = self.read_config()
  File "/usr/share/rhn/osad/osad.py", line 313, in read_config
    server_url = [config.convert_url_to_puny(i.strip()) for i in server_url.split(';')]
AttributeError: 'module' object has no attribute 'convert_url_to_puny'

Updated to osad-5.11.63-12, and run osad again:
# osad -vv
2017-08-09 05:36:05 jabber_lib._get_jabber_client: Connecting to sat-server.example.com
2017-08-09 05:36:05 jabber_lib.__init__:
2017-08-09 05:36:05 jabber_lib.connect:
2017-08-09 05:36:05 jabber_lib.setup_connection: Connected to jabber server sat-server.example.com

VERIFIED
Comment 9 errata-xmlrpc 2017-08-15 09:27:53 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2474

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