-
Notifications
You must be signed in to change notification settings - Fork 9.5k
[bitnami/valkey] Fix broken failover in sentinel setups #30689
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"Update all the references from to master/slave to primary/replica" (bitnami#30024) replaced one "master" too many, breaking the primary/replica detection in the `prestop-valkey.sh` script. In this particular case, Valkey responds with "master" still for backwards compatibility. Signed-off-by: Simon Baatz <[email protected]>
4ddc924
to
e2fb537
Compare
Signed-off-by: Bitnami Containers <[email protected]>
Signed-off-by: Carlos Rodríguez Hernández <[email protected]>
Signed-off-by: Bitnami Containers <[email protected]>
jotamartos
approved these changes
Dec 5, 2024
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.
Thanks for your contribution
@@ -528,7 +528,7 @@ data: | |||
} | |||
is_primary() { | |||
VALKEY_ROLE=$(run_valkey_command role | head -1) | |||
[[ "$VALKEY_ROLE" == "primary" ]] | |||
[[ "$VALKEY_ROLE" == "master" ]] |
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.
primary node
I have no name!@valkey-cluster-0:/$ valkey-cli -c -a $VALKEY_PASSWORD
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
127.0.0.1:6379> role
1) "master"
2) (integer) 70
3) 1) 1) "10.220.0.11"
2) "6379"
3) "70"
127.0.0.1:6379> exit
I have no name!@valkey-cluster-0:/$ exit
replica node
I have no name!@valkey-cluster-3:/$ valkey-cli -c -a $VALKEY_PASSWORD
Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
127.0.0.1:6379> role
1) "slave"
2) "10.220.2.13"
3) (integer) 6379
4) "connected"
5) (integer) 322
127.0.0.1:6379> exit
I have no name!@valkey-cluster-3:/$ exit
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of the change
"Update all the references from to master/slave to primary/replica" (#30024) replaced one "master" too many, breaking the primary/replica detection in the
prestop-valkey.sh
script. In this particular case, Valkey responds with "master" still for backwards compatibility.Benefits
Possible drawbacks
Checklist
Chart.yaml
according to semver. This is not necessary when the changes only affect README.md files.