Bug 440418 - Verify rhn-migrate-channel works
Summary: Verify rhn-migrate-channel works
Alias: None
Product: Red Hat Network
Classification: Red Hat
Component: RHN/Backend   
(Show other bugs)
Version: rhn500
Hardware: All Linux
Target Milestone: ---
Assignee: Bryan Kearney
QA Contact: Amy Owens
Whiteboard: US=16796
Depends On:
Blocks: 436329
TreeView+ depends on / blocked
Reported: 2008-04-03 13:55 UTC by James Bowes
Modified: 2013-01-10 09:58 UTC (History)
2 users (show)

Fixed In Version: 5.0.6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-06-26 20:22:59 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description James Bowes 2008-04-03 13:55:58 UTC
We want to remove the old perl script, so verify that the new xmlrpc python code

Comment 1 James Bowes 2008-04-03 15:03:23 UTC
To Test:

 * Select a base channel and shadow channel pair. I used rhel-i386-server-5 and  
   rhel-i386-server-5-shadow. Alternatively, create your own (a shadow channel is 
   just a normal channel with -shadow at the end of the label, and belonging to 
   no channel family)
 * Find some sample errata to use. For example, the file
   'push-erratum-RHSA-2008_0208.py' from 
 * The push-erratum file is a python script to put a specific erratum into an 
   rhn instance. Unfortunately, it is totally unreadable, so its very hard to  
   change any of the values. To work around this, run rhn-errata-manipulator
   from the rhn-content-mgmt source tree:
   cd $RHN_CHECKOUT/tools/trunk/rhn-content-mgmt/src/
   bin/rhn-errata-manipulator.py convert
~/Download/push-erratum-RHSA-2008_0208.py RHSA-2008_0208.json
 * You'll now have a nicely formatted erratum in RHSA-2008_0208.json
 * Open your erratum and change the advisory_name field (I tack JBOWES onto
   the end), and delete all but one of the entries from errata_files, for 
   simplicity's sake. For the remaining file, remove all but one of the entries 
   for "rhn_channel", and change it to your shadow channel.
 * Your erratum is now ready to be added to your channel (wheeee!):
   rhn-errata-manipulator.py upload
http://scripts.back-webdev.redhat.com/BUGZILLA RHSA-2008_0208.json
 * repeat for as many errata as you want to test with.
 * Verify that the packages associated with your errata are now in your shadow  
   channel (in sqlplus):
   select * from rhnchannelpackage where channel_id in (select id from
rhnchannel where label='rhel-i386-server-5');
 * Now, migrate the content of your shadow channel to the real channel:
   rhn-migrate-channel-internal --server dev -m rhel-i386-server-5-shadow --commit
 * Verify that the pacakges assciated with your errata are no longer in the 
   shadow channel
 * Verify that your errata are now in the rhnErrataQueue table.
 * At this point you should be able to run yum list updates or similar on a 
   rhel 5 machine subscribed to dev and see the packages from your errata.
   The webui will not yet be updated, however.
 * After a sufficient amount of time, check the rhnErrataQueue table to see if 
   taskomatic has processed your errata (they will be removed from the table 
   when it has).
 * Now you can run a perl script that is usually run via cron to process the 
   errata for your org:
   (on scripts)
   /usr/share/rhn/scripts/process-errata-cache-queue.pl --org ORG_ID
   you can get your org id from sqlplus:
   select org_id from web_contact where login='your_login'
 * Once the above script is done running, you should be able to see the errata 
   in your list of relevant errata from the webui, and have it show up as 
   applicable to your systems

Comment 2 James Bowes 2008-04-03 16:12:17 UTC
rhn-manipulate-errata requires the python-simplejson module.
It's in fedora and EPEL.

Comment 3 Amy Owens 2008-04-07 13:57:26 UTC
did this on dev-- on friday 4/4 all set

Comment 4 Stephen Herr 2008-06-18 14:27:08 UTC
verified in qa

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