Skip to content

[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 4 commits into from
Dec 5, 2024

Conversation

gmbnomis
Copy link
Contributor

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

  • Failover procedure at shutdown of primary works again

Possible drawbacks

  • none

Checklist

  • Chart version bumped in Chart.yaml according to semver. This is not necessary when the changes only affect README.md files.
  • Title of the pull request follows this pattern [bitnami/<name_of_the_chart>] Descriptive title
  • All commits signed off and in agreement of Developer Certificate of Origin (DCO)

@github-actions github-actions bot added valkey triage Triage is needed labels Nov 29, 2024
@github-actions github-actions bot requested a review from carrodher November 29, 2024 16:23
"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]>
@gmbnomis gmbnomis force-pushed the valkey_2_fix_failover branch from 4ddc924 to e2fb537 Compare November 29, 2024 16:25
Bitnami Containers and others added 2 commits November 29, 2024 16:27
Signed-off-by: Bitnami Containers <[email protected]>
Signed-off-by: Carlos Rodríguez Hernández <[email protected]>
@carrodher carrodher added verify Execute verification workflow for these changes in-progress labels Dec 2, 2024
@github-actions github-actions bot removed the triage Triage is needed label Dec 2, 2024
@github-actions github-actions bot removed the request for review from carrodher December 2, 2024 11:12
@github-actions github-actions bot requested a review from jotamartos December 2, 2024 11:12
Signed-off-by: Bitnami Containers <[email protected]>
Copy link
Contributor

@jotamartos jotamartos left a 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" ]]
Copy link
Contributor

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

@jotamartos jotamartos merged commit 1d3ed00 into bitnami:main Dec 5, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved valkey verify Execute verification workflow for these changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants