【 TiDB 版本】
Cluster version: v5.0.0
【遇到的问题】
编写扩容文件发现识别不了参数data_dir
line 6: field data_dir not found in type spec.CDCSpec
【问题现象及影响】
tiup cluster scale-out calctidb-cluster scale-out-ticdc.yaml
Found cluster newer version:
The latest version: v1.10.2
Local installed version: v1.4.1
Update current component: tiup update cluster
Update all components: tiup update --all
Starting component cluster
: /home/tidb/.tiup/components/cluster/v1.4.1/tiup-cluster scale-out calctidb-cluster scale-out-ticdc.yaml
Error: Failed to parse topology file scale-out-ticdc.yaml (topology.parse_failed)
caused by: yaml: unmarshal errors:
line 6: field data_dir not found in type spec.CDCSpec
line 11: field data_dir not found in type spec.CDCSpec
Please check the syntax of your topology file scale-out-ticdc.yaml and try again.
Error: run /home/tidb/.tiup/components/cluster/v1.4.1/tiup-cluster
(wd:/home/tidb/.tiup/data/TArcMg4) failed: exit status 1
**【附件】 **
- 相关日志、配置文件
cdc_servers:
-
host: xxx.xx.3.116
gc-ttl: 86400
deploy_dir: /tidb/cdc-8300
log_dir: /tidb/cdc-8300/log
data_dir: “/data03/cdc-8300” -
host: xxx.xx.3.117
gc-ttl: 86400
deploy_dir: /tidb/cdc-8300
log_dir: /tidb/cdc-8300/log
data_dir: “/data03/cdc-8300” -
TiUP Cluster Display 信息
tiup cluster display calctidb-cluster
Found cluster newer version:The latest version: v1.10.2 Local installed version: v1.4.1 Update current component: tiup update cluster Update all components: tiup update --all
Starting component
cluster
: /home/tidb/.tiup/components/cluster/v1.4.1/tiup-cluster display calctidb-cluster
Cluster type: tidb
Cluster name: calctidb-cluster
Cluster version: v5.0.0
SSH type: builtin
Dashboard URL: http://xxx.xx.3.114:2379/dashboard
【解决办法】
升级tiup 并再次运行扩容命名
$ tiup update --self
$ tiup update --all
$ tiup update --self
$ tiup update --all
$ tiup update --self
download https://tiup-mirrors.pingcap.com/tiup-v1.10.2-linux-amd64.tar.gz 6.81 MiB / 6.81 MiB 100.00% 14.37 MiB/s
Updated successfully!
$ tiup update --all
download https://tiup-mirrors.pingcap.com/cluster-v1.10.2-linux-amd64.tar.gz 8.28 MiB / 8.28 MiB 100.00% 6.09 MiB/s
download https://tiup-mirrors.pingcap.com/ctl-v6.1.0-linux-amd64.tar.gz 277.65 MiB / 277.65 MiB 100.00% 9.45 MiB/s
download https://tiup-mirrors.pingcap.com/dm-v1.10.2-linux-amd64.tar.gz 7.93 MiB / 7.93 MiB 100.00% 12.90 MiB/s
download https://tiup-mirrors.pingcap.com/dmctl-v6.1.0-linux-amd64.tar.gz 41.75 MiB / 41.75 MiB 100.00% 9.99 MiB/s
Updated successfully!
$ tiup cluster scale-out calctidb-cluster scale-out-ticdc.yaml
tiup is checking updates for component cluster …
Starting component cluster
: /home/tidb/.tiup/components/cluster/v1.10.2/tiup-cluster scale-out calctidb-cluster scale-out-ticdc.yaml
+ Detect CPU Arch Name
- Detecting node xxx.xx.3.116 Arch info ... Done
- Detecting node xxx.xx.3.117 Arch info ... Done
+ Detect CPU OS Name
- Detecting node xxx.xx.3.116 OS info ... Done
- Detecting node xxx.xx.3.117 OS info ... Done
Please confirm your topology:
Cluster type: tidb
Cluster name: calctidb-cluster
Cluster version: v5.0.0
Role Host Ports OS/Arch Directories
---- ---- ----- ------- -----------
cdc xxx.xx.3.116 8300 linux/x86_64 /tidb/cdc-8300,/data03/cdc-8300
cdc xxx.xx.3.117 8300 linux/x86_64 /tidb/cdc-8300,/data03/cdc-8300
Attention:
1. If the topology is not what you expected, check your yaml file.
2. Please confirm there is no port/directory conflicts in same host.
Do you want to continue? [y/N]: (default=N) y
……
Scaled cluster `calctidb-cluster` out successfully