Skip to content

Commit

Permalink
WIP: SSH connection failures
Browse files Browse the repository at this point in the history
  • Loading branch information
justinsb committed Feb 9, 2025
1 parent ee78cce commit 0380bb6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions cmd/kops/toolbox_dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,12 @@ func RunToolboxDump(ctx context.Context, f commandutils.Factory, out io.Writer,
}
}
}
if bastionAddress != "" {
klog.Info("will SSH using username and bastion address", sshConfig.User, bastionAddress)
} else {
klog.Info("will SSH using username (and no bastion)", sshConfig.User)
}

dumper := dump.NewLogDumper(bastionAddress, sshConfig, keyRing, options.Dir)

var additionalIPs []string
Expand Down
2 changes: 1 addition & 1 deletion pkg/dump/dumper.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ type logDumperNode struct {
func (d *logDumper) connectToNode(ctx context.Context, nodeName string, host string, useBastion bool) (*logDumperNode, error) {
client, err := d.sshClientFactory.Dial(ctx, host, useBastion)
if err != nil {
return nil, fmt.Errorf("unable to SSH to %q: %v", host, err)
return nil, fmt.Errorf("unable to SSH to %q: %w", host, err)
}
return &logDumperNode{
client: client,
Expand Down

0 comments on commit 0380bb6

Please sign in to comment.