Skip to content

Conversation

@shreyb
Copy link
Collaborator

@shreyb shreyb commented Nov 27, 2024

Closes #72.

The changes are:

  • Removed run-onboarding-managed-tokens executable, and merged its capabilities into token-push via the flag -r/--run-onboarding. As @retzkek suggested, there is now the option to use an additional flag -p/--push-tokens that will push the vault tokens to interactive nodes, so the onboarding and first push can be done in a single step.
  • Removed internal/cmdUtils package. Almost all of this package was funcs and types shared between token-push and run-onboarding-managed-tokens. Since the latter is now gone, I could move most of cmdUtils into the token-push package main. The very few things that are needed by both token-push and refresh-uids-from-ferry are simply duplicated.
  • According to best practices, moved interfaces out of/unexported interfaces from implementing packages into consuming packages (e.g. vaultToken --> worker, worker --> main, etc.)
  • Other general code cleanup for better readability/usability

For more details on the changes and tests run, see #72 (comment)

…condor_vault_storer from executables using same func signature as other workers
…ker should be used with to run condor_vault_storer
… only accept InteractiveTokenStorer or NonInteractiveTokenStorer
well as new StoreAndGetTokensInteractiveWorker

In discussion with stlammel about this code base, he brought up that it
wasn't easy to find where exactly these workers loop over the schedds to
store tokens.  To make that much clearer, I moved the loops out of
StoreAndGetTokenForSchedds, renamed that function to
StoreAndGetTokenForSchedd, and made it only handle the operations for a
single token store.  The loop then moved into the two worker funcs
mentioned above.  This required some rewriting of the error handling as
well, since in both cases, we need to check for and report the correct
errors across different operations.
… PingNodeStatus to worker package, as package ping never uses this type. Finally, changed Node.PingNode to Node.Ping
…StoreAndGetTokenInteractiveWorkerType] map uninitialized
…hat back in and also added an info message for run-onboarding mode
…at means they are duplicated, but it removes a dependency
…rate collector goroutine, each config setup goroutine simply accesses the serviceConfigs and successfulServices maps directly. Access is mediated through mutexes for both
…tifications chan was getting blocked due to absence of listener. I introduced this bug in commit 861bc7a
…erNotificationsChans to a new func registerDummyServiceNotificationsChan that gets invoked in the service Config setup stage
@shreyb shreyb linked an issue Nov 27, 2024 that may be closed by this pull request
@shreyb shreyb added this to the 0.16.0 milestone Nov 27, 2024
Copy link
Contributor

@cathulhu cathulhu left a comment

Choose a reason for hiding this comment

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

Finally finished looking over all of this. Consistent with what I know of GO and looks like a good approach. Approved.

@shreyb shreyb merged commit 1cbf5dc into main Dec 6, 2024
2 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.

Add feature to skip the condor_vault_storer portion to token-push

3 participants