Bug 658738 - 'module' object has no attribute 'check_output'
Summary: 'module' object has no attribute 'check_output'
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Justin Harris
QA Contact: John Sefler
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:
Last Closed: 2011-05-19 13:37:50 UTC
Target Upstream Version:

Attachments (Terms of Use)

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
[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
  File "/usr/share/rhsm/managercli.py", line 134, in main
  File "/usr/share/rhsm/managercli.py", line 306, in _do_command
  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
  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
[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
[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.


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