Hook up new presence to apiserver and status. #8617
Merged
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.
This branch adds two new logical pieces, and hooks up a third.
Features are added to controller config, and when config is updated, a pubsub message is sent for controller.ConfigChanged.
Added a new apiserver struct for shared server data. This is for server attributes that don't change from connection to connection, and need to be threaded through to the facade context. The state pool, presence, and now the central hub are all part of this context. This shared context also knows what controller feature flags have been set.
The last piece is to hook up the status code to the new presence. This means setting the ModelPresence when calling status. There was a logic bug in the controller connections in that all were considered controller connections which meant that AgentStatus always showed unknown. The controller connection flag is supposed to be for non-controller models for controller machine connections. This has now been updated.
QA steps
Documentation changes
This isn't a user observable change, although we may want to document the controller feature flags options.