Bug 645444 - service osad start - Python warning - RHEL6
Summary: service osad start - Python warning - RHEL6
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 540
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Jan Pazdziora (Red Hat)
QA Contact: Šimon Lukašík
URL:
Whiteboard:
: 658566 (view as bug list)
Depends On:
Blocks: sat541-blockers
TreeView+ depends on / blocked
 
Reported: 2010-10-21 13:58 UTC by Garik Khachikyan
Modified: 2018-11-30 21:32 UTC (History)
10 users (show)

Fixed In Version: jabberpy-0.5-0.20.el6sat
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-16 17:03:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Garik Khachikyan 2010-10-21 13:58:22 UTC
Description of problem:
Under RHEL6 (where python-2.6 is) the `service osad start` command throws a traceback:
---
Starting osad: /usr/lib/python2.6/site-packages/jabber/jabber.py:68: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import sha, time
Traceback (most recent call last):
  File "/usr/share/rhn/osad/jabber_lib.py", line 254, in setup_connection
    c = self._get_jabber_client(js)
  File "/usr/share/rhn/osad/jabber_lib.py", line 311, in _get_jabber_client
    c.connect()
  File "/usr/share/rhn/osad/jabber_lib.py", line 577, in connect
    jabber.Client.connect(self)
  File "/usr/lib/python2.6/site-packages/jabber/xmlstream.py", line 464, in connect
    else: self._sock.connect((self._hostIP, self._port))
  File "<string>", line 1, in connect
error: [Errno 111] Connection refused
---

I think python conditional import (with python version checking) would resolve the issue.

Version-Release number of selected component (if applicable):
osad-5.9.38-1.el6sat.noarch
jabberpy-0.5-0.19.el6sat.noarch
python-2.6.5-3.el6.x86_64


How reproducible:
Always on RHEL6 (python-2.6) systems enabling osad functionality

Steps to Reproduce:
1. install osad and do service start of it.
2.
3.
  
Actual results:
Python traceback

Expected results:
No tracebacks

Additional info:
will be doing functionality check and provide a feedback in next comments (soon~)

Comment 2 Garik Khachikyan 2010-10-21 14:13:28 UTC
hm - package install scheduled through Satellite UI remains in the events "to be processed" log, i.e. - seems osad is not properly functioning ...

Comment 3 Garik Khachikyan 2010-10-21 14:17:11 UTC
btw: the client system is a RHEL6 x86_64 Server variant installed on kvm virtual guest.

the hostname is: localhost.localdomain

Comment 4 Petr Sklenar 2010-10-26 14:02:55 UTC
I have freshly synced rhn client tools channel and it writes warning:
rhel6, x8664 : 
[root@ibm-x3655-02 ~]# /etc/init.d/osad restart
Shutting down osad: [  OK  ]
Starting osad: /usr/lib/python2.6/site-packages/jabber/jabber.py:68: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import sha, time
[  OK  ]
[root@ibm-x3655-02 ~]# rpm -q osad python
osad-5.9.38-1.el6sat.noarch
python-2.6.5-3.el6.x86_64

Comment 5 Gilles Dubreuil 2010-11-03 07:01:11 UTC
Just got the same message on RHEL5.5.

After the / file-system got filled up to 100% by /var/cache/rhn growing unexpectedly (see bug  628551) the application was stopped more likely improperly and had to extend the / partition.

After restarting the satellite (rhn_satellite restart) the same message appeared and is now present at every restart.

Comment 6 Marlin Whitaker 2010-11-30 17:04:22 UTC
Same result as comment 4. 

I eliminated the warning by doing what it suggests: replaced "sha" with "hashlib" in line 68 of /usr/lib/python2.6/site-packages/jabber/jabber.py. 

Note that osad seemed to be working fine both before and after the change, but not having a deprecation warning is more pleasant.

Comment 7 Thomas Cameron 2010-11-30 18:12:59 UTC
*** Bug 658566 has been marked as a duplicate of this bug. ***

Comment 9 Jan Pazdziora (Red Hat) 2011-04-06 14:28:04 UTC
The reproducer does not really need / uses osad, it's pure jabberpy problem:

# python -c 'from jabber import jabber'
/usr/lib/python2.6/site-packages/jabber/jabber.py:68: DeprecationWarning: the sha module is deprecated; use the hashlib module instead
  import sha, time
# rpm -qf /usr/lib/python2.6/site-packages/jabber/jabber.py
jabberpy-0.5-0.19.el6sat.noarch

Comment 11 Jan Pazdziora (Red Hat) 2011-04-07 09:19:15 UTC
Tagged and built as jabberpy-0.5-0.20.el6sat.

The RHEL 5 package was also rebuilt but I don't think we will respin that one.

Comment 14 Šimon Lukašík 2011-04-19 10:21:53 UTC
Taking.

Comment 15 Šimon Lukašík 2011-04-28 08:27:27 UTC
Switching to VERIFIED:

Deprecation warning is not shown.

Testing procedure:
 - service osad: restart, stop, start, reload
 - sanity check that osad picks up the actions from Satellite 5.4.1

Verified against:
jabberpy-0.5-0.20.el6sat.noarch
osad-5.9.38-1.el6sat.noarch

Comment 16 Milan Zázrivec 2011-06-03 15:11:06 UTC
Verified in stage w/ jabberpy-0.5-0.20 -> release pending.

Comment 17 Clifford Perry 2011-06-16 17:03:27 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-0878.html


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