-
Notifications
You must be signed in to change notification settings - Fork 27
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
Purge topology origin servers when there is a duplicated server from Pelican #1142
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I already know the answer to this question, but I just want to confirm -- if an old origin/namespace advertises to this new director with an old server/namespace ad that doesn't have FromTopology
, will the director automatically unmarshal the response and set that value to false? If that's the case, I think we're okay to modify the struct without worrying about hurting backwards compatibility.
The server advertisement should be fine, as we manually set the value (or let it be default value for Pelican server: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Do we need/want to patch this one into 7.7?
What would be a good question for @bbockelm |
Closes #1104
The core idea of this PR is as following:
serverAd
-s and their namespaces, we store them as-is, no matter they are from Topology or Pelican. We mark the ones from Topology with a new fieldFromTopology
serverAds
and when doing match-making (related code is ingetAdsForPath
indirector/cache_ads.go
:What this PR hasn't covered yet, is the list of namespaces and their servers the director sends to the cache for generating scitokens/authfile. We should do the same check ands filter out the duplicated topology server. Not sure if I should include this aspect in this PR or make it a separate one.
This PR also make sure we stable-sort the
serverAd
first ingetAdsForPath
and always generate the stable result (the current code gives random result depending on serverAds ordering of itsItems()
which is random ordering).