Bug 892789 - [RFE] Additional command line switch "--parent" for spacewalk-clone-by-date
[RFE] Additional command line switch "--parent" for spacewalk-clone-by-date
Status: CLOSED CURRENTRELEASE
Product: Spacewalk
Classification: Community
Component: Clients (Show other bugs)
1.9
All Linux
high Severity high
: ---
: ---
Assigned To: Stephen Herr
Red Hat Satellite QA List
: FutureFeature, Triaged
Depends On: 838122
Blocks: spacewalk-rfe space19
  Show dependency treegraph
 
Reported: 2013-01-07 16:11 EST by Stephen Herr
Modified: 2013-03-06 13:34 EST (History)
8 users (show)

See Also:
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 13:34:08 EST
Type: Bug
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)
Description Stephen Herr 2013-01-07 16:11:51 EST
+++ 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 16:17:45 EST
Committed to Spacewalk master: 87bab5cd6286565be200292eccc91af44059354e
Comment 2 Stephen Herr 2013-03-01 12:06:47 EST
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 13:34:08 EST
Spacewalk 1.9 has been released.

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

Note You need to log in before you can comment on or make changes to this bug.