Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 892789

Summary: [RFE] Additional command line switch "--parent" for spacewalk-clone-by-date
Product: [Community] Spacewalk Reporter: Stephen Herr <sherr>
Component: ClientsAssignee: Stephen Herr <sherr>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: high Docs Contact:
Priority: high    
Version: 1.9CC: asanders, cperry, crrobins, dyordano, mmello, pgervase, pvn, xdmoon
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: spacewalk-utils-1.9.9-1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 838122 Environment:
Last Closed: 2013-03-06 18:34:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 838122    
Bug Blocks: 737830, 917805    

Description Stephen Herr 2013-01-07 21:11:51 UTC
+++ This bug was initially created as a clone of Bug #838122 +++

1. Proposed title of this feature request
Additional command line switch --parent for spacewalk-clone-by-date

3. What is the nature and description of the request?
Customer would like the following additions to spacewalk-clone-by-date:
-p, --parent - specify the parent when creating a clone channel of a child channel

4. Why does the customer need this? (List the business requirements here)
Convenience feature to make commands and scripting clearer

5. How would the customer like to achieve this? (List the functional
requirements here)
Add the above command line switch


9. List any affected packages or components.
spacewalk-utils / spacewalk-clone-by-date


--- Additional comment from Stephen Herr on 2013-01-07 14:44:57 EST ---

I can add the --parents switch as you describe, but the functionality actually already exists to do what you want. 

The parent channel of the existent child channels must be specified so that spacewalk-clone-by-date can correctly identify and include packages required as dependencies of erratum that have been released. The parent channel of the clones must be known so that spacewalk-clone-by-date can correctly clone the channels. So I could add an option so that:

spacewalk-clone-by-date -l sherr-child sherr-child-clone --parents sherr-parent sherr-parent-clone -d 2013-01-07

would clone only sherr-child -> sherr-child-clone and get the required parent information from the --parents option. However, This is exactly what happens already if you specify the parent channels via the normal -l or --channels option and the destination parent channel already exists.

So, for example, let's say that I have two channels:

sherr-parent
  |
  > sherr-child

I first run:

spacewalk-clone-by-date -l sherr-parent sherr-parent-clone -y -d 2013-01-07

Now I have:

sherr-parent
  |
  > sherr-child

sherr-parent-clone

I can now run:

spacewalk-clone-by-date -l sherr-child sherr-child-clone -l sherr-parent sherr-parent-clone -y -d 2013-01-07

Which will just clone sherr-child to sherr-child-clone, no changes will be made to sherr-parent-clone since it already exists and is up to date.

This would have left us with:

sherr-parent
  |
  > sherr-child

sherr-parent-clone
  |
  > sherr-child-clone

The only case where the new --parents switch would differ functionally from just specifying --channels again is if for some reason the parent and child channels are cloned to different dates. Let's say in my example that we originally cloned sherr-parent up until 2012-01-01, and then in the second command where we clone sherr-child we cloned to a date of 2013-01-01. Then the second command would also update sherr-parent-clone to be a clone of sherr-parent as of 2013-01-01, which may not be desired behavior. 

I will add the --parents option both because it is simpler / clearer in this use case and as a way to avoid the potentially unwanted dates behavior.

Comment 1 Stephen Herr 2013-01-07 21:17:45 UTC
Committed to Spacewalk master: 87bab5cd6286565be200292eccc91af44059354e

Comment 2 Stephen Herr 2013-03-01 17:06:47 UTC
Marking bug as ON_QA since tonight's build of Spacewalk nightly is a release candidate for Spacewalk 1.9.

Comment 3 Stephen Herr 2013-03-06 18:34:08 UTC
Spacewalk 1.9 has been released.

https://fedorahosted.org/spacewalk/wiki/ReleaseNotes19