Bug 658738

Summary: 'module' object has no attribute 'check_output'
Product: Red Hat Enterprise Linux 6 Reporter: John Sefler <jsefler>
Component: subscription-managerAssignee: Justin Harris <jharris>
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: urgent Docs Contact:
Priority: low    
Version: 6.1CC: jharris, jkeck
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-19 13:37:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 639436    

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