I don’t know that you can really gracefully do this with spacecmd.  I run 
through the API to do a clone as of today operation.

Be aware that there is a rather significant issue with cloned errata.  It’s not 
in the first stage clone, it’s second stage and beyond.  Errata can be 
downloaded or applied to download channels, and cloned down to your development 
channels gracefully.  If you clone errata from dev to QA, (this is the 
problem,) I’ve noted for years that packages referenced in the errata may be 
brought into the channel even if they do not apply to the channel.  The big 
issue is bringing EL7 packages into an EL6 channel, and the like.  To remediate 
this, clone the errata in the 2nd stage of your pipeline, then immediately 
compare channel package contents and make this channel look like it’s clone 
source.

Jeff Kalchik
Land O’Lakes Server Support Managed Resources.

From: spacewalk-list-boun...@redhat.com <spacewalk-list-boun...@redhat.com> On 
Behalf Of Ted Carr
Sent: Friday, May 8, 2020 7:24 AM
To: spacewalk-list@redhat.com
Subject: Re: [Spacewalk-list] [EXTERNAL] Cloning errata to cloned channel using 
spacecmd

Thanks Dean.  I have seen solutions using a similar method when googling.  I am 
just being lazy and was hoping that there was a command like 
'softwarechannel_sync_errata[_tree] <CHANNEL>' that would perform the same 
function as clicking the "Clone Errata" in the Web UI.  Maybe I need to submit 
an RFE.  ;-)

Cheers,
Ted

From: 
spacewalk-list-boun...@redhat.com<mailto:spacewalk-list-boun...@redhat.com> 
<spacewalk-list-boun...@redhat.com<mailto:spacewalk-list-boun...@redhat.com>> 
On Behalf Of Peirce, Dean
Sent: Thursday, May 7, 2020 9:19 PM
To: spacewalk-list@redhat.com<mailto:spacewalk-list@redhat.com>
Subject: Re: [Spacewalk-list] [EXTERNAL] Cloning errata to cloned channel using 
spacecmd

Hi Ted,
I use a combination of spacewalk-report and spacewalk-clone-by-date (from the 
spacewalk-utils package) to clone my channels  DEV -> QA -> PROD based on the 
date.

—Dean

On May 7, 2020, at 10:40 AM, Ted Carr 
<ted.c...@sungardas.com<mailto:ted.c...@sungardas.com>> wrote:

Hi All,

I have been googling around and I haven’t been able to find an answer to my 
question.

I have cloned "oraclelinux7-x86_64" channel to "qa-oraclelinux7-x86_64" a few 
weeks ago and now I want to sync the new errata in original channel to the QA 
channel.  In the past I have used the web interface going to Manage Software 
Channels ---> Channel Name ---> Errata tab ---> Clone and then clicked on 
"Clone Errata" to clone them from the original channel.  Or I have used a 
python script I wrote years ago which does a 
client.channel.software.mergePackages.

I am interested in seeing if I can accomplish the same using 'spacecmd'

I have tried running "spacecmd softwarechannel_errata_sync oraclelinux7-x86_64 
qa-oraclelinux7-x86_64", however from the output it looks like it wants to 
remove all of the errata in the channel and replace it instead of just adding 
the missing errata.  For example:

summary:
  oraclelinux7-x86_64:  2412 errata
  qa-oraclelinux7-x86_64:  2402 errata
    add     2412 errata to   qa-oraclelinux7-x86_64
    remove  2402 errata from qa-oraclelinux7-x86_64

I did notice that the errata in the cloned channel has "CL-" prepended to the 
name:

# spacecmd softwarechannel_errata_diff oraclelinux7-x86_64 
qa-oraclelinux7-x86_64 | grep 2020-1116
INFO: Connected to 
http://swk01/rpc/api<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__http%3A%2Fswk01%2Frpc%2Fapi__%3B!!MXVguWEtGgZw!YMadM3JA4rM0DaYQH5HkZNQXtepySDieL884DJiDOFPApCsXJYglUlLG5wTLHjlWnA%24&data=01%7C01%7Cjdkalchik%40landolakes.com%7C380f999353bb475f564c08d7f34accd2%7C21ab97d78e754056826b9d8ec665c5a3%7C1&sdata=cGY1SBz1hUHweXcjDG6r53XufNH2QmYmzgodP41IMUQ%3D&reserved=0>
 as swadmin
-ELSA-2020-1116 Important:  qemu-kvm security, bug fix, and
+CL-ELSA-2020-1116 Important:  qemu-kvm security, bug fix, and

So I am assuming that is the cause of the behavior.

Is there a way to use spacecmd to just add the missing errata?

Thanks in advance!!

Cheers,
Ted
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list@redhat.com<mailto:Spacewalk-list@redhat.com>
https://urldefense.com/v3/__https://www.redhat.com/mailman/listinfo/spacewalk-list__;!!MXVguWEtGgZw!YMadM3JA4rM0DaYQH5HkZNQXtepySDieL884DJiDOFPApCsXJYglUlLG5wQTzUvCsA$<https://nam03.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2Fwww.redhat.com%2Fmailman%2Flistinfo%2Fspacewalk-list__%3B!!MXVguWEtGgZw!YMadM3JA4rM0DaYQH5HkZNQXtepySDieL884DJiDOFPApCsXJYglUlLG5wQTzUvCsA%24&data=01%7C01%7Cjdkalchik%40landolakes.com%7C380f999353bb475f564c08d7f34accd2%7C21ab97d78e754056826b9d8ec665c5a3%7C1&sdata=IIPk5WRW14Y8DsF7u%2B7YQg4KoG2Ttx7hSRNJA6vCoGA%3D&reserved=0>

Warning: This email originated from outside of Land O’Lakes. DO NOT click on 
links or open attachments unless you recognize the sender and know the content 
is safe.

This message may contain confidential material from Land O'Lakes, Inc. (or its 
subsidiary) for the sole use of the intended recipient(s) and may not be 
reviewed, disclosed, copied, distributed or used by anyone other than the 
intended recipient(s). If you are not the intended recipient, please contact 
the sender by reply email and delete all copies of this message.
_______________________________________________
Spacewalk-list mailing list
Spacewalk-list@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to