Bug 562864 - "Error: OverflowError caught!" when running rhn-satellite-exporter
Summary: "Error: OverflowError caught!" when running rhn-satellite-exporter
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization
Version: 530
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Petr Sklenar
URL:
Whiteboard:
Depends On:
Blocks: sat-channel-dumps
TreeView+ depends on / blocked
 
Reported: 2010-02-08 15:39 UTC by Thomas Cameron
Modified: 2010-03-22 12:05 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-22 12:05:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch for Satellite 5.3.0 (689 bytes, patch)
2010-02-24 10:53 UTC, Milan Zázrivec
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2010:0160 0 normal SHIPPED_LIVE Red Hat Network Satellite bug fix update 2010-03-22 12:04:28 UTC

Description Thomas Cameron 2010-02-08 15:39:42 UTC
Description of problem:
Using rhn-satellite-exporter to create channel dump ISOs results in:

Error: OverflowError caught!

Version-Release number of selected component (if applicable):
spacewalk-backend-tools-0.5.28-38.el5sat

How reproducible:
We have a script to create channel dump ISOs which runs as a cron job in the Dallas SA lab Satellite server.  The script looks like this:

[root@cho cron.weekly]# cat rhn-sat-exp 
#!/bin/bash
if [ -f /var/lock/rhn-sat-exp ]; then
  echo Satellite sync in process, exiting
  exit 1
else
  touch /var/lock/rhn-sat-exp
fi
rhn-satellite-exporter -d /var/satellite/export/rhel-5-i386 --make-isos=dvd --hard-links \
-c rhel-i386-server-5 \
-c rhel-i386-server-vt-5 \
-c rhn-tools-rhel-i386-server-5 \
-c rhel-i386-server-cluster-5 \
-c rhel-i386-server-cluster-storage-5 \
-c rhel-i386-server-fastrack-5 \
-c rhel-i386-server-productivity-5 \
-c rhel-i386-server-supplementary-5

rhn-satellite-exporter -d /var/satellite/export/rhel-5-x86_64 --make-isos=dvd --hard-links \
-c rhel-x86_64-server-5 \
-c rhel-x86_64-server-vt-5 \
-c rhn-tools-rhel-x86_64-server-5 \
-c rhel-x86_64-server-cluster-5 \
-c rhel-x86_64-server-cluster-storage-5 \
-c rhel-x86_64-server-fastrack-5 \
-c rhel-x86_64-server-productivity-5 \
-c rhel-x86_64-server-supplementary-5

rm -f /var/lock/rhn-sat-exp

When the script fires, it does create the ISOs, but we don't get the MD5SUM populated.  It is a zero-byte file.  When the script runs, we get this:

<snip>

 98.63% done, estimate finish Mon Feb  8 01:24:45 2010
 98.88% done, estimate finish Mon Feb  8 01:24:46 2010
 99.12% done, estimate finish Mon Feb  8 01:24:47 2010
 99.36% done, estimate finish Mon Feb  8 01:24:48 2010
 99.61% done, estimate finish Mon Feb  8 01:24:48 2010
 99.85% done, estimate finish Mon Feb  8 01:24:49 2010
Total translation table size: 0
Total rockridge attributes bytes: 2616864
Total directory bytes: 4315136
Path table size(bytes): 2630
Max brk space used 1755000
2048052 extents written (4000 MB)
01:24:53 
Error: OverflowError caught!
Building  DVD Iso ...
---------- 1/9
Creating /var/satellite/export/rhel-5-x86_64/satellite-isos/rhn-export-20100208.0-01.iso

<snip>

Steps to Reproduce:
1.  run rhn-satellite-exporter
2.  check MD5Sum files

  
Actual results:
zero-byte file

Expected results:
populated file

Additional info:
The machine in question is on the RHT network, contact me directly for login info if needed.

Comment 4 Milan Zázrivec 2010-02-24 10:53:19 UTC
Created attachment 396036 [details]
patch for Satellite 5.3.0

This is a valid bug, we try to read whole DVD iso at once, which is
not something python can handle. Full traceback:

Exception Handler Information
Traceback (most recent call last):
  File "/usr/share/rhn/satellite_tools/disk_dumper/iss.py", line 1121, in main
    md5_val = computeMD5sum(os.path.join(iso_output, file))
  File "/usr/share/rhn/satellite_tools/disk_dumper/iss.py", line 1181, in computeMD5sum
    filedata = fileobj.read()
OverflowError: requested number of bytes is more than a Python string can hold

I'm attaching a patch for Satellite 5.3.0. In current Spacewalk (ver. 0.8)
this problem was already resolved in commit

    e61a6e9fc71609f504efb37b0487393a622aee43

which replaced computeMD5sum with getFileChecksum, written in a more
sane way.

Comment 5 Milan Zázrivec 2010-03-04 16:54:44 UTC
satellite.git: 1b27d51317303e9a1be80bca0ffe4b0a775c0d5b

Comment 6 Milan Zázrivec 2010-03-04 16:58:58 UTC
spacewalk-backend-0.5.28-40.1

Comment 8 Petr Sklenar 2010-03-15 12:44:04 UTC
testing procedure:
1. synced full rhel-x86_64-server-5 channel with some children

2.
rhn-satellite-exporter -d /var/satellite/export/rhel-5-x86_64 --make-isos=dvd
--hard-links \
-c rhel-x86_64-server-5 \
-c rhel-x86_64-server-vt-5 \
-c rhn-tools-rhel-x86_64-server-5 \
-c rhel-x86_64-server-cluster-5 \
-c rhel-x86_64-server-cluster-storage-5 \
-c rhel-x86_64-server-fastrack-5 \
-c rhel-x86_64-server-productivity-5 \
-c rhel-x86_64-server-supplementary-5
OLD: Error: OverflowError caught! + md5sum file was empty
NEW, spacewalk-backend-0.5.28-40.1 : md5sum file is correct with right md5 of isos


rhts test was created with custom channel containing 5gigs of packages and its exporting to dvd.iso

RHTSdone=/CoreOS/RHN-Satellite/Regression/bz562864-Error-OverflowError-caught-when-running
CVS: http://cvs.devel.redhat.com/cgi-bin/cvsweb.cgi/tests/RHN-Satellite/rhn-satellite-exporter/Regression/bz562864-Error-OverflowError-caught-when-running/

./manage-channel.py <RHN_USER> <RHN_PASS> https://<RHN_SERVER>/rpc/api CREATE mychannel i386
rhnpush -d dir_with_many_packages -c mychannel --server http://<RHN_SERVER>/APP --nosig --username=<RHN_USER> --password=<RHN_PASS> --force
rhn-satellite-exporter -d /var/satellite/export/mychannel --make-isos=dvd --hard-links -c mychannel

OLD: fails
NEW,spacewalk-backend-0.5.28-40.1: PASSes

Comment 9 Milan Zázrivec 2010-03-16 14:30:41 UTC
spacewalk-backend-0.5.28-48

Comment 11 errata-xmlrpc 2010-03-22 12:05:03 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/RHBA-2010-0160.html


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