Bug 491021 - Repomd* (re)generation should be spawned for changes made via API in addition to yum, rhnpush or sat-sync operations
Summary: Repomd* (re)generation should be spawned for changes made via API in addition...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: 520
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Brad Buckingham
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On: 468781
Blocks: 456996 485807
TreeView+ depends on / blocked
 
Reported: 2009-03-18 22:20 UTC by Xixi
Modified: 2018-10-20 01:58 UTC (History)
4 users (show)

Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Clone Of: 468781
Environment:
Last Closed: 2009-09-10 18:41:05 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 1 Xixi 2009-03-18 22:24:56 UTC
Per discussion with Prad, opening a separate BZ than bug 468781 for scheduling repomd regeneration triggered by changes made via RHN API as well.

Comment 2 Brad Buckingham 2009-03-23 20:12:04 UTC
git commit: 3b1be048609b72a91f0a38051af178f87bc1af3e

Based on discussion with Prad, this BZ should ensure that we trigger the repomd regeneration whenever the list of packages contained within a channel is altered.  This may be triggered by invoking the 'ChannelManager.queueChannelChange' that was added as part of bug 468781.

For this BZ, went through the APIs and code to identify which APIs were impacted and updated them (if needed). See below for details.


namespace packages:

- removePackage - uses PackageManager.schedulePackageRemoval which already 
  invokes ChannelManager.queueChannelChange

namespace channel.software:

- addPackages - uses ChannelEditor addPackages->changePackages which already 
  invokes ChannelManager.queueChannelChange

- clone - updated NewChannelHelper.clone to queueChannelChange for the newly 
  cloned channel

- create - n/a, since no packages associated at channel creation time.. 

- delete - uses ChannelManager.deleteChannel which already invokes 
  ChannelManager.queueChannelChange

- mergePackages - updated ChannelSoftwareHandler.mergePackages to invoke 
  queueChannelChange

- removePackages - uses ChannelEditor removePackages->changePackages which
  already invokes ChannelManager.queueChannelChange

namespace errata:
- There aren't any changes needed at this time to the current errata APIs.  
  The reason being the APIs for errata do not alter the content
  of a channel (ie. no package adds/removes)

Comment 3 Brad Buckingham 2009-04-01 14:35:53 UTC
mass move to ON_QA

Comment 4 wes hayutin 2009-06-02 14:35:01 UTC
add packages works..

list.location=/tmp/apilist.txt
sat.version=5.3.0
sat.api.version=10.7
proxy.version=5.1
client for 'http://grandprix.rhndev.redhat.com/rpc/api' - created
logged in (admin/dog8code), token: '631xabe56759daee02272da62518a2fd385e'
client for 'http://grandprix.rhndev.redhat.com/rpc/api' - created
logged in (admin/dog8code), token: '632x7472bf4eaed7aa334ce872b4b862b3b5'
Processing method: channel.software.create

[root@grandprix repodata]# ls -ltra
total 112
drwxr-xr-x  2 root   root 4096 May 30 03:12 rhn-tools-rhel-i386-server-5
drwxr-xr-x  2 root   root 4096 Jun  1 09:37 redhat-rhn-proxy-5.2-server-i386-5
drwxr-xr-x  2 root   root 4096 Jun  1 09:38 redhat-rhn-proxy-5.3-server-i386-5
drwxr-xr-x  2 root   root 4096 Jun  1 10:42 rhn-tools-rhel-x86_64-server-5
drwxr-xr-x  2 root   root 4096 Jun  1 10:45 rhel-x86_64-server-vt-5
drwxr-xr-x  2 root   root 4096 Jun  1 10:49 rhel-i386-server-vt-5
drwxr-xr-x  2 root   root 4096 Jun  1 12:18 clone-rhel-i386-server-vt-5
drwxr-xr-x  2 root   root 4096 Jun  1 15:37 sol8-sun4u-channel-466619671
drwxr-x---  5 apache root 4096 Jun  1 15:42 ..
drwxr-xr-x 14 root   root 4096 Jun  2 00:24 .
drwxr-xr-x  2 root   root 4096 Jun  2 00:29 rhn-tools-rhel-s390x-server-5
drwxr-xr-x  2 root   root 4096 Jun  2 00:39 rhel-s390x-server-5
drwxr-xr-x  2 root   root 4096 Jun  2 00:55 rhel-x86_64-server-5
drwxr-xr-x  2 root   root 4096 Jun  2 00:57 rhel-i386-server-5
[root@grandprix repodata]# ls -ltra
total 120
drwxr-xr-x  2 root   root 4096 May 30 03:12 rhn-tools-rhel-i386-server-5
drwxr-xr-x  2 root   root 4096 Jun  1 09:37 redhat-rhn-proxy-5.2-server-i386-5
drwxr-xr-x  2 root   root 4096 Jun  1 09:38 redhat-rhn-proxy-5.3-server-i386-5
drwxr-xr-x  2 root   root 4096 Jun  1 10:42 rhn-tools-rhel-x86_64-server-5
drwxr-xr-x  2 root   root 4096 Jun  1 10:45 rhel-x86_64-server-vt-5
drwxr-xr-x  2 root   root 4096 Jun  1 10:49 rhel-i386-server-vt-5
drwxr-xr-x  2 root   root 4096 Jun  1 12:18 clone-rhel-i386-server-vt-5
drwxr-xr-x  2 root   root 4096 Jun  1 15:37 sol8-sun4u-channel-466619671
drwxr-x---  5 apache root 4096 Jun  1 15:42 ..
drwxr-xr-x  2 root   root 4096 Jun  2 00:29 rhn-tools-rhel-s390x-server-5
drwxr-xr-x  2 root   root 4096 Jun  2 00:39 rhel-s390x-server-5
drwxr-xr-x  2 root   root 4096 Jun  2 00:55 rhel-x86_64-server-5
drwxr-xr-x  2 root   root 4096 Jun  2 00:57 rhel-i386-server-5
drwxr-xr-x  2 root   root 4096 Jun  2 10:34 apitestchannel-765451039
drwxr-xr-x 15 root   root 4096 Jun  2 10:34 .
[root@grandprix repodata]#

Comment 5 wes hayutin 2009-06-02 14:51:32 UTC
remove package is good

 00:57 rhel-i386-server-5
drwxr-xr-x  2 root   root 4096 Jun  2 10:36 apitestchannel-765451039
drwxr-xr-x  2 root   root 4096 Jun  2 10:51 apitestchannel-233798989

Comment 6 wes hayutin 2009-06-02 15:07:58 UTC
merge packages works
clone channel ok..


verified 5/29

Comment 7 John Matthews 2009-08-04 21:22:11 UTC
Move to RELEASE_PENDING
Stage ISO 7/24

Comment 8 Brandon Perkins 2009-09-10 18:41:05 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/RHEA-2009-1434.html


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