Bug 1128893

Summary: spacewalk-repo-sync does not work for channels that are children of non-custom parents
Product: [Community] Spacewalk Reporter: Stephen Herr <sherr>
Component: ClientsAssignee: Milan Zázrivec <mzazrivec>
Status: CLOSED CURRENTRELEASE QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.2   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-backend-2.3.6-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-14 19:03:19 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:    
Bug Blocks: 1207293    

Description Stephen Herr 2014-08-11 18:32:53 UTC
Description of problem:
spacewalk-repo-sync fails if the parent of a custom channel (with a repo associated with it) is not also a custom channel.

How reproducible:
Always

Steps to Reproduce:
1. create a custom channel (with repo) that is a child of a Red Hat channel. In this case, I created epel-6-x86_64 that is a child of rhel-x86_64-server-6
2. spacewalk-repo-sync --channel epel-6-x86_64 --type yum

Actual results:
Traceback (most recent call last):
  File "/usr/bin/spacewalk-repo-sync", line 187, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/bin/spacewalk-repo-sync", line 107, in main
    l_ch_custom=reposync.getCustomChannels()
  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/reposync.py", line 99, in getCustomChannels
    d_parents = getParentsChilds()
  File "/usr/lib/python2.6/site-packages/spacewalk/satellite_tools/reposync.py", line 93, in getParentsChilds
    d_parents[parent_channel].append(row['label'])
KeyError: 'rhel-x86_64-server-6'

Expected results:
We should be able to sync the repos associated with epel-6-x86_64 even though its parent is not a custom channel.

Comment 1 Stephen Herr 2014-08-11 19:33:39 UTC
Committing to Spacewalk master:
cba011b9b3e9aa41f10912a1b5b8f8826f66a6e1

Comment 2 Stephen Herr 2014-08-15 14:47:56 UTC
And 2baec353589afb4689c857f497399da03d48a234

Comment 3 Grant Gainey 2015-03-23 16:59:09 UTC
Moving bugs to ON_QA as we move to release Spacewalk 2.3

Comment 4 Grant Gainey 2015-04-14 19:03:19 UTC
Spacewalk 2.3 has been released. See

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