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

Fix lp:1748275 #8379

Merged
merged 1 commit into from Feb 15, 2018
Merged

Fix lp:1748275 #8379

merged 1 commit into from Feb 15, 2018

Conversation

hmlanigan
Copy link
Member

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

@hmlanigan
Copy link
Member Author

Copy link
Contributor

@babbageclunk babbageclunk left a 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.

statePool *state.StatePool
lis net.Listener

// tag of the machine where the API server is running.
Copy link
Contributor

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! ;)

@@ -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,
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@hmlanigan hmlanigan force-pushed the bug1748275 branch 2 times, most recently from f5bd54e to 8ae77ab Compare February 15, 2018 00:08
simply because the agent pinger isn't alive on the server yet.
@hmlanigan
Copy link
Member Author

$$merge$$

@jujubot jujubot merged commit 40000f0 into juju:develop Feb 15, 2018
@hmlanigan hmlanigan deleted the bug1748275 branch February 15, 2018 01:08
@hmlanigan hmlanigan restored the bug1748275 branch February 15, 2018 01:09
@hmlanigan hmlanigan deleted the bug1748275 branch February 15, 2018 01:10
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