[Spacewalk-list] Cloning a channel with errata

Matthew Ceroni matthewceroni at gmail.com
Wed Jun 27 23:14:08 UTC 2012


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.

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.

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20120627/dbf472b2/attachment.htm>


More information about the Spacewalk-list mailing list