Bug 491021 - Repomd* (re)generation should be spawned for changes made via API in addition to yum, rhnpush or sat-sync operations
Repomd* (re)generation should be spawned for changes made via API in addition...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
520
All Linux
medium Severity medium
: ---
: ---
Assigned To: Brad Buckingham
wes hayutin
:
Depends On: 468781
Blocks: 456996 485807
  Show dependency treegraph
 
Reported: 2009-03-18 18:20 EDT by Xixi
Modified: 2010-10-23 04:24 EDT (History)
4 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 468781
Environment:
Last Closed: 2009-09-10 14:41:05 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 Xixi 2009-03-18 18:24:56 EDT
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 16:12:04 EDT
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 10:35:53 EDT
mass move to ON_QA
Comment 4 wes hayutin 2009-06-02 10:35:01 EDT
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 10:51:32 EDT
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 11:07:58 EDT
merge packages works
clone channel ok..


verified 5/29
Comment 7 John Matthews 2009-08-04 17:22:11 EDT
Move to RELEASE_PENDING
Stage ISO 7/24
Comment 8 Brandon Perkins 2009-09-10 14:41:05 EDT
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.