Bug 1446118

Summary: cdn-sync - enhancements to channel selection
Product: Red Hat Satellite 5 Reporter: Tomáš Kašpárek <tkasparek>
Component: Satellite SynchronizationAssignee: Jan Dobes <jdobes>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Studeník <pstudeni>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: jdobes, pstudeni, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-backend-2.5.3-125 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-21 12:11:21 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: 1358815    

Description Tomáš Kašpárek 2017-04-27 09:52:19 UTC
Description of problem:
Channel selection of channels to sync can be improved, for example we can add following:
option to sync to all child channels of given base channel
support of wildcard characters - example: I want to sync all rhel base channels so I would just enter cdn-sync -c rhel-x86_64-server-? which would lead for rhel 5, 6, 7 to sync

Comment 1 Pavel Studeník 2017-04-27 10:48:22 UTC
This module fnmatch[1] is really good for the issue. I used it in bz1404841.

* 	matches everything
? 	matches any single character
[seq] 	matches any character in seq
[!seq] 	matches any character not in seq

[1] https://docs.python.org/2/library/fnmatch.html

Comment 2 Jan Dobes 2017-05-10 10:05:51 UTC
fixed in spacewalk master:

89fcf77d16cd02fe94d7e0fdc580aeb1f317def0

Comment 5 Pavel Studeník 2017-05-10 10:32:33 UTC
Hi, I have created similar patch for inter satellite sync (satellite-sync).

https://github.com/spacewalkproject/spacewalk/pull/540

Comment 6 Pavel Studeník 2017-05-17 10:46:13 UTC
1) I want to sync all rhel base channels 

>> cdn-sync -c rhel-x86_64-server-? --no-package --no-errata --no-rpms --no-kickstart

It works good.

2) Option to sync to all child channels of given base channel

This feature is missing. Can I create new bug for it?

Comment 8 Pavel Studeník 2017-05-19 14:45:34 UTC
The new bug 1452754 for second part of this bug "option to sync to all child channels of given base channel"

Verified with spacewalk-backend-cdn-2.5.3-132.el6sat.noarch