Skip to content

Commit 7396ce4

Browse files
committed
Fixed wrong assignment for target in administration cli
1 parent c19a21f commit 7396ce4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

admin-tool/flags.go

+8-8
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,6 @@ func defineFlags(v string) *flagContainer {
242242
var t string
243243
set.StringVar(&t, `t`, "localhost:9400", `The end point of manager to work with.`)
244244

245-
if len(managerAddress) == 0 {
246-
managerAddress = targetAddress
247-
}
248-
249-
if len(managerAddress) == 0 {
250-
managerAddress = t
251-
}
252-
253245
var createCluster string
254246
set.StringVar(&createCluster, `create-cluster`, "", `Creates data nodes cluster. Provide data node binding addresses to create cluster. Node Manager will decide which data node will be master and which others are slave.
255247
Ex: 192.168.0.1:9430,192.168.0.2:9430`)
@@ -343,6 +335,14 @@ Ex: clusterId=snapshotIndex`)
343335
}
344336
_ = set.Parse(args)
345337

338+
if strings.Compare(managerAddress, "localhost:9400") == 0 {
339+
managerAddress = targetAddress
340+
}
341+
342+
if strings.Compare(managerAddress, "localhost:9400") == 0 {
343+
managerAddress = t
344+
}
345+
346346
cc := strings.Split(createCluster, ",")
347347
if len(cc) > 0 && len(cc[0]) == 0 {
348348
cc = []string{}

0 commit comments

Comments
 (0)