Bug 440418 - Verify rhn-migrate-channel works
Verify rhn-migrate-channel works
Product: Red Hat Network
Classification: Red Hat
Component: RHN/Backend (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Bryan Kearney
Amy Owens
Depends On:
Blocks: 436329
  Show dependency treegraph
Reported: 2008-04-03 09:55 EDT by James Bowes
Modified: 2013-01-10 04:58 EST (History)
2 users (show)

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

Attachments (Terms of Use)

  None (edit)
Description James Bowes 2008-04-03 09:55:58 EDT
We want to remove the old perl script, so verify that the new xmlrpc python code
Comment 1 James Bowes 2008-04-03 11:03:23 EDT
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 12:12:17 EDT
rhn-manipulate-errata requires the python-simplejson module.
It's in fedora and EPEL.
Comment 3 Amy Owens 2008-04-07 09:57:26 EDT
did this on dev-- on friday 4/4 all set
Comment 4 Stephen Herr 2008-06-18 10:27:08 EDT
verified in qa

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