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

Add initializer topology #82

Merged
merged 1 commit into from
Nov 16, 2015
Merged

Add initializer topology #82

merged 1 commit into from
Nov 16, 2015

Conversation

reset
Copy link
Collaborator

@reset reset commented Nov 16, 2015

This PR adds a new topology type called initializer which is a building block for leader. The initializer topology performs a leader election without leader fallback.

Also new in this PR is the init hook. The contents of the hook are run during an initialization step prior to the run hook. When this hook runs depends on the topology chosen, but it is always before the run hook. When your service is running in the leader or iniitalizer topology the hook is run first by the master and then, after the master has run it's hook, the followers will run their initialization.

The hook can be parameterized to know if the leader or the follower is running the hook by checking {{census.me.leader}}.

The original leader topology's behaviour is unchanged with the exception of it now performing service initialization as described above.

@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

println!(" {}: Starting", worker.preamble());
let runit_pkg = try!(Package::latest("runit", None));
let package = worker.package_name.clone();
let runit_pkg = try!(Package::latest(&package, None));
Copy link
Collaborator

Choose a reason for hiding this comment

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

perhaps let latest_pkg = … ?

@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

@@ -4,3 +4,4 @@ password = "Password1234"
sapadm-password = "Password1234"
system-user-password = "Password1234"
root-password = "Password1234"
role = "worker"
Copy link
Contributor

Choose a reason for hiding this comment

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

You are going to work so hard

@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

@adamhjk
Copy link
Contributor

adamhjk commented Nov 16, 2015

gif-keyboard-11291927641788048066

@adamhjk
Copy link
Contributor

adamhjk commented Nov 16, 2015

@delivery approve

chef-delivery added a commit that referenced this pull request Nov 16, 2015
Merged change 130b6dd5-9321-4286-9d41-1aec790e9d7a

From review branch init-hook into master

Signed-off-by: adam <[email protected]>
@chef-delivery chef-delivery merged commit cdfc9e5 into master Nov 16, 2015
@chef-delivery chef-delivery deleted the init-hook branch November 16, 2015 14:10
@chef-delivery
Copy link
Contributor

Change: 130b6dd5-9321-4286-9d41-1aec790e9d7a approved by: @adamhjk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants