diff --git a/pkg/grctl/cmd/init.go b/pkg/grctl/cmd/init.go index bcb2287a9..5ad968f3a 100644 --- a/pkg/grctl/cmd/init.go +++ b/pkg/grctl/cmd/init.go @@ -28,7 +28,6 @@ import ( "github.com/goodrain/rainbond/pkg/grctl/clients" //"runtime" "fmt" - "github.com/bitly/go-simplejson" ) func NewCmdInit() cli.Command { @@ -98,6 +97,7 @@ func initCluster(c *cli.Context) error { arg="" } //logrus.Infof("args is %s,len is %d",arg,len(arg)) + fmt.Println("开始初始化集群") cmd := exec.Command("bash", "-c",arg+string(b)) buf:=bytes.NewBuffer(nil) cmd.Stderr=buf @@ -106,11 +106,7 @@ func initCluster(c *cli.Context) error { arr:=strings.SplitN(out,"{",2) arr[1]="{"+arr[1] jsonStr:=arr[1] - _,err=simplejson.NewJson([]byte(jsonStr)) - if err != nil { - logrus.Errorf("%s",err.Error()) - return err - } + fmt.Println(jsonStr) clients.NodeClient.Tasks().Get("install_manage_ready").Status() return nil diff --git a/pkg/grctl/cmd/installStatus.go b/pkg/grctl/cmd/installStatus.go index 2b4573874..8148ce1fd 100644 --- a/pkg/grctl/cmd/installStatus.go +++ b/pkg/grctl/cmd/installStatus.go @@ -203,9 +203,10 @@ func Task(c *cli.Context,task string,status bool) error { logrus.Errorf("error get task:%s 's status,details %s",task,err.Error()) return err } + fmt.Printf("安装中 ") for k,v:=range taskStatus.Status{ - if v.CompleStatus=="" { - fmt.Printf("安装中") + if v.Status!="complete" { + fmt.Printf(".") continue }else { fmt.Printf("%s is %s-----%s",k,v.CompleStatus,v.Status)