-
Notifications
You must be signed in to change notification settings - Fork 315
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
Conversation
This PR has passed 'Verify' and is ready for review and approval! |
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)); |
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.
perhaps let latest_pkg = …
?
This PR has passed 'Verify' and is ready for review and approval! |
This PR has passed 'Verify' and is ready for review and approval! |
This PR has passed 'Verify' and is ready for review and approval! |
This PR has passed 'Verify' and is ready for review and approval! |
@@ -4,3 +4,4 @@ password = "Password1234" | |||
sapadm-password = "Password1234" | |||
system-user-password = "Password1234" | |||
root-password = "Password1234" | |||
role = "worker" |
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.
You are going to work so hard
This PR has passed 'Verify' and is ready for review and approval! |
@delivery approve |
Merged change 130b6dd5-9321-4286-9d41-1aec790e9d7a From review branch init-hook into master Signed-off-by: adam <[email protected]>
Change: 130b6dd5-9321-4286-9d41-1aec790e9d7a approved by: @adamhjk |
This PR adds a new topology type called
initializer
which is a building block forleader
. 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 theleader
oriniitalizer
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.