-
Notifications
You must be signed in to change notification settings - Fork 35
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
Make Launcher the starting point in all cases #909
Conversation
if @config.clustering? | ||
etcd = Etcd.new(@config.clustering_etcd_endpoints) | ||
@runner = controller = Clustering::Controller.new(@config, etcd) | ||
@replicator = Clustering::Server.new(@config, etcd, controller.id) |
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.
I think we should make Clustering::Server
accept a Clustering::Controller
instead of etcd and id, and then add methods to Clustering::Controller
to handle cluster secret and isr. That would isolate all etcd code to Clustering::Controller
.
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.
ok, but you would like to do that in another PR or?
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.
Yes
Co-authored-by: Carl Hörberg <carl@84codes.com>
df134c0
to
5b64cd9
Compare
WHAT is this pull request doing?
After other refactoring lavinmq no longer released its leader lease on graceful shutdown. The problem was that
Launcher
handled the signal, but didn't have a reference toClustering::Controller
or theLeadership
, and therefore couldn't release the lease.When looking into different solutions I realized that we had two ways of starting lavinmq:
Launcher
andClustering::Controller
.This PR will refactor the upstart to make
Launcher
responsible for the upstart. This also makes launcher the signal handler instead of having this in bothLauncher
andClustering::Client
.Launcher
will now have a reference toClustering::Controller
instead of the other way around.HOW can this pull request be tested?
Specs still passes, but some things needs to be tested manually.