chore(neutron-understack): auth improvements and cleanups#2084
Open
cardoe wants to merge 8 commits into
Open
Conversation
Wire up the entry point so that we can do OSLO config generation and validation against our configuration files. Moved the global variables to be prefixed with an underscore to not globally export them. Create a group variable for the group name constant.
Explicitly include dependencies on every package that we directly import in the code base.
We use the [ironic] section authentication so properly register it so we can eventually validate our configs. Make the session fetching function common so it can be shared.
Create a page that outputs our sample config to make it easier to understand the valid values.
Use the common code for the session connection management for undersync which flips from using the [keystone_authtoken] section for auth to the [ironic] section for the authentication. The session is no longer passed in to the initialization so some changes needed to happen with the tests.
This session object is a wrapper around the requests session while providing the authentication handling and retrying authentication on 401 errors so this should simplify and remove the issues we have seen with expired tokens.
Add our module and its version into the User-Agent of calls so we have some more data for tracing issues.
…ync.sync() Remove sync_devices() and have sync() read undersync_dry_run from config directly, eliminating the need for callers to thread the config flag through. Remove _trigger_undersync() / invoke_undersync() abstraction wrapper as well.
stevekeay
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wired up all the OSLO config settings we use so that we can use the OLSO tools for generating the config file and validating config files that we will use for these plugins. Added all the dependencies that we directly import to better track what we utilize. Add the OSLO sample config to the documentation to make it clear the options that are utilized. Converted the session handling to be generic code and then utilized that for the undersync connection so that authentication is automatically retired on expired tokens. Added our module info to the User-Agent requests to aid in reviewing what called what in the logs. Removed some abstractions from the calls to undersync.