File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import (
3838const (
3939 KIND_CURVEBS = "curvebs"
4040 KIND_CURVEFS = "curvefs"
41+ KIND_DINGOFS = "dingofs"
4142
4243 ROLE_ETCD = "etcd"
4344 ROLE_MDS = "mds"
Original file line number Diff line number Diff line change 88
99[[ -z $( which curl) ]] && apt-get install -y curl
1010wait=0
11- while (( wait< 20 ))
11+ while (( wait< 30 ))
1212do
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
2226done
2327echo " wait timeout"
2428exit 1
You can’t perform that action at this time.
0 commit comments