Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
cmd/jujud/agent/machine: Preserve key too! #6413
Conversation
| + | ||
| + err := agent.ChangeConfig(func(config coreagent.ConfigSetter) error { | ||
| + existing, hasInfo := config.StateServingInfo() | ||
| + info, err := apiState.StateServingInfo() |
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit c243ac2
into
juju:master
Oct 10, 2016
mjs
deleted the
mjs:1631145-key-mistmatch
branch
Oct 10, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mjs commentedOct 10, 2016
•
Edited 1 time
-
mjs
Oct 10, 2016
When the stateservinginfo setter preserves an already set certificate, the key that goes with it needs to be copied with it. Failing to do this results in key mismatches when the apiserver is restarted.
Also make the agent config updates safer by performing the whole update inside a ChangeConfig func.
Fixes https://bugs.launchpad.net/juju/+bug/1631145
QA
Bootstrapped and restarted the controller machine agent multiple times without being able to trigger the problem. Previously it was fairly easy to trigger the problem.