Description of problem: When parent_channel specified in spacewalk-repo-sync config, URL specified for channel in config is not accepted Version-Release number of selected component (if applicable): spacewalk-backend-tools-2.5.3-133.el6sat.noarch How reproducible: always Steps to Reproduce: 1. Have parent channel bz1104087-parent1 and its child bz1104087-parent1-child1 (none of them have repository assigned) 2. Have this config file { "no_errata":false, "sync_kickstart":false, "fail":true, "dry_run":false, "channel":{"bz1104087-parent1":["http://yum.spacewalkproject.org/2.4-client/RHEL/6/x86_64/"],"bz1104087-parent1-child1":["http://yum.spacewalkproject.org/2.5-client/RHEL/6/x86_64/"]}, "parent_channel":["bz1104087-parent1"] } 3. Attempt to sync: # spacewalk-repo-sync --conf bz1104087.conf Actual results: # spacewalk-repo-sync --conf bz1104087.conf --dry-run Channel bz1104087-parent1 Channel has no URL associated # spacewalk-repo-sync --conf bz1104087.conf Channel bz1104087-parent1 Channel has no URL associated Expected results: Either it should complain that setting both url and parent_channel in config file is not good thing to do, or it should work. When I assign repos to the channels in Satellite's webUI, it works. Additional info: This "--config" option of spacewalk-repo-sync is new in Satellite 5.8.0, so it is not a regression compared to 5.7.0.
> Either it should complain that setting both url and parent_channel in config > file is not good thing to do, or it should work. Can you describe the 2nd part? What behavior do you expect?
(In reply to Tomas Lestach from comment #1) > > Either it should complain that setting both url and parent_channel in config > > file is not good thing to do, or it should work. > > Can you describe the 2nd part? What behavior do you expect? Could print something like: WARNING: You have specified both parent_channel and URL for individual channel(s). I'm ignoring these custom URLs and using these from repos assigned to the channel in webUI. E.g. in example config provided in comment #0, URLs in the config would be ignored and only URLs in the repo assigned to channel would be used. But silently, without letting user know.
Jan, I believe both options in a config file is completely OK. For example such case: you want to sync parent channel and all its children (maybe hundreds) and redefine URLs only for several of them.
The bug was fixed in upstream, spacewalk.git: ed56e5f824e964eb21127f187d45b1d0d775703a
Reproducer with spacewalk-backend-tools-2.5.3-157.el6sat.noarch >> spacewalk-repo-sync --conf sync.conf Channel bz1104087-parent1 Channel has no URL associated Verified with spacewalk-backend-tools-2.5.3-158.el6sat.noarch >> spacewalk-repo-sync --conf sync.conf 07:19:26 ====================================== 07:19:26 | Channel: bz1104087-parent1 07:19:26 ====================================== 07:19:26 Sync of channel started. 07:19:26 07:19:26 Processing repository with URL: http://yum.spacewalkproject.org/2.4-client/RHEL/6/x86_64/ 07:19:26 Repo URL: http://yum.spacewalkproject.org/2.4-client/RHEL/6/x86_64/ 07:19:27 Packages in repo: 23 07:19:27 Packages already synced: 0 07:19:27 Packages to sync: 23 07:19:27 New packages to download: 0 07:19:27 Downloading packages: 07:19:27 07:19:27 Importing packages to DB: 07:19:27 07:19:27 Linking packages to the channel. 07:19:27 07:19:27 Importing groups from comps file comps-spacewalk-client-rhel6.xml. 07:19:27 07:19:27 Errata in repo: 0. 07:19:28 Sync of channel completed in 0:00:01. 07:19:28 ====================================== 07:19:28 | Channel: bz1104087-parent1-child1 07:19:28 ====================================== 07:19:28 Sync of channel started. 07:19:28 07:19:28 Processing repository with URL: http://yum.spacewalkproject.org/2.5-client/RHEL/6/x86_64/ 07:19:28 Repo URL: http://yum.spacewalkproject.org/2.5-client/RHEL/6/x86_64/ 07:19:29 Packages in repo: 25 07:19:29 Packages already synced: 0 07:19:29 Packages to sync: 25 07:19:29 New packages to download: 0 07:19:29 Downloading packages: 07:19:29 07:19:29 Importing packages to DB: 07:19:29 07:19:29 Linking packages to the channel. 07:19:29 07:19:29 Importing groups from comps file comps-spacewalk-client-rhel6.xml. 07:19:29 07:19:29 Errata in repo: 0. 07:19:29 Sync of channel completed in 0:00:01. 07:19:29 Total time: 0:00:02
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0274