Bug 919432 - rhn-profile-sync throws "exceptions.TypeError: refresh() takes no arguments (1 given)" due to code in rhn-virtualization-host
Summary: rhn-profile-sync throws "exceptions.TypeError: refresh() takes no arguments (...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rhn-client-tools
Version: 5.10
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Stephen Herr
QA Contact: Dimitar Yordanov
URL:
Whiteboard:
Depends On:
Blocks: 997637
TreeView+ depends on / blocked
 
Reported: 2013-03-08 12:57 UTC by Jan Hutař
Modified: 2014-09-16 00:25 UTC (History)
4 users (show)

Fixed In Version: rhn-client-tools-0.4.20.1-8-el5
Doc Type: Bug Fix
Doc Text:
Cause: rhn-client-tools is incompatible with an old version of the rhn-virtualization-host package. Consequence: The error in the subject could be thrown if you run the rhn-profile-sync utility. Fix: Correctly mark the Conflicting package versions in rhn-client-tools' spec file. Result: It is now impossible to have incompatible packages installed, so the error cannot occur.
Clone Of:
: 997637 (view as bug list)
Environment:
Last Closed: 2014-09-16 00:25:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1215 0 normal SHIPPED_LIVE rhn-client-tools bug fix update 2014-09-16 04:16:07 UTC

Description Jan Hutař 2013-03-08 12:57:59 UTC
Description of problem:
rhn-profile-sync throws "exceptions.TypeError: refresh() takes no arguments (1 given)" traceback due to code in rhn-virtualization-host.


Version-Release number of selected component (if applicable):
rhn-virtualization-host-5.4.34-4.el5sat
rhn-client-tools-0.4.20-86.el5.noarch


How reproducible:
always


Steps to Reproduce:
1. # rhn-profile-sync


Actual results:
# tail /var/log/up2date
[...]
[Fri Mar  8 00:32:54 2013] up2date successfully retrieved authentication token from up2date server
[Fri Mar  8 00:32:54 2013] up2date Updating package profile
[Fri Mar  8 00:32:59 2013] up2date 
Traceback (most recent call last):
  File "/usr/sbin/rhn-profile-sync", line 54, in ?
    cli.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 66, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhn-profile-sync", line 49, in main
    support.refresh(True)
exceptions.TypeError: refresh() takes no arguments (1 given)

[Fri Mar  8 00:33:04 2013] up2date updateLoginInfo() login info
[...]


Expected results:
No traceback in /var/log/up2date and rhn-profile-sync exits with reasonable exit code.

Comment 3 Stephen Herr 2013-03-28 18:38:20 UTC
Huh, the rhn-virtualization package appears to not have been updated for RHEL 5. You will run into this error anytime you run rhn-profile-sync with rhn-virtualization installed on a RHEL 5 system. 

We need to update rhn-virtualization and release new rhn-virtualization and rhn-client-tools packages to fix this.

Comment 4 Stephen Herr 2013-03-28 18:54:38 UTC
Oh, never mind, I was looking in the wrong place for the rhn-virtualization changes.

So rhn-virtualization should be version rhn-virtualization-5.4.34-3-sat or higher in order to avoid this error, which it is.

rhn-client-tools has correctly conflicted with lower versions of rhn-virtualization since rhn-client-tools-0.4.20-77, so that should be fine too.

I don't understand how you are getting this error if you really have the package versions installed that you say you do. Can you still reproduce the error?

Comment 5 Niels de Vos 2013-04-23 08:23:34 UTC
I just hit this Bug on RHEL-6.4 registered to RHN Classic using rhn-client-tools-1.0.0.1-4.el6.noarch. Should this Bug be cloned to RHEL-6.4/rhn-client-tools?

# rhn-profile-sync -v
Updating package profile...
Updating hardware profile...
Updating virtualization profile...
An error has occurred:
<type 'exceptions.TypeError'>
See /var/log/up2date for more information

And in /var/log/up2date:
[Tue Apr 23 10:05:55 2013] up2date updateLoginInfo() login info
[Tue Apr 23 10:05:55 2013] up2date logging into up2date server
[Tue Apr 23 10:05:56 2013] up2date successfully retrieved authentication token from up2date server
[Tue Apr 23 10:05:56 2013] up2date Updating package profile
[Tue Apr 23 10:06:19 2013] up2date 
Traceback (most recent call last):
  File "/usr/sbin/rhn-profile-sync", line 56, in <module>
    cli.run()
  File "/usr/share/rhn/up2date_client/rhncli.py", line 84, in run
    sys.exit(self.main() or 0)
  File "/usr/sbin/rhn-profile-sync", line 51, in main
    support.refresh(True)
<type 'exceptions.TypeError'>: refresh() takes no arguments (1 given)

Comment 7 Stephen Herr 2013-08-14 19:57:27 UTC
I still cannot reproduce:

# rpm -q rhn-client-tools
rhn-client-tools-0.4.20.1-4
# rpm -q rhn-virtualization-host
rhn-virtualization-host-5.4.34-5.el5sat
# rhn-profile-sync -v
Updating package profile...
Updating hardware profile...
Updating virtualization profile...
#

Can someone please verify what the package versions are when they encounter this error?

Comment 8 Stephen Herr 2013-08-14 20:04:11 UTC
(In reply to Niels de Vos from comment #5)
> I just hit this Bug on RHEL-6.4 registered to RHN Classic using
> rhn-client-tools-1.0.0.1-4.el6.noarch. Should this Bug be cloned to
> RHEL-6.4/rhn-client-tools?
> 

What version of rhn-virtualization-host do you have installed? If you update it to the latest does that solve the problem?

Comment 9 Stephen Herr 2013-08-15 20:33:59 UTC
The problem here, as far as I can see, is that rhn-client-tools does not *correctly* mark itself as conflicting with rhn-virtualization-host.

RHEL 5 and 6 rhn-client-tools have a line in the spec file:
Conflicts: rhn-virtualization < 5.4.34-3

but that should be:
Conflicts: rhn-virtualization-host < 5.4.34-3

In both cases (RHEL 5 and 6) the latest rhn-client-tools works fine with the latest rhn-virtualization-host, so one could make the argument that this bug is already fixed and should be closed currentrelease. However, it would be nice if the packages did not let you install old incompatible versions and get into this situation.

Unfortunately the fix would be to correct rhn-client-tools' conflicts statements, which means this is a RHEL bug against the rhn-client-tools component, not a Satellite bug. I will change components accordingly, and also create a clone for RHEL 6.

Comment 10 Stephen Herr 2013-08-15 20:41:37 UTC
Committing to Spacewalk master (not that the version will be different between Spacewalk and RHEL):
10ea89e5f6bf06b42eb69c8ca32a24959de575c4

Comment 11 Jan Hutař 2013-08-15 21:02:14 UTC
Great and thank you.

Comment 13 RHEL Program Management 2014-01-29 09:19:15 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 18 errata-xmlrpc 2014-09-16 00:25:17 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.

http://rhn.redhat.com/errata/RHBA-2014-1215.html


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