Bug 574334

Summary: rhn-satellite-exporter, Error: NameError caught!
Product: [Community] Spacewalk Reporter: Petr Sklenar <psklenar>
Component: ServerAssignee: Michael Mráka <mmraka>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: low    
Version: 0.9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-10 14:48:53 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: 582354    

Description Petr Sklenar 2010-03-17 09:11:09 UTC
Description of problem:


Version-Release number of selected component (if applicable):
[root@pogolinux-2 bz562864-Error-OverflowError-caught-when-running]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.5 (Tikanga)
[root@pogolinux-2 bz562864-Error-OverflowError-caught-when-running]# uname -a
Linux pogolinux-2.rhts.eng.rdu.redhat.com 2.6.18-192.el5PAE #1 SMP Tue Mar 9 11:54:17 EST 2010 i686 athlon i386 GNU/Linux

spacewalk.nightly installed today from http://porkchop.redhat.com/qa/rhts/lookaside/spacewalk-nightly/

spacewalk-backend-0.9.6-1.el5
spacewalk-backend-tools-0.9.6-1.el5

How reproducible:
always

Steps to Reproduce:
1. create custom ch. bug562864-28910
2. push some packages there, in my case 3 packages,
3. rm -rf /tmp/bug562864-28910;mkdir /tmp/bug562864-28910
3. rhn-satellite-exporter -d /tmp/bug562864-28910 --make-isos=dvd --hard-links -c bug562864-28910

  
Actual results:
# rhn-satellite-exporter -d /tmp/bug562864-28910 --make-isos=dvd --hard-links -c bug562864-28910
09:02:59 Gathering channel info...
Appending channels []
09:02:59 Gathering binary RPM info...
09:02:59 Gathering package info...
09:02:59 Gathering errata info...
09:02:59 Gathering kickstart data...
09:02:59 Gathering kickstart files info...

...
Exporting: #################### - Done!
09:02:59 
Error: NameError caught!

Expected results:
dvd or cd isos are created

Additional info:

It part of the test:
/CoreOS/RHN-Satellite/Regression/bz562864-Error-OverflowError-caught-when-running

start following with your name [ if $(whoami) doesn't fit ] :

/usr/bin/single_package.py -S rhts.redhat.com  -e development  -u $(whoami)@redhat.com -w "spacewalk nightly " -a i386 -a x86_64 -d Fedora-12  -t /CoreOS/Spacewalk/Installer/Sanity/Whole-installation/SW-nightly-Oracle-XE-porkchop -t /CoreOS/RHN-Satellite/Regression/bz562864-Error-OverflowError-caught-when-running -t /distribution/reservesys

Comment 1 Petr Sklenar 2010-03-17 09:13:10 UTC
full output:
# rm -rf /tmp/bug562864-28910;mkdir /tmp/bug562864-28910

# rhn-satellite-exporter -d /tmp/bug562864-28910 --make-isos=dvd --hard-links -c bug562864-28910
09:10:17 Gathering channel info...
Appending channels []
09:10:17 Gathering binary RPM info...
09:10:17 Gathering package info...
09:10:17 Gathering errata info...
09:10:17 Gathering kickstart data...
09:10:17 Gathering kickstart files info...


09:10:17 Exporting channel families...
           ____________________
Exporting: #################### - Done!


09:10:17 Exporting arches...
           ____________________
Exporting: #################### - Done!


09:10:17 Exporting arches extra...
           ____________________
Exporting: #################### - Done!


09:10:17 Exporting channel info...
           ____________________
Exporting: #################### - Done!


09:10:17 Exporting blacklists...
           ____________________
Exporting: #################### - Done!


09:10:17 Exporting short packages...
           ____________________
Exporting: #################### - Done!


09:10:17 Exporting binary RPMs...
           ____________________
Exporting: #################### - Done!


09:10:17 Exporting packages...
           ____________________
Exporting: #################### - Done!


09:10:17 Exporting errata...
           ____________________
Exporting: #################### - Done!


09:10:17 Exporting kickstart data...
           ____________________
Exporting: #################### - Done!


09:10:17 Exporting kickstart files...
           ____________________
Exporting: #################### - Done!
09:10:17 
Error: NameError caught!
# echo $?
0
# ls -la /tmp/bug562864-28910
total 80
drwxr-xr-x 10 root root 4096 Mar 17 09:10 .
drwxrwxrwt 23 root root 4096 Mar 17 09:10 ..
drwxr-xr-x  2 root root 4096 Mar 17 09:10 arches
drwxr-xr-x  2 root root 4096 Mar 17 09:10 blacklists
drwxr-xr-x  2 root root 4096 Mar 17 09:10 channel_families
drwxr-xr-x  3 root root 4096 Mar 17 09:10 channels
drwxr-xr-x  5 root root 4096 Mar 17 09:10 packages
drwxr-xr-x  5 root root 4096 Mar 17 09:10 packages_short
drwxr-xr-x  5 root root 4096 Mar 17 09:10 rpms
drwxr-xr-x  2 root root 4096 Mar 17 09:10 satellite-isos
# ls -la /tmp/bug562864-28910/satellite-isos/
total 16
drwxr-xr-x  2 root root 4096 Mar 17 09:10 .
drwxr-xr-x 10 root root 4096 Mar 17 09:10 ..

Comment 2 Michael Mráka 2010-04-07 20:42:30 UTC
Regression was introduced by migration from deprecated popen3 module to subprocess.

Fixed in spacewalk git by

commit 31b630847a9e2d39dcc3fe912730d4b7ed24703f
    Automatic commit of package [spacewalk-backend] release [0.9.19-1].
commit 7a44c1fa569615e560efdf28514c062eb850ff36
    removed commented out code
commit a0303fe8599bd84bf19806a41f539abd23603800
    conditions could be nice english sentences
commit 9905a6a985873cb4abe0658c2246e9702a7c1fc7
    fill option list in once
commit 44488dbc5a1ae82e61b761048ecac9e715c60ac8
    fix of create_isos() in previous commmit made iss_runcommand.py redundant
    removing...
commit 70a2545b9720ff5fddeaccf8def44aa1a8d36441
    don't call python script from python code via shell
commit 0ab72c0e0dadd896bef493a02c87e669b9e2bc03
    we should parse arglist not sys.argv
commit 38ad72471ae7668551338148428eb6f5cf036aeb
    574334 - fixed Error: NameError caught!
    
    detailed errors while debugging code were
    NameError: "global name 'cmd' is not defined"
    and
    NameError: "global name 'types' is not defined"

Comment 3 Michael Mráka 2010-04-15 14:30:50 UTC
Fixed in spacewalk-backend-0.9.19-1.

Comment 4 Michael Mráka 2010-05-10 14:48:53 UTC
This bug has been fixed in Spacewalk 1.0.