Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test ci #2352

Closed
wants to merge 2 commits into from
Closed

test ci #2352

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions pkg/cluster/executor/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ func (e *EasySSHExecutor) Execute(ctx context.Context, cmd string, sudo bool, ti

// set a basic PATH in case it's empty on login
cmd = fmt.Sprintf("PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin %s", cmd)

fmt.Println("cmd1", cmd)
if e.Locale != "" {
cmd = fmt.Sprintf("export LANG=%s; %s", e.Locale, cmd)
}
Expand All @@ -154,9 +154,14 @@ func (e *EasySSHExecutor) Execute(ctx context.Context, cmd string, sudo bool, ti
if len(timeout) == 0 {
timeout = append(timeout, executeDefaultTimeout)
}

fmt.Println("cmd2", cmd)
fmt.Println("run command on remote host", e.Config.Server)
stdout, stderr, done, err := e.Config.Run(cmd, timeout...)

fmt.Println("stderr", stderr)
if stderr != "" {
fmt.Println("stderr cmd is", stderr, cmd)
}
fmt.Println("err", err)
logfn := zap.L().Info
if err != nil {
logfn = zap.L().Error
Expand All @@ -182,6 +187,7 @@ func (e *EasySSHExecutor) Execute(ctx context.Context, cmd string, sudo bool, ti
e.Config.Server,
color.YellowString(output)))
}
fmt.Println("return err, cmd: ", cmd)
return []byte(stdout), []byte(stderr), baseErr
}

Expand Down
5 changes: 4 additions & 1 deletion pkg/cluster/manager/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ func (m *Manager) Deploy(
if strings.HasPrefix(globalOptions.DataDir, "/") {
dirs = append(dirs, globalOptions.DataDir)
}

fmt.Println("opt user", opt.User)
fmt.Println("globalOptions.User", globalOptions.User)
fmt.Println("dddd")
fmt.Println("ddd")
t := task.NewBuilder(m.logger).
RootSSH(
host,
Expand Down
1 change: 1 addition & 0 deletions pkg/cluster/task/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ func (b *Builder) UserSSH(
if sshType == "" {
sshType = defaultSSHType
}
fmt.Println("sshtype", sshType)
b.tasks = append(b.tasks, &UserSSH{
host: host,
port: port,
Expand Down
Loading