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
Fix lp:1748275 #8379
Fix lp:1748275 #8379
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good - only minor comments.
apiserver/apiserver.go
Outdated
statePool *state.StatePool | ||
lis net.Listener | ||
|
||
// tag of the machine where the API server is running. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should have a capital letter! ;)
state/addmachine.go
Outdated
@@ -824,7 +824,7 @@ func (st *State) maintainControllersOps(mdocs []*machineDoc, currentInfo *Contro | |||
// according to the specified placement directives until the placement list is | |||
// exhausted; thereafter any new machines are started according to the constraints and series. | |||
func (st *State) EnableHA( | |||
numControllers int, cons constraints.Value, series string, placement []string, | |||
numControllers int, cons constraints.Value, series string, placement []string, machineId string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a description of what machineId does to the docstring?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
f5bd54e
to
8ae77ab
Compare
simply because the agent pinger isn't alive on the server yet.
8ae77ab
to
9332cad
Compare
|
Why is this change needed?
If you run juju enable-ha very quickly, e.g. via script, after bootstrap has completed, there is a window of time where the controller hasn't sent a ping yet to agent presence. In this case, it's possible that
EnableHA will demote the server it's running on as part of the enablement process, causing another server to be provisioned.
How do we verify that the change works?
Best bet is to find a cloud this is easily reproducible on to run. It can be difficult to reproduce.
$ juju bootstrap localhost test ; juju enable-ha -c test
Documentation changes
n/a
Bug reference
https://bugs.launchpad.net/juju/+bug/1748275