-
Notifications
You must be signed in to change notification settings - Fork 934
Create Post Take-Master Processes Hook #859
Conversation
Added PostTakeMasterProcessesEnabled and PostTakeMasterProcesses to config
Imported go/os and created new functions to enable Post Take-Master Hooks
Added sample config options to enable Post TakeMaster Processes
What does this error mean?
|
Sample outcome when using this functionality: (this PR addresses this issue #799)
|
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.
Thank you for this PR! I've made a few requests for changes.
…g.go, instance_topology.go and orchestrator-sample.conf.json
Thank you! I apologize for the delayed response. Completely swamped, and will be out next week. Will hope to respond by end of this month. |
No worries at all Shlomi, thanks for all the work 🥇 |
The tests ensure code is formatted via |
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.
Looking good, thank you!
For next time, to make the process smoother, please use a branch other than |
Thanks Shlomi, appreciate you looking at the request. |
Will do sir, my apologies for the confusion and the extra work I've caused. Thanks for looking through this PR and approving the changes. |
Hi @daniel-2647 , general question on your comment:
How did you add/update consul |
I created a postfailoverhook.sh script which gets called by the post failover hook. So, in the config, I have something like this:
and the shell script makes calls to update the consul store, sample below: (not complete code)
|
Thank you @daniel-2647 . |
Also |
Description
This PR creates a hook which would only be called upon a successful Take-Master event. This would enable custom scripts to be called at those times when a post failover hook is not called, i.e. When we do a graceful failover of an intermediary master (See #799 for full details)
This PR introduces 1 new config option:
PostTakeMasterProcesses : "some PostTakeMasterHook here"
There is an issue created for this a few months back with details on the reasoning behind this PR: #799
gofmt
(please avoidgoimports
)./build.sh
go test ./go/...