Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cl flag to make default endpoint serve caches or origins #36

Merged

Conversation

jhiemstrawisc
Copy link
Member

We need a way to redirect xrootd caches to origins, but as of the time of this PR, setting:
pss.origin <director-domain>:443/api/v1.0/director/origin
results in xrootd crashing after it's unable to parse the URL.

This PR adds a command line option to set whether the default behavior is to serve caches or origins. Now a user can run:
pelican director serve -p 443 -e <origin/cache>
and the director will select the appropriate default endpoint redirection middleware.

As far as xrootd caches go, this should make it possible to set the pss.origin correctly

@jhiemstrawisc jhiemstrawisc requested a review from bbockelm August 2, 2023 22:33
Add forgotten s in supervisor env var expansion
@jhiemstrawisc jhiemstrawisc force-pushed the default-endpoint-knob branch from 0d3454a to d7d2bd8 Compare August 3, 2023 15:23
Copy link
Collaborator

@bbockelm bbockelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few minor changes requested.

Instead of having the empty string for the default response ("") indicate the default, can you set the default in config/resources/default.yaml? Probably will look like this:

Director:
  DefaultResponse: cache

cmd/director.go Outdated Show resolved Hide resolved
cmd/director.go Outdated Show resolved Hide resolved
cmd/director_serve.go Outdated Show resolved Hide resolved
images/supervisord/pelican_director_serve.conf Outdated Show resolved Hide resolved
Copy link
Collaborator

@bbockelm bbockelm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few changes requested. See inline comments.

@jhiemstrawisc jhiemstrawisc merged commit 9d8b910 into PelicanPlatform:main Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants