Bug 725609 - running subscription-manager CLI over ssh is throwing a traceback
running subscription-manager CLI over ssh is throwing a traceback
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Michael Stead
John Sefler
:
Depends On:
Blocks: rhsm-rhel62
  Show dependency treegraph
 
Reported: 2011-07-25 22:09 EDT by John Sefler
Modified: 2011-12-06 12:22 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-06 12:22:47 EST
Type: ---
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 John Sefler 2011-07-25 22:09:07 EDT
Description of problem:

Something bad was committed in the following build 913:
http://hudson.rhq.lab.eng.bos.redhat.com:8080/hudson/view/Entitlement/job/subscription-manager_master/913/

It is causing a traceback when attempting to call the CLI subscription-manager over ssh....

[jsefler@jseflerT510 ~]$ ssh root@jsefler-onprem-62server.usersys.redhat.com subscription-manager -help
root@jsefler-onprem-62server.usersys.redhat.com's password: 
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 54, in <module>
    from subscription_manager import managercli
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 46, in <module>
    from subscription_manager.quantity import valid_quantity
  File "/usr/share/rhsm/subscription_manager/quantity.py", line 17, in <module>
    from subscription_manager.gui.utils import flatten_attributes, allows_multi_entitlement
  File "/usr/share/rhsm/subscription_manager/gui/utils.py", line 23, in <module>
    import gtk
  File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 64, in <module>
    _init()
  File "/usr/lib64/python2.6/site-packages/gtk-2.0/gtk/__init__.py", line 52, in _init
    _gtk.init_check()
RuntimeError: could not open display


The probable offence is in one of these commits:
Commit 8239ce2dbfafeb5abb00dfef0951ec03c5c53c8f by Michael Stead
Commit 32614970381e53f323503a82e35683f1031a11eb by Michael Stead

Version-Release number of selected component (if applicable):
subscription-manager-0.96.4-1.git.62.75efb0a.el6.x86_64
python-rhsm-0.96.7-1.git.4.ae2c338.el6.noarch
Comment 1 Michael Stead 2011-07-26 08:28:00 EDT
Fixed by 7bb47656d90786d37ab75c9be4158d6d80b5a7f3

CLI was using code that loaded GTK. Refactored this out to fix the problem.
Comment 3 John Sefler 2011-07-26 09:21:50 EDT
Verifying Version...
[root@jsefler-onprem-62server ~]# rpm -q subscription-manager
subscription-manager-0.96.4-1.git.63.7bb4765.el6.x86_64



[jsefler@jsefler ~]$ ssh root@jsefler-onprem-62server.usersys.redhat.com subscription-manager --help
root@jsefler-onprem-62server.usersys.redhat.com's password: 

Usage: subscription-manager [options] MODULENAME --help

Primary Modules:

	list           List subscription and product information for this machine
	refresh        Pull the latest subscription data from the server
	register       Register the machine to the server
	subscribe      Subscribe the registered machine to a specified product
	unregister     Unregister the machine from the server
	unsubscribe    Unsubscribe the machine from all or specific subscriptions

Other Modules (Please consult documentation):

	clean          Remove all local consumer and subscription data without effecting the server
	environments   Display the environments available for a user
	facts          Work with the current facts for this machine
	identity       Display the identity certificate for this machine or request a new one
	orgs           Display the orgs available for a user
	redeem         Attempt to redeem a subscription for a preconfigured machine
	repos          List the repos which this machine is entitled to use

[jsefler@jsefler ~]$ 


Fixed.  Moving to VERIFIED
Comment 4 errata-xmlrpc 2011-12-06 12:22:47 EST
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-2011-1695.html

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