Bug 501024

Summary: rhn-satellite-exporter: Incremental export doesn't work
Product: Red Hat Satellite 5 Reporter: Michael Mráka <mmraka>
Component: Satellite SynchronizationAssignee: Jan Pazdziora (Red Hat) <jpazdziora>
Status: CLOSED ERRATA QA Contact: Šimon Lukašík <slukasik>
Severity: high Docs Contact:
Priority: medium    
Version: 530CC: cperry, fbijlsma, jhutar, jpazdziora, kbaxley, mzazrivec, tao, xdmoon
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-22 12:04:48 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: 531600    
Attachments:
Description Flags
channel_families.xml.gz from step 4.
none
channel_families.xml.gz from step 7. none

Description Michael Mráka 2009-05-15 14:46:53 UTC
Description of problem:
Export of channel to directory which already contains export of another (group of) channels may break satellite-sync. This kind of incremental export should work.

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


How reproducible:
always

Steps to Reproduce:
1. install 2 satellites, sat1 registered to webqa, sa2 disconnected
   make sure you have entitlements for rhel-i386-server-5 and rhel-i386-server-5.0.z on both satellites
as root@sat1:
2. sync rhel-i386-server-5 and rhel-i386-server-5.0.z channel from webqa
3. rhn-satellite-exporter -c rhel-i386-server-5 -d /shared/dir
4. rhn-satellite-exporter -c rhel-i386-server-5.0.z -d /shared/dir
as root@sat2:
5. satelilte-sync -c rhel-i386-server-5 -d /shared/dir
6. satelilte-sync -c rhel-i386-server-5.0.z -d /shared/dir
as root@sat1:
7. rhn-satellite-exporter -c rhel-i386-server-5 -d /shared/dir
as root@sat2:
8. satelilte-sync -c rhel-i386-server-5 -d /shared/dir
9. satelilte-sync -c rhel-i386-server-5.0.z -d /shared/dir
  
Actual results:
1.- 4. ok
5. ...
ERROR: you are not entitled to sync a channel in this set of channels.
Please contact your sales rep or RHN contact
rhel-i386-server-5
6. ok (rhel-i386-server-5.0.z synced)
7. ok
8. ok (this time rhel-i386-server-5 synced)
9. ...
ERROR: you are not entitled to sync a channel in this set of channels.
Please contact your sales rep or RHN contact
rhel-i386-server-5.0.z


Expected results:
both channels synced ok everytime

Additional info:
see channel_families.xml.gz

Comment 1 Michael Mráka 2009-05-15 14:48:08 UTC
Created attachment 344167 [details]
channel_families.xml.gz from step 4.

Comment 2 Michael Mráka 2009-05-18 08:44:54 UTC
Created attachment 344397 [details]
channel_families.xml.gz from step 7.

Comment 3 Michael Mráka 2009-05-18 10:27:14 UTC
IMHO channel_families.xml.gz should not be overwritten but new channel families should be appended to the file.

Comment 4 Brandon Perkins 2009-05-19 16:08:07 UTC
Prad, how hard would this be to fix?  We know its not a regression from previous behavior, but its still bad.

Comment 5 Pradeep Kilambi 2009-05-19 20:40:30 UTC
Yea currently we don't support appending new exports to existing exported directory. If you point to an already existing directory, it will obviously overwrite. If you want to include multiple channel the use case is do 
$ rhn-satellite-export -c ch1 -c ch2 

I dont see an easy non hacky way to fix this for 530. This will need some rewrite to the Channel family dumper.

Comment 6 Frederik Bijlsma 2009-09-08 20:08:54 UTC
is this going to be fixed?
Ran into this today - at least there should be a warning from the export if it is not fixed.

Comment 9 Jan Pazdziora (Red Hat) 2010-02-19 12:11:48 UTC
Fixed in Spacewalk master d860824b6db4787aa6e0f9d53a9bb479bee43466.

Comment 11 Milan Zázrivec 2010-03-04 16:54:26 UTC
satellite.git: 44ef9849b594d3af16c62d2abb1877b8109d9cc3

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

Comment 14 Šimon Lukašík 2010-03-08 11:33:47 UTC
Taking.

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

Comment 25 errata-xmlrpc 2010-03-22 12:04:48 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