Bug 570176 - Incremental export with a start-date and sync of a single channel sometime fail on the incremental sync
Summary: Incremental export with a start-date and sync of a single channel sometime fa...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 0.8
Hardware: All
OS: Linux
high
high
Target Milestone: ---
Assignee: Jan Pazdziora (Red Hat)
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space09
TreeView+ depends on / blocked
 
Reported: 2010-03-03 14:36 UTC by Jan Pazdziora (Red Hat)
Modified: 2010-05-05 14:57 UTC (History)
0 users

Fixed In Version:
Clone Of: 563501
Environment:
Last Closed: 2010-05-05 14:57:24 UTC
Embargoed:


Attachments (Terms of Use)

Description Jan Pazdziora (Red Hat) 2010-03-03 14:36:13 UTC
+++ This bug was initially created as a clone of Bug #563501 +++

Escalated to Bugzilla from IssueTracker

Incremental export with a start-date and sync of a single channel sometime fail on the incremental sync with:

ERROR: The dump is missing package data, use --no-rpms to skip this step or fix the content to include package data.
Command exited with non-zero status 25

--- Additional comment from jpazdziora on 2010-03-03 04:29:57 EST ---

Created an attachment (id=397516)
Test dump which we shall use to reproduce.

The attachment contains small dump which is a reproducer of this issue.

Reproducer as follows:

Download the .tar.

# rm -rf /var/cache/rhn/*
# rm -rf dump-bz-563501 dump1 dump2
# mkdir dump1 dump2
# tar xf dump-bz-563501.tar
# cd dump-bz-563501
# PYTHONPATH=/usr/share/rhn python /usr/share/rhn/satellite_tools/satrm.py -v
-c test-i386-1 --force

# satellite-sync -m. -c test-i386-1 --no-rpms
This should import channel test-i386-1 with nine packages.

# cd ../dump1
# rhn-satellite-exporter -d . -ctest-i386-1 --start-date=20100302102047
--end-date=20100302102047 --no-rpms
Use
 # find .
to check that three packages were exported.

Use
 # zcat ./channels/test-i386-1/channel.xml.gz | perl -lne
'/<rhn-channel.+?packages="(.+?)"/ and print $1'
to check that the list of packages returned matches those found by the find
above.

# cd ../dump2
# rhn-satellite-exporter -d . -ctest-i386-1 --start-date=20100302102048
--end-date=20100302102048 --no-rpms
Use
 # find .
to check that six packages were exported.

Use
 # zcat ./channels/test-i386-1/channel.xml.gz | perl -lne
'/<rhn-channel.+?packages="(.+?)"/ and print $1'
to see that it still lists three packages, not six.

^^ This is where the bug is.
You can also check that
 # perl -lne '/<rhn-channel.+?packages="(.+?)"/ and print $1'
/var/cache/rhn/xml-channels/*.xml
still shows the same three values.

# rm -rf /var/cache/rhn/*
# PYTHONPATH=/usr/share/rhn python /usr/share/rhn/satellite_tools/satrm.py -v
-c test-i386-1 --force

# satellite-sync -m. -c test-i386-1 --no-rpms
[...]
ERROR: The dump is missing package data, use --no-rpms to skip this step or fix
the content to include package data.

^^ This is what the customer sees.

--- Additional comment from jpazdziora on 2010-03-03 04:32:25 EST ---

Note that patch b27ece681b37f19b3b5a6e43cc2ead7c1807c972 from Spacewalk master is needed for those rhn-satellite-exporter to actually work, otherwise you get errors like

start date limit: 20100302102047
end date limit: 20100302102047
03:19:12 Gathering channel info...
03:19:12 Error: Channel test-i386-1 not found.

Comment 1 Jan Pazdziora (Red Hat) 2010-03-03 14:40:10 UTC
Fixed in Spacewalk master 816f19af7a5a2e6aca774a0cf96a7ff09a870221.

Comment 2 Jan Pazdziora (Red Hat) 2010-05-03 11:41:42 UTC
This change was tagged as spacewalk-backend-0.9.7-1, moving ON_DEV.

Comment 3 Jan Pazdziora (Red Hat) 2010-05-03 11:42:56 UTC
Moving ON_QA as newer package is in Spacewalk 1.0 repo, for example http://spacewalk.redhat.com/yum/1.0/RHEL/5/i386/spacewalk-backend-1.0.4-1.el5.noarch.rpm.

Comment 4 Miroslav Suchý 2010-05-05 14:57:24 UTC
This bug has been fixed in Spacewalk 1.0.
Closing.


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