[Spacewalk-list] Cloning a channel with errata

Jan Hutař jhutar at redhat.com
Mon Jul 9 06:56:36 UTC 2012


On Wed, 27 Jun 2012 16:14:08 -0700 Matthew Ceroni
<matthewceroni at gmail.com> wrote:

> Through the API I have written a script that will automated
> the cloning of a channel (this is a mirror of RHEL 6 x86_64)
> every quarter.
> 
> Initially when calling the the software.channel.clone call I
> set the original_state flag to false so that all errata was
> cloned. The issue that I ran into is that that call would
> return almost instantly. Since I had further API calls to make
> they proceeded on but failed with an internal server 500
> issue. What I discovered is that the clone API call completed
> but in the background Spacewalk was still busy cloning all the
> errata. That is why subsequent API calls failed. As a
> temporary work around I added a sleep statement for 20 minutes
> after the clone call. I say that is temporary because I don't
> thing it is a good permanent solution since I really have no
> way to determine if the 20 minutes is sufficient to complete
> the clone of all errata. It works now but may fail as the
> channels get bigger and bigger.

Hello,
I have seen similar stuff and I have been told erratas cloning
runs asynchronously in background. Could you count errata number
(or generate list of erratas) in original channel and then in
loop with some small sleep check if your cloned channel have
target number of erratas?

> The second solution I came up with was to clone the channel in
> it's original state. Then use the API errata.clone call to
> clone each individual errata. The issue I am running into with
> this is once it is done, the # of packages in the original
> channel is always slightly off from the cloned channel (cloned
> channel being less). I view the # of errata and it matches
> with the original channel. For instance when I ran this
> yesterday the original channel had 8222 packages with 1314
> errata. The cloned channel came out with 8221 packages and
> 1314 errata. Doing a compare of the channels showed the
> missing package in the cloned channel was an updated version
> of the pcacct package.

Could you give exact name-version-release.arch of the
problematic package? And is the package same each time you do
the cloning? Does it happen when you do cloning via WebUI?

Thanks in advance,
Jan



> Can anyone explain this? Are all modifications from the
> original state of the channel not reflected in some type of
> errata? So the fact that I cloned all errata (and the total
> numbers match up) why would the package # be slightly off?
> 
> Any help would be appreciated. Whether it be an explanation of
> my issue above or a third solution to clone with errata.
> 
> Thanks


-- 
Jan Hutar     Systems Management QA
jhutar at redhat.com     Red Hat, Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20120709/25c3a773/attachment.sig>


More information about the Spacewalk-list mailing list