Description of problem: spacecmd softwarechannel_clonetree aborts part way through the tree with error: ERROR: redstone.xmlrpc.XmlRpcFault: unhandled internal exception: ERROR: duplicate key value violates unique constraint "rhn_ce_ce_uq" Detail: Key (channel_id, errata_id)=(1731, 25865) already exists. Here, channel_id=1731 is the channel in the process of being cloned, and I suspect this is done inside a transaction which is rolled back after this error is encountered since there is no channel with that ID visible through the webui). errata_id refers to a cloned errata, present in two children (fedora-26-updates and fedora26-updates-testing) of the base channel. In this case, the channel tree being cloned is already a clone of the "head" tree, i.e. head-fedora -(already cloned to)-> 201801-fedora -(being cloned to)-> qa-fedora. Version-Release number of selected component (if applicable): spacecmd-2.7.16-1.el7.noarch spacewalk-backend-server-2.7.139-1.el7.noarch How reproducible: Every time this base channel is cloned Steps to Reproduce: 1. spacecmd softwarechannel_clonetree -s '201801-fedora' -x '/^201801-/qa-/' --gpg-copy 2. 3. Actual results: Child channels that are before the failing channel are cloned. The failing channel and subsequent channels are not cloned. The above error is printed Expected results: The full tree of channels should be cloned without error Additional info:
Workaround/fix: https://github.com/spacewalkproject/spacewalk/pull/666
spacewalk.git(master): d4b470419df236abb61f9e5689d828923abc9a33
Move Spacewalk 2.9 bugs ON_QA.
Spacewalk 2.9 has been released. https://github.com/spacewalkproject/spacewalk/wiki/ReleaseNotes29