Bug 1450445 - spacewalk-repo-sync doesn't check protocol in prefix of url (http, nfs, file)
Summary: spacewalk-repo-sync doesn't check protocol in prefix of url (http, nfs, file)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Satellite Synchronization
Version: 580
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gennadii Altukhov
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks: sat58-errata
TreeView+ depends on / blocked
 
Reported: 2017-05-12 15:01 UTC by Pavel Studeník
Modified: 2017-12-13 07:58 UTC (History)
5 users (show)

Fixed In Version: spacewalk-backend-2.5.3-156
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-13 07:58:38 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:3445 0 normal SHIPPED_LIVE Red Hat Satellite 5.8.0 bug fix update 2017-12-12 19:00:37 UTC

Description Pavel Studeník 2017-05-12 15:01:21 UTC
Description of problem:
I received ERROR "list index out of range" when I forgot fill protocol for option url http://, file://, ...

>> spacewalk-repo-sync -c pstudeni-channel --sync-kickstart --url yum.spacewalkproject.org/nightly-client/Fedora/24/x86_64/
17:53:17 ======================================
17:53:17 | Channel: pstudeni-channel
17:53:17 ======================================
17:53:17 Sync of channel started.
17:53:17 Repo URL: yum.spacewalkproject.org/nightly-client/Fedora/24/x86_64/
17:53:17 ERROR: list index out of range
17:53:17 Sync of channel completed in 0:00:00.
17:53:17 Total time: 0:00:00

manual page:
"The  repository  URL.  Any  protocol  supported  by yum is supported including http://, nfs://, file://."

Version-Release number of selected component (if applicable):
spacewalk-backend-tools-2.5.3-130.el6sat.noarch

How reproducible:
aways

Steps to Reproduce:
1. run command:
>> spacewalk-repo-sync -c pstudeni-channel --sync-kickstart --url yum.spacewalkproject.org/nightly-client/Fedora/24/x86_64/

Actual results:
ERROR: list index out of range

Expected results:
some better message then error or set http as default protocol.

Comment 1 Pavel Studeník 2017-05-12 15:08:30 UTC
NFS protocol is not supported:

>> spacewalk-repo-sync -c pstudeni-channel --sync-kickstart --url nfs://localhost/mnt/export
18:07:20 ERROR: Error parsing "mirrorlist = 'nfs://localhost/mnt/export'": URL must be http, ftp, file or https not "nfs"

Comment 2 Gennadii Altukhov 2017-08-07 13:58:44 UTC
The bug is fixed in upstream. spacewalk.git:
bcffee0bdd21c77ec779c65bb67234238c564c66

Comment 10 Lukáš Hellebrandt 2017-11-20 11:19:21 UTC
Verified with spacewalk-backend-2.5.3-157.

Used reproducer from comment 5. When URL is not entered, the following error is shown:

06:15:31 ERROR: Unknown protocol in repo URL: copr-be.cloud.fedoraproject.org/results/@spacewalkproject/nightly-client/fedora-26-x86_64

Also, the return value is 1.

Note that manual page says nfs is an acceptable protocol while actually, entering it leads to error. That is, however, unrelated to this BZ and not a regression.

Comment 13 errata-xmlrpc 2017-12-13 07:58:38 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-2017:3445


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