Bug 1181286

Summary: [RHEL 5 and 6] koan errors with "object has no attribute 'check_output'" error
Product: Red Hat Satellite 5 Reporter: Stephen Herr <sherr>
Component: ClientAssignee: Stephen Herr <sherr>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: high Docs Contact:
Priority: urgent    
Version: 570CC: aflierl, bhamrick, bkruell, cperry, cww, ebaeuml, jentrena, jhutar, jtesar, lpramuk, mkoch, mtessun, ohadlevy, pablo.iranzo, taw, xdmoon
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: koan-2.0.7-53 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1002467 Environment:
Last Closed: 2015-01-14 12:43:20 UTC Type: Bug
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: 1002467    
Bug Blocks: 1127217    

Description Stephen Herr 2015-01-12 19:36:09 UTC
+++ This bug was initially created as a clone of Bug #1002467 +++

koan-2.0.7-51.el6sat.noarch

It works on RHEL7 only!

D: do_call kickstart_guest.initiate('<SAT>', '<VHOST>:1:rhel6.6', 'qemu', 5, 'rhel6.6', 512, 1, 3, 'virbr0', '/var/lib/libvirt/images/rhel6.6', ' '){'cache_only': None}
- looking for Cobbler at http://<SAT>/cobbler_api
- reading URL: http://<SAT>/cblr/svc/op/ks/system/<VHOST>:1:rhel6.6
install_tree: http://<SAT>/ty/5IPzFoUa
- ['rpm', '-q', 'virt-install']
<type 'exceptions.AttributeError'>
'module' object has no attribute 'check_output'
  File "/usr/share/rhn/spacewalkkoan/spacewalkkoan.py", line 243, in initiate_guest
    k.run()
   File "/usr/lib/python2.6/site-packages/koan/app.py", line 377, in run
    self.virt()
   File "/usr/lib/python2.6/site-packages/koan/app.py", line 699, in virt
    return self.net_install(after_download)
   File "/usr/lib/python2.6/site-packages/koan/app.py", line 580, in net_install
    rc, version_str = utils.subprocess_get_response(shlex.split('rpm -q virt-install'), True)
   File "/usr/lib/python2.6/site-packages/koan/utils.py", line 190, in subprocess_get_response
    result = sub_process.check_output(cmd).strip()

Comment 3 Lukas Pramuk 2015-01-13 00:43:23 UTC
VERIFIED. koan-2.0.7-53.el6sat.noarch

1)@SAT: provision KVM guest at RHEL5/6 hypervisor
2)@VHOST: pickup the provisioning action
# rhn_check -vv
...
- ['rpm', '-q', 'virt-install']
- ['rpm', '-q', 'python-virtinst']
libvirtd (pid  26736) is running...
- ['virt-install', '--version']
- adding disk: /var/lib/libvirt/images/kvm.53 of size 3 (driver type=None)
- ['virt-install', '--connect', 'qemu:///system', '--name', 'kvm.53', '--ram', '512', '--vcpus', '1', '--autostart', '--vnc', '--virt-type', 'kvm', '--machine', 'pc', '--extra-args=ks=http://<SAT>/cblr/svc/op/ks/system/<VHOST>:1:kvm.53 ksdevice=link kssendmac lang= text ', '--location', 'http://<SAT>/ty/xwfQXG7B/', '--os-variant', 'rhel6', '--disk', 'path=/var/lib/libvirt/images/kvm.53,size=3', '--network', 'bridge=virbr0,mac=00:16:3e:03:6f:cc', '--wait', '0', '--noautoconsole']

Starting install...
Retrieving file .treeinfo...                                                                     | 3.7 kB     00:00 ...
Retrieving file vmlinuz...                                                                       | 7.9 MB     00:00 ...
Retrieving file initrd.img...                                                                    |  66 MB     00:00 ...
Allocating 'kvm.53'                                                                             | 3.0 GB     00:00
Creating domain...                                                                               |    0 B     00:00
Domain installation still in progress. You can reconnect to
the console to complete the installation process.
None
- polling for virt completion
- install is still running, sleeping for 1 minute (0)
- install is still running, sleeping for 1 minute (1)
- install is still running, sleeping for 1 minute (2)
- install is still running, sleeping for 1 minute (3)
- install is still running, sleeping for 1 minute (4)
- install is still running, sleeping for 1 minute (5)
- shutdown VM detected, is the install done?  Restarting!
D: rpcServer: Calling XMLRPC registration.virt_notify
D: Sending back response(0, 'Virtual kickstart initiate succeeded', {})
D: do_call packages.checkNeedUpdate('rhnsd=1',){}
D: Called refresh_rpmlist
Updating package profile
D: rpcServer: Calling XMLRPC registration.welcome_message
D: rpcServer: Calling XMLRPC registration.update_packages
D: local action status: (0, 'rpmlist refreshed', {})
D: rpcServer: Calling XMLRPC registration.welcome_message

Comment 5 errata-xmlrpc 2015-01-14 12:43:20 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.

https://rhn.redhat.com/errata/RHBA-2015-0051.html