RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 658738 - 'module' object has no attribute 'check_output'
Summary: 'module' object has no attribute 'check_output'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.1
Hardware: Unspecified
OS: Unspecified
low
urgent
Target Milestone: rc
: ---
Assignee: Justin Harris
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: Entitlement-Beta
TreeView+ depends on / blocked
 
Reported: 2010-12-01 05:49 UTC by John Sefler
Modified: 2013-07-04 21:09 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-05-19 13:37:50 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0611 0 normal SHIPPED_LIVE new package: subscription-manager 2011-05-18 17:56:21 UTC

Description John Sefler 2010-12-01 05:49:48 UTC
Description of problem:
regression in subscription-manager register

Version-Release number of selected component (if applicable):
[root@jsefler-onprem01 ~]# rpm -q subscription-manager
subscription-manager-0.93.2-1.git.37.f62c3cc.fc12.i386
[root@jsefler-f12-candlepin candlepin]# git show-ref master
6d871e5127ac0ef1d31f2c1ec6146d241369584e refs/heads/master
6d871e5127ac0ef1d31f2c1ec6146d241369584e refs/remotes/origin/master


Steps to Reproduce:
[root@jsefler-onprem01 ~]# subscription-manager register --username=testuser1 --password=password
'module' object has no attribute 'check_output'

^^^^ expected the register to succeed with a UUID and name

Comment 2 John Sefler 2010-12-01 14:18:35 UTC
# tail -f /var/log/rhsm/rhsm.log

2010-12-01 09:17:20,336 [INFO] __init__() @connection.py:258 - Using certificate authentication: key = /etc/pki/consumer/key.pem, cert = /etc/pki/consumer/cert.pem, ca = /etc/rhsm/ca/, insecure = False
2010-12-01 09:17:20,336 [INFO] __init__() @connection.py:261 - Connection Established: host: jsefler-f12-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2010-12-01 09:17:20,337 [INFO] __init__() @connection.py:248 - Using basic authentication as: testuser1
2010-12-01 09:17:20,337 [INFO] __init__() @connection.py:261 - Connection Established: host: jsefler-f12-candlepin.usersys.redhat.com, port: 8443, handler: /candlepin
2010-12-01 09:17:20,394 [ERROR] handle_exception() @managercli.py:46 - exception caught in subscription-manager
2010-12-01 09:17:20,395 [ERROR] handle_exception() @managercli.py:47 - 'module' object has no attribute 'check_output'
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 75, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 66, in main
    return managercli.CLI().main()
  File "/usr/share/rhsm/managercli.py", line 687, in main
    cmd.main()
  File "/usr/share/rhsm/managercli.py", line 134, in main
    self._do_command()
  File "/usr/share/rhsm/managercli.py", line 306, in _do_command
    facts=self.facts.get_facts())
  File "/usr/share/rhsm/facts.py", line 79, in get_facts
    self.facts = self.find_facts()
  File "/usr/share/rhsm/facts.py", line 96, in find_facts
    hw_facts = hwprobe.Hardware().getAll()
  File "/usr/share/rhsm/hwprobe.py", line 180, in getAll
    self.getVirtInfo()
  File "/usr/share/rhsm/hwprobe.py", line 160, in getVirtInfo
    host_type = subprocess.check_output('virt-what').strip()
AttributeError: 'module' object has no attribute 'check_output'

Comment 3 John Sefler 2010-12-01 14:36:18 UTC
[root@jsefler-onprem01 ~]# rpm -q python
python-2.6.5-3.el6.x86_64
[root@jsefler-onprem01 ~]# uname -a
Linux jsefler-onprem01.usersys.redhat.com 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux
[root@jsefler-onprem01 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.0 (Santiago)

Comment 4 Justin Harris 2010-12-01 14:49:12 UTC
I used a method call that was too new.  Fixing now.

Comment 5 Justin Harris 2010-12-01 16:03:21 UTC
Switched to use subprocess.Popen for compatibility.

Comment 6 John Sefler 2010-12-01 22:36:22 UTC
[root@jsefler-onprem01 ~]# rpm -q subscription-manager
subscription-manager-0.93.2-1.git.48.295f799.fc12.i386
[root@jsefler-onprem01 ~]# subscription-manager register --username=testuser1 --password=password
114c0dd8-40cf-4173-904d-81cc00b755cf testuser1
[root@jsefler-onprem01 ~]# 

Moving to VERIFIED

Comment 7 errata-xmlrpc 2011-05-19 13:37:50 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/RHEA-2011-0611.html


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