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

Hook up new presence to apiserver and status. #8617

Merged
merged 1 commit into from Apr 17, 2018

Conversation

howbazaar
Copy link
Contributor

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

juju bootstrap lxd test
juju enable-ha
watch -c juju status -m controller
juju ssh -m controller 2
# in there, do this
sudo service jujud-machine-2 stop
# observe the slow status updating showing machine 2 down
# in another terminal
juju controller-config features=[new-presence]
# now stop and start machine 2 and observe faster status.

Documentation changes

This isn't a user observable change, although we may want to document the controller feature flags options.

Copy link
Member

@wallyworld wallyworld left a comment

Choose a reason for hiding this comment

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

Reviewed live, lgtm with apiserver closing context and todo for config versioning

@howbazaar
Copy link
Contributor Author

$$merge$$

@jujubot jujubot merged commit 23515f7 into juju:develop Apr 17, 2018
@howbazaar howbazaar deleted the presence-status branch April 17, 2018 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants