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

Promote last Master to master again #7028

Open
hamidreza-hosseini opened this issue Mar 26, 2020 · 3 comments
Open

Promote last Master to master again #7028

hamidreza-hosseini opened this issue Mar 26, 2020 · 3 comments

Comments

@hamidreza-hosseini
Copy link

Hi,
I run 2 redis nodes with sentinel in replica mode, when i stop master node my slave will promote to master but when i started the last master again sentinel doesnt return that redis to master mode...
I want , when my last master get healthy, sentinel promote it as master again but it still is slave and last slave is master
How can i tell sentinel to do this after a time? forexample when master become healthy after 3 minutes or immadiately promote the last master to master again?

@hwware
Copy link
Collaborator

hwware commented Mar 26, 2020

Hello, what you can do is manually failover the promoted slave, then the old master, if it is healthy, will be promoted to master by sentinel..please check SENTINEL FAILOVER command..

@hamidreza-hosseini
Copy link
Author

I want this promotion will happen automatically with Sentinel, NOT Manually...
Can i configure this for automatic failover?

@hwware
Copy link
Collaborator

hwware commented Mar 29, 2020

Ok, Based on what I know there is no automatic way to config this in Redis side, but if you really expect this happen, you can do something extra for writing an extra process monitoring the previous master status, if it is online, then send the SENTINEL FAILOVER to Sentinel

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

No branches or pull requests

2 participants