You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update the cluster -> error
kbcli cluster update redis-lphhul --enable-all-logs=true --namespace default
panic: runtime error: index out of range [0] with length 0
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
shanshanying
changed the title
[BUG]runtime error occurred when updating redis cluster
[BUG]kbcli runtime error when enabling logs for redis cluster
Feb 17, 2025
shanshanying
changed the title
[BUG]kbcli runtime error when enabling logs for redis cluster
[BUG]kb runtime error when enabling logs for redis cluster
Feb 17, 2025
shanshanying
changed the title
[BUG]kb runtime error when enabling logs for redis cluster
[BUG]kbcli runtime error when enabling logs for redis cluster
Feb 17, 2025
EnabledLogs API is deprecated sinc KB 1.0. kbcli does not support update --enable-all-logs
~kbcli cluster update --help
Update the cluster settings, such as enable or disable monitor or log.
Examples:
# update cluster mycluster termination policy to Delete
kbcli cluster update mycluster --termination-policy=Delete
# enable cluster monitor
kbcli cluster update mycluster --monitor=true
# enable all logs
kbcli cluster update mycluster --enable-all-logs=true
===>I saw the example in help doc, if not support, pls update together
Describe the env
Kubernetes: v1.31.1-aliyun.1
KubeBlocks: 1.0.0-beta.28
kbcli: 1.0.0-beta.13
To Reproduce
Steps to reproduce the behavior:
kbcli cluster update redis-lphhul --enable-all-logs=true --namespace default
panic: runtime error: index out of range [0] with length 0
goroutine 1 [running]:
github.com/apecloud/kbcli/pkg/cmd/cluster.buildLogsReconfiguringOps({0x140018122e0, 0xc}, {0x140018122f9, 0x7}, {0x14001812370, 0x5}, {0x140013a1b78, 0x18}, {0x14000e36294, 0xa}, ...)
/home/runner/work/kbcli/kbcli/pkg/cmd/cluster/update.go:654 +0x454
github.com/apecloud/kbcli/pkg/cmd/cluster.(*UpdateOptions).reconfigureLogVariables.func1({{0x14001812370, 0x5}, {0x14001324228, 0x15}, {0x140018123c5, 0x5}, {0x0, 0x0, 0x0}, 0x0, ...}, ...)
/home/runner/work/kbcli/kbcli/pkg/cmd/cluster/update.go:537 +0x210
github.com/apecloud/kbcli/pkg/cmd/cluster.(*UpdateOptions).reconfigureLogVariables(0x140013edb00, 0x14000678910?, 0x1400181233a?)
/home/runner/work/kbcli/kbcli/pkg/cmd/cluster/update.go:551 +0x160
github.com/apecloud/kbcli/pkg/cmd/cluster.(*UpdateOptions).updateEnabledLog(0x140013edb00, {0x10736f553?, 0x16b77738d?})
/home/runner/work/kbcli/kbcli/pkg/cmd/cluster/update.go:489 +0x21c
github.com/apecloud/kbcli/pkg/cmd/cluster.(*UpdateOptions).buildComponents(0x140013edb00?, {0x1073927b8?, 0xf?}, {0x10736f553?, 0x4?})
/home/runner/work/kbcli/kbcli/pkg/cmd/cluster/update.go:428 +0x174
github.com/apecloud/kbcli/pkg/cmd/cluster.(*UpdateOptions).buildPatch.func3(0x1083d7160?, {0x1081fa660?, 0x14001135c00?}, {0x1073927b8?, 0x1400180fb08?})
/home/runner/work/kbcli/kbcli/pkg/cmd/cluster/update.go:308 +0x54
github.com/apecloud/kbcli/pkg/cmd/cluster.(*UpdateOptions).buildPatch(0x140013edb00)
/home/runner/work/kbcli/kbcli/pkg/cmd/cluster/update.go:350 +0x8d4
github.com/apecloud/kbcli/pkg/cmd/cluster.(*UpdateOptions).Complete(0x140013edb00)
/home/runner/work/kbcli/kbcli/pkg/cmd/cluster/update.go:284 +0xc8
github.com/apecloud/kbcli/pkg/cmd/cluster.(*UpdateOptions).Exec(0x140013edb00)
/home/runner/work/kbcli/kbcli/pkg/cmd/cluster/update.go:267 +0x2c
github.com/apecloud/kbcli/pkg/cmd/cluster.NewUpdateCmd.func1(0x1400143c008?, {0x1400087ce40?, 0x1?, 0x4?})
/home/runner/work/kbcli/kbcli/pkg/cmd/cluster/update.go:166 +0x48
github.com/spf13/cobra.(*Command).execute(0x1400143c008, {0x1400087ce00, 0x4, 0x4})
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:989 +0x828
github.com/spf13/cobra.(*Command).ExecuteC(0x140008c4c08)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
/home/runner/go/pkg/mod/github.com/spf13/cobra@v1.8.1/command.go:1041
k8s.io/component-base/cli.run(0x140008c4c08)
/home/runner/go/pkg/mod/k8s.io/component-base@v0.29.2/cli/run.go:146 +0x250
k8s.io/component-base/cli.RunNoErrOutput(...)
/home/runner/go/pkg/mod/k8s.io/component-base@v0.29.2/cli/run.go:84
main.main()
/home/runner/work/kbcli/kbcli/cmd/cli/main.go:31 +0x20
The text was updated successfully, but these errors were encountered: