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

Run HA clusters #1089

Merged
merged 6 commits into from Feb 26, 2015

Conversation

Projects
None yet
2 participants
@titanous
Copy link
Member

commented Feb 25, 2015

This changes bootstrap to detect whether it should run in singleton mode by first checking the SINGLETON environment variable and if not set, checking if the number of expected nodes is 1.

If singleton mode is not enabled, enough instances of each process are run to make the control plane tolerate the loss of a node without having to start new instances.

@titanous titanous force-pushed the ha branch 2 times, most recently from 27c603a to 7a488b1 Feb 25, 2015

titanous added some commits Feb 25, 2015

bootstrap: Remove dead code
We never implemented rollback/cleanup.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
appliance/postgresql: Fix data directory permissions
Postgres doesn’t like a world-readable data directory.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
bootstrap: Run highly available clusters when not in singleton mode
This changes bootstrap to detect whether it should run in singleton mode
by first checking the SINGLETON environment variable and if not set,
checking if the number of expected nodes is 1.

If singleton mode is not enabled, enough instances of each process are
run to make the control plane tolerate the loss of a node without having
to start new instances.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
docs: Update installation doc to bootstrap with min-hosts
This ensures that the cluster will start in HA mode.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
bootstrap: Don’t allow bootstrap with min-hosts=2
Running a two-node cluster is not a good idea as etcd tends to break in
unexpected ways and the cluster is not highly available.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
appliance/postgresql: Return metadata index to caller
If we don’t do this, the state machine will only be able to set the meta
once as the new index is returned and used in the next CAS.

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
Singleton: minHosts == 1,
}
if s := os.Getenv("SINGLETON"); s != "" {
state.Singleton = s == "true"

This comment has been minimized.

Copy link
@lmars

lmars Feb 26, 2015

Member

state.Singleton = os.Getenv("SINGLETON") == "true"

This comment has been minimized.

Copy link
@titanous

titanous Feb 26, 2015

Author Member

I'm not sure that would work, as it would override the minHosts == 1 check above even if unset.

This comment has been minimized.

Copy link
@lmars

lmars Feb 26, 2015

Member

Ah totally missed that assignment.

@lmars

This comment has been minimized.

Copy link
Member

commented Feb 26, 2015

LGTM pending minor comment

titanous added a commit that referenced this pull request Feb 26, 2015

Merge pull request #1089 from flynn/ha
Run HA clusters

@titanous titanous merged commit 165d646 into master Feb 26, 2015

1 check passed

continuous-integration/flynn The Flynn CI build passed
Details

@titanous titanous deleted the ha branch Feb 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.