File tree 2 files changed +35
-1
lines changed
2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -228,14 +228,22 @@ func CheckClusterDirOverlap(entries []DirEntry) error {
228
228
if d1 .instance .IsImported () && d2 .instance .IsImported () {
229
229
continue
230
230
}
231
- // overlap is alloed in the case one side is imported and the other is monitor,
231
+ // overlap is allowed in the case one side is imported and the other is monitor,
232
232
// we assume that the monitor is deployed with the first instance in that host,
233
233
// it implies that the monitor is imported too.
234
234
if (strings .HasPrefix (d1 .dirKind , "monitor" ) && d2 .instance .IsImported ()) ||
235
235
(d1 .instance .IsImported () && strings .HasPrefix (d2 .dirKind , "monitor" )) {
236
236
continue
237
237
}
238
238
239
+ // overlap is allowed in the case one side is data dir of a monitor instance,
240
+ // as the *_exporter don't need data dir, the field is only kept for compatiability
241
+ // with legacy tidb-ansible deployments.
242
+ if (strings .HasPrefix (d1 .dirKind , "monitor data directory" )) ||
243
+ (strings .HasPrefix (d2 .dirKind , "monitor data directory" )) {
244
+ continue
245
+ }
246
+
239
247
properties := map [string ]string {
240
248
"ThisDirKind" : d1 .dirKind ,
241
249
"ThisDir" : d1 .dir ,
Original file line number Diff line number Diff line change @@ -1041,6 +1041,32 @@ tikv_servers:
1041
1041
status_port: 32180
1042
1042
log_dir: "/home/tidb6wu/tidb1-data/tikv-32160-log"
1043
1043
data_dir: "/home/tidb6wu/tidb1-data/tikv-32160"
1044
+ ` ,
1045
+ `
1046
+ monitored:
1047
+ node_exporter_port: 9100
1048
+ blackbox_exporter_port: 9115
1049
+ deploy_dir: /data/deploy/monitor-9100
1050
+ data_dir: /data/deploy/monitor-9100
1051
+ log_dir: /data/deploy/monitor-9100/log
1052
+ pd_servers:
1053
+ - host: n0
1054
+ name: pd0
1055
+ imported: true
1056
+ deploy_dir: /data/deploy
1057
+ data_dir: /data/deploy/data.pd
1058
+ log_dir: /data/deploy/log
1059
+ - host: n1
1060
+ name: pd1
1061
+ log_dir: "/data/deploy/pd-2379/log"
1062
+ data_dir: "/data/pd-2379"
1063
+ deploy_dir: "/data/deploy/pd-2379"
1064
+ cdc_servers:
1065
+ - host: n1
1066
+ port: 8300
1067
+ deploy_dir: /data/deploy/ticdc-8300
1068
+ data_dir: /data1/ticdc-8300
1069
+ log_dir: /data/deploy/ticdc-8300/log
1044
1070
` ,
1045
1071
}
1046
1072
for _ , s := range goodTopos {
You can’t perform that action at this time.
0 commit comments