Closed
Description
Describe the env
Kubernetes: v1.31.1-aliyun.1
KubeBlocks: 1.0.0-beta.7
kbcli: 1.0.0-beta.3
To Reproduce
Steps to reproduce the behavior:
- Create redis cluster
k get cluster -A
default redis-tnmept redis DoNotTerminate Running 3h31m
- reconfigure it using kbcli cluster configure
kbcli cluster configure redis-tnmept --auto-approve --force=true --set maxclients=10001 --components redis --config-spec redis-replication-config --config-file redis.conf --namespace default
Will updated configure file meta:
ConfigSpec: redis-replication-config ConfigFile: redis.conf ComponentName: redis ClusterName: redis-tnmept
OpsRequest redis-tnmept-reconfiguring-vw8fl created successfully, you can view the progress:
kbcli cluster describe-ops redis-tnmept-reconfiguring-vw8fl -n default
- Check ops status: Failed
kbcli cluster describe-ops redis-tnmept-reconfiguring-vw8fl -n default
Spec:
Name: redis-tnmept-reconfiguring-vw8fl NameSpace: default Cluster: redis-tnmept Type: Reconfiguring
Command: <none>
Status:
Completion Time: Nov 27,2024 11:06 UTC+0800
Status: Failed
Progress: -/-
Conditions:
LAST-TRANSITION-TIME TYPE REASON STATUS MESSAGE
Nov 27,2024 11:06 UTC+0800 WaitForProgressing WaitForProgressing True wait for the controller to process the OpsRequest: redis-tnmept-reconfiguring-vw8fl in Cluster: redis-tnmept
Nov 27,2024 11:06 UTC+0800 Validated ValidateFailed False "spec.reconfigures" can not be empty
Warning Events:
TIME TYPE REASON OBJECT MESSAGE
Nov 27,2024 11:06 UTC+0800 Warning ValidateFailed OpsRequest/redis-tnmept-reconfiguring-vw8fl "spec.reconfigures" can not be empty
tianyue@apeclouds-MacBook-Pro kbcli % kbcli cluster list-ops redis-tnmept --status all --namespace default
NAME NAMESPACE TYPE CLUSTER COMPONENT STATUS PROGRESS CREATED-TIME
redis-tnmept-reconfiguring-vw8fl default Reconfiguring redis-tnmept Failed -/- Nov 27,2024 11:06 UTC+0800
tianyue@apeclouds-MacBook-Pro kbcli % kbcli cluster describe-ops redis-tnmept-reconfiguring-vw8fl -n default
Spec:
Name: redis-tnmept-reconfiguring-vw8fl NameSpace: default Cluster: redis-tnmept Type: Reconfiguring
Command: <none>
Status:
Completion Time: Nov 27,2024 11:06 UTC+0800
Status: Failed
Progress: -/-
Conditions:
LAST-TRANSITION-TIME TYPE REASON STATUS MESSAGE
Nov 27,2024 11:06 UTC+0800 WaitForProgressing WaitForProgressing True wait for the controller to process the OpsRequest: redis-tnmept-reconfiguring-vw8fl in Cluster: redis-tnmept
Nov 27,2024 11:06 UTC+0800 Validated ValidateFailed False "spec.reconfigures" can not be empty
Warning Events:
TIME TYPE REASON OBJECT MESSAGE
Nov 27,2024 11:06 UTC+0800 Warning ValidateFailed OpsRequest/redis-tnmept-reconfiguring-vw8fl "spec.reconfigures" can not be empty
- check help
===> there is no spec.reconfigures
kbcli cluster configure --help
Configure parameters with the specified components in the cluster.
Examples:
# update component params
kbcli cluster configure mycluster --components=mysql --config-spec=mysql-3node-tpl --config-file=my.cnf
--set=max_connections=1000,general_log=OFF
# if only one component, and one config spec, and one config file, simplify the searching process of configure. e.g:
# update mysql max_connections, cluster name is mycluster
kbcli cluster configure mycluster --set max_connections=2000
Options:
--auto-approve=false:
Skip interactive approval before reconfiguring the cluster
--components=[]:
Component names to this operations
--config-file='':
Specify the name of the configuration file to be updated (e.g. for mysql: --config-file=my.cnf). For available
templates and configs, refer to: 'kbcli cluster describe-config'.
--config-spec='':
Specify the name of the configuration template to be updated (e.g. for apecloud-mysql:
--config-spec=mysql-3node-tpl). For available templates and configs, refer to: 'kbcli cluster
describe-config'.
--dry-run='none':
Must be "client", or "server". If with client strategy, only print the object that would be sent, and no data
is actually sent. If with server strategy, submit the server-side request, but no data is persistent.
--edit=false:
Edit the API resource before creating
--force=false:
skip the pre-checks of the opsRequest to run the opsRequest forcibly
--force-restart=false:
Boolean flag to restart component. Default with false.
--local-file='':
Specify the local configuration file to be updated.
--name='':
OpsRequest name. if not specified, it will be randomly generated
-o, --output=yaml:
Prints the output in the specified format. Allowed values: JSON and YAML
--replace=false:
Boolean flag to enable replacing config file. Default with false.
--set=[]:
Specify parameters list to be updated. For more details, refer to 'kbcli cluster describe-config'.
--ttlSecondsAfterSucceed=0:
Time to live after the OpsRequest succeed
Usage:
kbcli cluster configure NAME --set key=value[,key=value] [--components=component1-name,component2-name]
[--config-spec=config-spec-name] [--config-file=config-file] [flags] [options]
Use "kbcli options" for a list of global command-line options (applies to all commands).
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.