+++ This bug was initially created as a clone of Bug #796434 +++ Description of problem: There is currently no automated method to clone an activation key. An option similar to clone kickstart would help users in creating new keys based off of old ones. This would help assure the user that the new key was exactly the same as the old key with the exception of any changes made afterwards by the user. --- Additional comment from Tomas Lestach on 2012-02-23 04:20:42 EST --- Right, there's no option to clone an activation key. However a set of API calls from the activationkey namespace can substitute the clone process very well by creating a new activation key and setting it's parameters according the original activation key. Check https://<spacewalk/rhn/apidoc/handlers/ActivationKeyHandler.jsp for more details.
TESTED on Satellite-5.7.0-RHEL6-re20141024.0 (spacewalk-java-2.3.8-50.el6sat) Reproducer: 1. We have got a satellite 5.7 with some package channels, a config channel, a system group. 2. We create a new activation key (AK) with these parameters: * Description: Test1 * Key: 1-xxx * Base Channels: RHEL7 Server * Add-On Entitlements: Monitoring, Provisioning * Universal Default: X (check) * Child channels RHN-TOOLS * Packages: mc * Groups: we choose one of our System groups 3. Now, we can try create a new clone of AK. Click on the "clone key" link. * Description: Test2 It works. 4. On the page "List of AK" (/rhn/activationkeys/List.do), we can see both of keys are enabled. 5. Open AK "Test1" and check the option "Configuration File Deployment". Save the change and create new clone "Test 3". 6. Open page "List of AK" (/rhn/activationkeys/List.do), we can see that the latest AK "Test 3" is not enabled. 7. Open AK "Test1" and join a config channel to it. Save the change and create new clone "Test 4". We get a error message " We're sorry, but the configuration channel could not be found.", but a new AK is created. ### /var/log/tomcat*/catalina.out ########################################## 2014-11-07 04:23:50,069 [TP-Processor1] WARN com.redhat.rhn.manager.token.ActivationKeyManager - sorted cids: [105] 2014-11-07 04:23:50,079 [TP-Processor1] WARN com.redhat.rhn.common.errors.LookupExceptionHandler - Could not find config channel with label=TestChannel Probably the mistake with the label, because "TestChannel" is not a label, it is a name of the config channel. Actual results: Step 6, if we check the option "Configuration File Deployment", then the new cloned activation key is disabled by default. Step 7, if we try to clone the activation key with some config channel then we get error message. Expected results: All new cloned keys are enabled or disabled by default. No error message here (step7).
VERIFIED on Satellite-5.7.0-RHEL6-re20141119.0 (spacewalk-java-2.3.8-67.el6sat) The reproducer in comment 2.
Reverified with spacewalk-java-2.3.8-96.el6sat.noarch The reproducer in comment 2.
With the release of Red Hat Satellite 5.7 on January 12th 2015 this bug is being moved to a Closed Current Release state. The Satellite 5.7 GA Errata: - https://rhn.redhat.com/errata/RHSA-2015-0033.html Satellite 5.7 Release Notes: - https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html-single/Release_Notes/index.html Satellite Customer Portal Blog announcement for release: - https://access.redhat.com/blogs/1169563/posts/1315743 Cliff