Skip to content

Commit 19a23aa

Browse files
cagedmantisgopherbot
authored andcommitted
cmd/coordinator, internal/coordinator/remote: move post handlers
This change moves the SSH handlers into the internal packages. It also adds the handler which will use the session pool instead of the remote buildlets. Updates golang/go#52594 For golang/go#47521 Change-Id: I7e99fdbb16e0f80a871696cec79a9b638354e662 Reviewed-on: https://go-review.googlesource.com/c/build/+/405257 TryBot-Result: Gopher Robot <[email protected]> Auto-Submit: Carlos Amedee <[email protected]> Reviewed-by: Carlos Amedee <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Carlos Amedee <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]>
1 parent d50e6c0 commit 19a23aa

File tree

6 files changed

+470
-263
lines changed

6 files changed

+470
-263
lines changed

cmd/coordinator/coordinator.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -406,16 +406,7 @@ func main() {
406406
if err != nil {
407407
return nil, fmt.Errorf("unable to retrieve keys for SSH Server: %v", err)
408408
}
409-
privateHostKeyFile, err := remote.WriteSSHPrivateKeyToTempFile(privateKey)
410-
log.Printf("unable to write private host key file: %s", err)
411-
if err != nil {
412-
return nil, fmt.Errorf("error writing ssh private key to temp file: %v; not running SSH server", err)
413-
}
414-
sshHandlers := &sshHandlers{
415-
gomotePublicKey: string(publicKey),
416-
sshPrivateKeyFile: privateHostKeyFile,
417-
}
418-
return remote.NewSSHServer(*sshAddr, privateKey, sshCA, sshHandlers.handleIncomingSSHPostAuth, sp)
409+
return remote.NewSSHServer(*sshAddr, privateKey, publicKey, sshCA, sp, remoteBuildlets)
419410
}
420411
sshServ, err := configureSSHServer()
421412
if err != nil {

0 commit comments

Comments
 (0)