Project

Profile

Help

Issue #4120

Syncing a repo with `background` download policy raises InvalidURL in RHEL 7.6

Added by rochacbruno about 1 year ago. Updated 7 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Urgent
Assignee:
Category:
API
Sprint/Milestone:
Start date:
Due date:
Severity:
4. Urgent
Version:
Platform Release:
2.18.0
Blocks Release:
OS:
RHEL 7
Backwards Incompatible:
No
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
Yes
Verification Required:
No
Sprint:
Sprint 45

Description

Steps to reproduce:

On a RHEL 7.6 system with Pulp 2.19a1 try to sync a repository using `background` download policy.

Actual Results:

Fails with InvalidURL looks like the hostname is being stripped from url `https:///streamer/var/lib/` should be `https://HOSTNAME/streamer/var/lib/`

Traceback:

Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392) Invalid URL u'https:///streamer/var/lib/[942/1850]
nt/units/rpm/49/4cfcbf385e13d07497e336719a12c530a7b908f24d4bc49961f29d6c88d20e/horse-0.22-2.noarch.rpm?policy=eyJleHRlbnNpb25zIjoge30sICJyZXNvd
XJjZSI6ICIvc3RyZWFtZXIvdmFyL2xpYi9wdWxwL2NvbnRlbnQvdW5pdHMvcnBtLzQ5LzRjZmNiZjM4NWUxM2QwNzQ5N2UzMzY3MTlhMTJjNTMwYTdiOTA4ZjI0ZDRiYzQ5OTYxZjI5ZDZ$
ODhkMjBlL2hvcnNlLTAuMjItMi5ub2FyY2gucnBtIiwgImV4cGlyYXRpb24iOiAxNTcyOTY1MzM0fQ%3D%3D;signature=U9lk6sPAapefL_eq3YMy7u0jJeH_d6Jjj6GLrSowaAFrOa-$
-mO2M9s5XMaAWVmqD3gLRvI61_hmV8AxLymSylZSLw4nfjOPDn_k7Jd1DCLvE0l8xcGbS2s2Bo5ScnxCGQsSAneiaQHrStFHIxBr-0JgPKDAARe1RV375AcpKQTBgVIPjzNJ6RhZ5Qybg_$
RXvWI2YP66cn915zCcv9bWYgH5gkE6b6mAiWnt6u_cNnk2yTcL5c25-9cG6QcHeXpeN_AtwGO_uL7gfLqeSYEkCqgcxTDbkFQ5T0OPht2ePuZmtDy5dDnhPOnWXSJsqQi-t3WFD40gSr7P$
uLdFn4BA%3D%3D': No host supplied
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392) Traceback (most recent call last):
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)   File "/usr/lib/python2.7/site-packages/nectar/d$
wnloaders/threaded.py", line 274, in _fetch
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)     **requests_kwargs)
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)   File "/usr/lib/python2.7/site-packages/requests/
sessions.py", line 476, in get
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)     return self.request('GET', url, **kwargs)
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)   File "/usr/lib/python2.7/site-packages/requests/
sessions.py", line 450, in request
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)     prep = self.prepare_request(req)
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)   File "/usr/lib/python2.7/site-packages/requests/
sessions.py", line 381, in prepare_request
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)     hooks=merge_hooks(request.hooks, self.hooks),
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)   File "/usr/lib/python2.7/site-packages/requests
sessions.py", line 381, in prepare_request
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)     hooks=merge_hooks(request.hooks, self.hooks),
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)   File "/usr/lib/python2.7/site-packages/requests$
models.py", line 304, in prepare
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)     self.prepare_url(url, params)
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)   File "/usr/lib/python2.7/site-packages/requests/
models.py", line 364, in prepare_url
Nov 05 09:48:54 rhel-76-pulp-2 pulp[32479]: nectar.downloaders.threaded:ERROR: (32479-15392)     raise InvalidURL("Invalid URL %%r: No host sup
plied" %% url)

Expected Results:

as in a RHEL75 system the same test passes with the proper hostname in URL

Nov 05 09:47:08 rhel-75-pulp-2 pulp[2512]: nectar.downloaders.threaded:INFO: Download succeeded: https://rhel-75-pulp-2.virt.box/streamer/var/l
ib/pulp/content/units/rpm/29/84c64d8df0293698f4427d762e4a61447b8b2d916dff501c1445c594e048f5/dog-4.23-1.noarch.rpm?policy=eyJleHRlbnNpb25zIjoge3
0sICJyZXNvdXJjZSI6ICIvc3RyZWFtZXIvdmFyL2xpYi9wdWxwL2NvbnRlbnQvdW5pdHMvcnBtLzI5Lzg0YzY0ZDhkZjAyOTM2OThmNDQyN2Q3NjJlNGE2MTQ0N2I4YjJkOTE2ZGZmNTAxY
zE0NDVjNTk0ZTA0OGY1L2RvZy00LjIzLTEubm9hcmNoLnJwbSIsICJleHBpcmF0aW9uIjogMTU3Mjk2NTIyMn0%3D;signature=KLppf9KciB92Ycd7_ZMrU66hHNJs4n90TKUvG5mwQIO
MA4E0b5-zIZxZzwXwARojeuhavhUhiX_O9bE7sSlUfVlzE_irE3ftI6uQlk5PcU4GUQZ3j9MwtiJqUPBWMaxRHQr0KoG2qfQTn7g9KhPIAm9XCsgHEEqj5yrdQCsgexUS-sIWdHqnSWEAcc
CAvgPv7LZcV7w_Pi-YgjEyrK6ttydhkS3I_mlbsQmC040-jSN1n7P057z0O9InKTXjlLxgQWsmkOWuhmU6Uf1g0QMQONn6Udw0s9-WBu0OYDSRWYki9JVFMjCWMpIBOxvgZ0ByfkBbgjsWd
01WBUw8mM_dvw%3D%3D.

More details:

The test passes if `immediate` download policy is used instead of `background`
The test passes if running on `RHEL 7.5`

Env info:

Repository: https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-unsigned/
O.S: RHEL 7.6 GA
Pulp: 2.19a1


Related issues

Related to Pulp - Issue #4092: redirect_host defaults to socket.getfqdn() instead of None CLOSED - CURRENTRELEASE Actions

Associated revisions

Revision caafaeee View on GitHub
Added by daviddavis about 1 year ago

Fixing missing hostname for deferred downloads

A change was made in #4092 to allow users to use the server request
hostname as the redirect_host for on-demand repos by leaving host in the
lazy config as blank. However, the defered_download code doesn't have a
server request and therefore should default to socket.getfqdn() if
redirect_host is unset.

fixes #4120
https://pulp.plan.io/issues/4120

History

#1 Updated by CodeHeeler about 1 year ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 46

#2 Updated by CodeHeeler about 1 year ago

  • Sprint changed from Sprint 46 to Sprint 45

#3 Updated by jortel@redhat.com about 1 year ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jortel@redhat.com

#4 Updated by rchan about 1 year ago

  • Assignee deleted (jortel@redhat.com)

#5 Updated by pcreech about 1 year ago

So, i got a little curious, and took a look at the history of tests failing and 2-master code history.

This below PR coincides with when we started seeing the failures:

https://github.com/pulp/pulp/pull/3726

#6 Updated by daviddavis about 1 year ago

  • Assignee set to daviddavis

#7 Updated by daviddavis about 1 year ago

  • Related to Issue #4092: redirect_host defaults to socket.getfqdn() instead of None added

#8 Updated by daviddavis about 1 year ago

  • Status changed from ASSIGNED to POST

#9 Updated by daviddavis about 1 year ago

  • Status changed from POST to MODIFIED

#10 Updated by ttereshc about 1 year ago

  • Sprint/Milestone set to 2.18.0

#11 Updated by ttereshc 12 months ago

  • Status changed from MODIFIED to ON_QA

#12 Updated by bherring 12 months ago

  • Status changed from ON_QA to CLOSED - CURRENTRELEASE
  • Verified changed from No to Yes

#13 Updated by kersom 12 months ago

It was reported as a regression, and the test that was failing has been running without any problem in the last couple of days.
4120

#14 Updated by bmbouter 7 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF