File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ func (m ModJobSshStruct) sshLocal(job SshJob) {
101101
102102// 用正则表达式验证公钥格式
103103func (m ModJobSshStruct ) setupThisNode (pubkey string ) {
104+ util .PrintStep ("job ssh" , "setupThisNode started" )
104105 pubkey = strings .TrimSpace (pubkey )
105106 innerSetPubkeyOnThisNode := func (pubkey string ) error {
106107 // 校验公钥格式
@@ -151,6 +152,7 @@ func (m ModJobSshStruct) setupThisNode(pubkey string) {
151152 err := innerSetPubkeyOnThisNode (pubkey )
152153 if err != nil {
153154 fmt .Println (color .RedString ("set pubkey failed: %v" , err ))
155+ os .Exit (1 )
154156 } else {
155157 fmt .Println (color .GreenString ("set pubkey success" ))
156158 }
@@ -354,7 +356,8 @@ func (m ModJobSshStruct) setupClusterInner(clusterConf clusterconf.ClusterConfYm
354356 return strings .Contains (src , keyword )
355357 })
356358 }) {
357- fmt .Println (color .RedString ("ssh setup remote pubkey error: %s" , output ))
359+ fmt .Println (color .RedString ("ssh setup remote pubkey error: %v" , output ))
360+ fmt .Println (color .RedString ("recent remote log: %v" , util .GetMostRecentRemoteLog ()))
358361 os .Exit (1 )
359362 // // debug sshd_config
360363 // util.ModRunCmd.NewBuilder("cat", "/etc/ssh/sshd_config").WithRoot().ShowProgress().BlockRun()
Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ func Main() {
230230 rootCmd .AddCommand (cmd )
231231 }
232232
233+ util .PrintStep ("telego start" , "telego try dispatch sub jobs" )
233234 rootCmd .Execute ()
234235 if ! parseFail {
235236 return
You can’t perform that action at this time.
0 commit comments