Project

Profile

Help

Story #1180

closed

Story #1150: As a user, I can lazily fetch repositories

As a user, I can identify a lazy-loader using server.conf and Pulp will redirect for content it does not have

Added by bmbouter over 8 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
% Done:

100%

Estimated time:
(Total: 0:00 h)
Platform Release:
2.8.0
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

A new section should be added to server.conf called [lazy] which will have a single setting named "redirect_url". This setting will be blank by default. An appropriate doc block needs to be created similar to other server.conf sections and a default value of '' needs to be added to config.py.

A new redirect handler will need to be added at the platform level in urls.py. I'll suggest 'v2/content/redirect'. The WSGI handler is rooted at '/pulp/api' so the user-facing full path of this redirection handler will be '/pulp/api/v2/content/redirect'. If "redirect_url" setting defined above is set, the Django handler will use the value of "redirect_url" and append the original request path and return the result as a HTTP 302 redirect. This handler should not force a specific protocol handler to use (ie: http vs https), but should simply append the string values together. If "redirect_url" is not configured (the default) this URL handler should always return a 404. If the user requested the redirect URL directly then the expected WSGI environment variables containing the "original" request won't be set so the correct response would be a HTTP 400 (Bad Request).

BEWARE: the "redirect_url" should probably NOT contain a protocol handler when the user specifies this setting. The redirect response will also not respond with a protocol handler. Hopefully all clients will try the redirected URL with the "same" protocol as the original request. The client is expected to preserve the protocol type (http, https, etc) when it makes the next request. The docs in server.conf should also no advocate that a protocol handler will be used. A user could specify a protocol handler, but then all responses will be forced onto the new protocol type which will break things like content protection and/or clients that don't support the specified protocol handler.

Client traffic is expected to arrive at this URL by each plugin having its content-serving virtualhost configured with the ErrorDocument directive. Unfortunately this needs to be added to each content type file which configures how content is served. This story has many child tasks which introduce this change in each plugin type Pulp manages. The purpose and requirements of the ErrorDocument also need to be documented in the Pulp platform docs so third party plugins can know how to participate in the lazy feature. The ErrorDocument directive is available in Apache 2.2 and Apache 2.4.

ErrorDocument 404 /pulp/api/v2/content/redirect

The original request path will be known by request environment variables created by using ErrorDocument. The redirect handler will use the catalog data to lookup the actual unit that is being requested.

A release note needs to be made indicating the existence of the new setting in server.conf.


Sub-issues 1 (0 open1 closed)

RPM Support - Task #1182: Update the apache configuration to support Lazy.CLOSED - CURRENTRELEASEjcline@redhat.com

Actions

Related issues

Blocked by Pulp - Task #1181: Create a download_unit platform taskCLOSED - WONTFIX

Actions
Actions #1

Updated by bmbouter over 8 years ago

  • Parent issue set to #1150
Actions #2

Updated by bmbouter over 8 years ago

  • Blocked by Task #1181: Create a download_unit platform task added
Actions #3

Updated by bmbouter over 8 years ago

  • Description updated (diff)
Actions #4

Updated by bmbouter over 8 years ago

  • Description updated (diff)
Actions #5

Updated by bmbouter over 8 years ago

  • Description updated (diff)
Actions #6

Updated by bmbouter over 8 years ago

  • Description updated (diff)
Actions #7

Updated by bmbouter over 8 years ago

  • Description updated (diff)
Actions #8

Updated by bmbouter over 8 years ago

  • Description updated (diff)
Actions #9

Updated by jcline@redhat.com over 8 years ago

  • Description updated (diff)
Actions #15

Updated by jortel@redhat.com over 8 years ago

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

Added by jortel@redhat.com over 8 years ago

Revision adbd5fc0 | View on GitHub

ref #1180 - add redirect view and url signing.

Added by jortel@redhat.com over 8 years ago

Revision adbd5fc0 | View on GitHub

ref #1180 - add redirect view and url signing.

Added by jortel@redhat.com over 8 years ago

Revision cb6bdfba | View on GitHub

Merge pull request #2060 from jortel/issue-1180p

ref #1180 - add redirect view and url signing.

Added by jortel@redhat.com over 8 years ago

Revision cb6bdfba | View on GitHub

Merge pull request #2060 from jortel/issue-1180p

ref #1180 - add redirect view and url signing.

Actions #19

Updated by jortel@redhat.com over 8 years ago

  • Status changed from ASSIGNED to POST
Actions #20

Updated by ipanova@redhat.com over 8 years ago

  • Status changed from POST to MODIFIED
Actions #21

Updated by jortel@redhat.com over 8 years ago

  • Status changed from MODIFIED to POST

Moving back to post because it's been merged to the lazy-content feature branch but not yet merged to a build branch.

Actions #22

Updated by jcline@redhat.com over 8 years ago

  • Status changed from POST to MODIFIED
Actions #23

Updated by rbarlow about 8 years ago

  • Status changed from MODIFIED to 5
  • Platform Release set to 2.8.0
Actions #24

Updated by dkliban@redhat.com about 8 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE
Actions #25

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF