Skip to content

Commit ffc64ba

Browse files
committed
[wait mds] increase wait time of connect mds addr
1 parent 0ebe495 commit ffc64ba

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

cli/command/cluster/remove.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,16 @@ func runRemove(curveadm *cli.CurveAdm, options removeOptions) error {
100100
// 2.3): delete cluster in database
101101
if err := checkAllServicesRemoved(curveadm, options, clusters[0].Id); err != nil {
102102
return err
103-
} else if pass := tui.ConfirmYes(tui.PromptRemoveCluster(clusterName)); !pass {
103+
}
104+
// force stop
105+
if !options.force && !tui.ConfirmYes(tui.PromptRemoveCluster(clusterName)) {
104106
curveadm.WriteOut(tui.PromptCancelOpetation("remove cluster"))
105107
return errno.ERR_CANCEL_OPERATION
106-
} else if err := curveadm.Storage().DeleteCluster(clusterName); err != nil {
108+
} else {
109+
curveadm.WriteOut(tui.PromptRemoveCluster(clusterName))
110+
}
111+
112+
if err := curveadm.Storage().DeleteCluster(clusterName); err != nil {
107113
return errno.ERR_DELETE_CLUSTER_FAILED.E(err)
108114
}
109115

internal/configure/topology/dc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import (
3838
const (
3939
KIND_CURVEBS = "curvebs"
4040
KIND_CURVEFS = "curvefs"
41+
KIND_DINGOFS = "dingofs"
4142

4243
ROLE_ETCD = "etcd"
4344
ROLE_MDS = "mds"

internal/task/scripts/shell/wait.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,21 @@
88

99
[[ -z $(which curl) ]] && apt-get install -y curl
1010
wait=0
11-
while ((wait<20))
11+
while ((wait<30))
1212
do
1313
for addr in "$@"
1414
do
15-
curl --connect-timeout 3 --max-time 10 $addr -Iso /dev/null
15+
echo "connect [$addr]..." >> /curvefs/tools/logs/wait.log
16+
# curl --connect-timeout 3 --max-time 10 $addr -Iso /dev/null
17+
curl -sfI --connect-timeout 3 --max-time 5 "$addr" > /dev/null 2>&1
1618
if [ $? == 0 ]; then
17-
exit 0
19+
echo "connect [$addr] success !" >> /curvefs/tools/logs/wait.log
20+
exit 0
1821
fi
1922
done
20-
sleep 0.5s
23+
sleep 1s
2124
wait=$(expr $wait + 1)
25+
date >> /curvefs/tools/logs/wait.log
2226
done
2327
echo "wait timeout"
2428
exit 1

0 commit comments

Comments
 (0)