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

Fixes to origin/director advertise to client #627

Merged

Conversation

joereuss12
Copy link
Contributor

These fixes are for PR #622 which helps reinstate backwards compatibility. Changes include:

  • Returning UploadFile to its original state
  • Running a PUT on the director to get PUT endpoint instead of a GET
    • Moved this logic to client/main.go when we gather ns info
  • Moved the gathering of ns info to a separate function

@joereuss12 joereuss12 requested a review from bbockelm January 9, 2024 22:14
@bbockelm bbockelm force-pushed the fixes-to-622-advertise-origin branch from a4bf760 to 2e63437 Compare January 10, 2024 04:57
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.

Did some further refactoring to reduce a double-query to the director.

Added a commit to allow "fallback reads" so I could test via federation-in-a-box as follows:

PELICAN_ORIGIN_ENABLEFALLBACKREAD=true \
   PELICAN_ORIGIN_ENABLEVOMS=false \
   PELICAN_ORIGIN_EXPORTVOLUME=/tmp/test \
   pelican serve --module origin --module registry --module director -d

and then doing a pelican object copy to/from the instance. Also checks out with stashcp moving files to/from the OSDF.

Now that we can do an upload and download via federation-in-a-box, we should think about adding that to either the unit test or the integration tests.

There may be further unit test cleanup judging from failures on main; I'll leave that to @joereuss12

joereuss12 and others added 7 commits January 10, 2024 14:45
These fixes are for PR PelicanPlatform#622 which helps reinstate backwards
compatibility. Changes include:
- Returning `uploadFile` to its original state
- Running a PUT on the director to get PUT endpoint instead of a GET
   - Moved this logic to `client/main.go` when we gather ns info
- Moved the gathering of ns info to a seperate function
Not sure why these are not getting caught
- Cleanup common paths between GET and PUT.
- Ensure the director query is only done once.
- Have director always internally route the PUT to an origin query
Now internal defaults match the documentation defaults.
If `Origin.EnableFallbackRead` is set, then the origin will be selected by the director
to serve clients if there are no available caches.

Fixes PelicanPlatform#608
@joereuss12 joereuss12 force-pushed the fixes-to-622-advertise-origin branch from 2e63437 to c719bab Compare January 10, 2024 16:37
@joereuss12 joereuss12 merged commit ca26ba8 into PelicanPlatform:main Jan 10, 2024
9 checks passed
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