diff --git a/pkg/devtool/tasks/apply_script_task.go b/pkg/devtool/tasks/apply_script_task.go index 5e4bd6a7d8..c5e7c0ddeb 100644 --- a/pkg/devtool/tasks/apply_script_task.go +++ b/pkg/devtool/tasks/apply_script_task.go @@ -155,7 +155,7 @@ func (self *ApplyScriptTask) OnInit(ctx context.Context, obj db.IStandaloneModel // check proxy forward if ok := self.ensureLocalForwardWork(address, int(port)); !ok { self.clearLocalForward(session, forwardId) - self.taskFailed(ctx, sa, sar, errors.Wrapf(err, "The created local forward is actually not usable")) + self.taskFailed(ctx, sa, sar, errors.Error("The created local forward is actually not usable")) return } self.SetStage("OnAnsiblePlaybookComplete", updateData) @@ -180,6 +180,7 @@ func (self *ApplyScriptTask) checkSshable(session *mcclient.ClientSession, serve if err != nil { return sSSHable{}, errors.Wrapf(err, "unable to get sshable info of server %s", serverId) } + log.Debugf("data to chech sshable:\n %s", data) methodTrieds, _ := data.GetArray("method_tried") sshable := sSSHable{} reasons := make([]string, 0, len(methodTrieds)) @@ -216,6 +217,7 @@ func (self *ApplyScriptTask) ensureLocalForwardWork(host string, port int) bool if err == nil { return true } + log.Debugf("no.%d times, try to connect to %s failed: %s", waitTimes, address, err) time.Sleep(wt) waitTimes += 1 wt += 1 * time.Second