Bug 1471946 - osad-5.11.63-11.el6 fails with error "AttributeError: 'module' object has no attribute 'convert_url_to_puny'"
Summary: osad-5.11.63-11.el6 fails with error "AttributeError: 'module' object has no ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Client
Version: 570
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Radovan Drazny
URL:
Whiteboard:
Depends On:
Blocks: sat58-errata
TreeView+ depends on / blocked
 
Reported: 2017-07-17 18:20 UTC by Mahesh Taru
Modified: 2020-09-10 10:57 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-15 13:27:53 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2474 0 normal SHIPPED_LIVE Red Hat Network Tools spacewalk-remote-utils bug fix and enhancement update 2017-08-15 17:26:58 UTC

Description Mahesh Taru 2017-07-17 18:20:15 UTC
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 13:43:04 UTC
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 13:50:28 UTC
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 08:43:33 UTC
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 09:41:55 UTC
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 13:27:53 UTC
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.