Skip to content

Commit

Permalink
chore: logging before the disconnection
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardomaraschini committed Feb 1, 2024
1 parent 429fac2 commit 0610286
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phase/prepare_hosts.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ func (p *PrepareHosts) updateEnvironment(h *cluster.Host) error {
// preserved across multiple ssh sessions. We need to write the environment
// and then reopen the ssh session. Go's ssh client.Setenv() depends on ssh
// server configuration (sshd only accepts LC_* variables by default).
log.Infof("%s: reconnecting to apply new environment", h)
h.Disconnect()
log.Infof("%s: Reconnecting", h)
return retry.Timeout(context.TODO(), 10*time.Minute, func(_ context.Context) error {
if err := h.Connect(); err != nil {
if errors.Is(err, rig.ErrCantConnect) || strings.Contains(err.Error(), "host key mismatch") {
Expand Down

0 comments on commit 0610286

Please sign in to comment.