Project

Profile

Help

Issue #2748

closed

Complex/Strange Upstream Yum URL Results In Incorrect Upstream Package URLs

Added by jason@tresgeek.net almost 7 years ago. Updated about 5 years ago.

Status:
CLOSED - NOTABUG
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

I have an "on demand" product repository with a URL of:

http://sw.centricgroup.com/Orion/AgentManagement/LinuxPackageRepository.ashx?path=/dists/centos-7/x86_64

When a client attempts to pull a package from that product repository the Pulp server attempts to pull the package from upstream using:

http://sw.centricgroup.com/Orion/AgentManagement/LinuxPackageRepository.ashx/swiagent-1.6.0.1647-756007-centos-7.1-x64.rpm

However, the correct path to the package is:

http://sw.centricgroup.com/Orion/AgentManagement/LinuxPackageRepository.ashx?path=/dists/centos-7/x86_64/swiagent-1.6.0.1647-756007-centos-7.1-x64.rpm

Using a yum configuration to hit the upstream repo directly works.

Primary.xml and repomd.xml from upstream attached.

Pulp version is 2.9.3.

If it makes a difference, when these repos are configured directly on the client they are done so as follows:

/etc/yum.repos.d/swiagent-centos-7.mirrors:

[swiagent]
name=SolarWinds Agent
mirrorlist=file:///etc/yum.repos.d/swiagent-centos-7.mirrors
enabled=0
gpgcheck=0

/etc/yum.repos.d/swiagent-centos-7.mirrors:

http://sw.centricgroup.com/Orion/AgentManagement/LinuxPackageRepository.ashx?path=/dists/centos-7/$basearch

Files

4fad7d8494f906c08bd77dfcfe5237f1c2441d9dfb6d645d01532dfe3d63c393-primary.xml.gz (1 KB) 4fad7d8494f906c08bd77dfcfe5237f1c2441d9dfb6d645d01532dfe3d63c393-primary.xml.gz upstream primary.xml jason@tresgeek.net, 05/09/2017 09:55 PM
repomd.xml (2.9 KB) repomd.xml upstream repomd.xml jason@tresgeek.net, 05/09/2017 09:55 PM
Actions #1

Updated by jason@tresgeek.net almost 7 years ago

Original issue was filed on Katello: http://projects.theforeman.org/issues/19366

Actions #2

Updated by daviddavis almost 7 years ago

Technically, the url http://sw.centricgroup.com/Orion/AgentManagement/LinuxPackageRepository.ashx?path=/dists/centos-7/x86_64/swiagent-1.6.0.1647-756007-centos-7.1-x64.rpm isn't RFC compliant since parameters can't contain characters like '/'. In order to properly handle this, Pulp would have to detect where the path is in the url (ie is it a parameter?) and then properly encode it if it is. I don't think this is something we want to support in Pulp. At the very least, I think this qualifies as new functionality and not an issue.

Actions #3

Updated by mhrivnak almost 7 years ago

Python's urljoin strives to be RFC-compliant, and here is the result:

>>> from urllib.parse import urljoin
>>> urljoin('http://sw.centricgroup.com/Orion/AgentManagement/LinuxPackageRepository.ashx?path=/dists/centos-7/$basearch', 'swiagent-1.6.0.1647-756007-centos-7.1-x64.rpm')
'http://sw.centricgroup.com/Orion/AgentManagement/swiagent-1.6.0.1647-756007-centos-7.1-x64.rpm'

It drops query parameters when constructing a new URL, which I think is the correct behavior. This looks like a misuse of the "query" portion of a URL.

What software is generating/hosting this repository?

Actions #4

Updated by jason@tresgeek.net almost 7 years ago

SolarWinds Orion is what is generating/hosting the repository. I can't argue against following the RFC and understand if this issue is rejected. Either way I'll open up a support case with them and see what they have to say. I'm sure it will be a great laugh.

Actions #5

Updated by ttereshc almost 7 years ago

  • Status changed from NEW to CLOSED - NOTABUG
  • Triaged changed from No to Yes
Actions #6

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF