Bug 1455139 - when parent_channel specified in spacewalk-repo-sync config, URL specified for channel in config is not accepted
Summary: when parent_channel specified in spacewalk-repo-sync config, URL specified fo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Other
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Gennadii Altukhov
QA Contact: Pavel Studeník
URL:
Whiteboard:
Depends On:
Blocks: sat58-errata sat58-nth
TreeView+ depends on / blocked
 
Reported: 2017-05-24 10:33 UTC by Jan Hutař
Modified: 2018-02-05 13:57 UTC (History)
6 users (show)

Fixed In Version: spacewalk-backend-2.5.3-158-sat
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-05 13:57:18 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0274 0 normal SHIPPED_LIVE Red Hat Satellite 5.8.0 bug fix update 2018-02-09 23:18:15 UTC

Description Jan Hutař 2017-05-24 10:33:26 UTC
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.

Comment 1 Tomas Lestach 2017-05-24 16:54:34 UTC
> 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?

Comment 2 Jan Hutař 2017-05-25 05:45:04 UTC
(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.

Comment 3 Gennadii Altukhov 2017-10-12 13:22:14 UTC
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.

Comment 4 Gennadii Altukhov 2017-10-12 14:52:57 UTC
The bug was fixed in upstream, spacewalk.git:
ed56e5f824e964eb21127f187d45b1d0d775703a

Comment 7 Pavel Studeník 2018-01-15 12:29:16 UTC
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

Comment 10 errata-xmlrpc 2018-02-05 13:57:18 UTC
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


Note You need to log in before you can comment on or make changes to this bug.