mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-20 19:09:07 +01:00
Clarify error messages for nodes that are not connected
If a node does not have an update channel, it is probably not connected, clarify the log messages and make sure we dont print that it was updated successfully (continue, not return)
This commit is contained in:
parent
cefe2d5bcc
commit
39abc4e973
@ -308,8 +308,8 @@ func (h *Headscale) notifyChangesToPeers(m *Machine) {
|
|||||||
Str("func", "notifyChangesToPeers").
|
Str("func", "notifyChangesToPeers").
|
||||||
Str("machine", m.Name).
|
Str("machine", m.Name).
|
||||||
Str("peer", p.Name).
|
Str("peer", p.Name).
|
||||||
Msgf("Peer %s does not appear to be polling", p.Name)
|
Msgf("Peer %s does not have an open update client, skipping.", p.Name)
|
||||||
return
|
continue
|
||||||
}
|
}
|
||||||
log.Trace().
|
log.Trace().
|
||||||
Str("func", "notifyChangesToPeers").
|
Str("func", "notifyChangesToPeers").
|
||||||
@ -380,11 +380,12 @@ func (h *Headscale) sendRequestOnUpdateChannel(m *tailcfg.Node) error {
|
|||||||
Msgf("Notified machine %s", m.Name)
|
Msgf("Notified machine %s", m.Name)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
err := errors.New("machine does not have an open update channel")
|
||||||
log.Info().
|
log.Info().
|
||||||
Str("func", "requestUpdate").
|
Str("func", "requestUpdate").
|
||||||
Str("machine", m.Name).
|
Str("machine", m.Name).
|
||||||
Msgf("Machine %s does not appear to be polling", m.Name)
|
Msgf("Machine %s does not have an open update channel", m.Name)
|
||||||
return errors.New("machine does not seem to be polling")
|
return err
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user