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

[BUG] redis cluster mode sentinel is not supported, despite what the help screen says. #8025

Closed
MarkKharitonov opened this issue Aug 26, 2024 · 6 comments
Assignees
Labels
kind/bug Something isn't working
Milestone

Comments

@MarkKharitonov
Copy link

MarkKharitonov commented Aug 26, 2024

Describe the bug

According to the help screen, the supported modes include sentinel:

mark@L-R910LPKW:~$ kbcli cluster create redis redis -h | grep -A2 mode | head -2
    --mode='replication':
        Cluster topology mode. Legal values [standalone, replication, cluster, sentinel, replication-twemproxy].
mark@L-R910LPKW:~$

But trying to create a cluster in this mode produces invalid cluster:

mark@L-R910LPKW:~$ kbcli cluster create redis redis --mode sentinel
Info: --version is not specified, redis-7.2.4 is applied by default.
Cluster redis created
mark@L-R910LPKW:~$ k get cluster redis -o yaml | yq .status
conditions:
  - lastTransitionTime: "2024-08-26T17:53:19Z"
    message: 'specified cluster topology not found: sentinel'
    reason: PreCheckFailed
    status: "False"
    type: ProvisioningStarted
mark@L-R910LPKW:~$

To Reproduce

Steps to reproduce the behavior:

  1. kbcli cluster create redis redis --mode sentinel
  2. kubectl get cluster redis -o jsonpath='{.status.conditions[].message}' && echo

Expected behavior

The sentinel mode is supported as claimed in the help screen.

Desktop (please complete the following information):

mark@L-R910LPKW:~$ helm ls -n system-d-kube-blocks | grep redis
kb-addon-redis                  system-d-kube-blocks    1               2024-08-26 03:53:05.174636299 +0000 UTC deployed        redis-0.9.0
7.2.4
mark@L-R910LPKW:~$ uname -a
Linux L-R910LPKW 5.15.153.1-microsoft-standard-WSL2 #1 SMP Fri Mar 29 23:14:13 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
mark@L-R910LPKW:~$

Additional information

Trying to use the cluster mode fails right away:

mark@L-R910LPKW:~$ kbcli cluster create redis redis --mode cluster
error: cannot find clusterDefinitionRef in cluster spec or componentDef in componentSpecs
mark@L-R910LPKW:~$

This is again contrary to the help screen.

@MarkKharitonov MarkKharitonov added the kind/bug Something isn't working label Aug 26, 2024
@shanshanying
Copy link
Contributor

shanshanying commented Aug 27, 2024

Hi @MarkKharitonov ,

thanks for reporting the issue. What is the version of kbcli and KubeBlocks you are working with?
you can use

kbcli version

to get the versions.

@shanshanying
Copy link
Contributor

@Y-Rookie could you please help on this issue.

@Y-Rookie
Copy link
Collaborator

Y-Rookie commented Aug 27, 2024

Hello @MarkKharitonov, I have confirmed that we indeed do not support the topology mode=sentinel. This is a legacy bug in kbcli, and we will fix it in the next release version. Additionally, if you want to create a redis cluster with sentinel, you can directly use the topology mode=replication. The topology mode=replication will create a Redis server with one primary and onesecondary by default, along with a three-replicas redis sentinel.

@shanshanying shanshanying added this to the Release 0.9.1 milestone Aug 27, 2024
@MarkKharitonov
Copy link
Author

Sure, I installed kb just 2 days ago for the first time:

mark@L-R910LPKW:~$ kbcli version
Kubernetes: v1.28.3
KubeBlocks: 0.9.0
kbcli: 0.9.0
mark@L-R910LPKW:~$

@shanshanying
Copy link
Contributor

This will be fixed in our next minor version release 0.9.1.

@shanshanying
Copy link
Contributor

fixed in apecloud/kbcli#450

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants
@MarkKharitonov @Y-Rookie @shanshanying @nayutah and others