mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 23:07:44 +00:00
ipn/localapi: print node IDs, pubkeys, and expiry on bugreport
Having this information near the "user bugreport" line makes it easier to identify the node and expiry without spelunking through the rest of the logs. Signed-off-by: Andrew Dunham <andrew@du.nham.ca> Change-Id: I1597c783efc06574fa4c8f211e68d835f20b6ccb
This commit is contained in:
parent
0aa7b495d5
commit
d2301db49c
@ -314,6 +314,14 @@ func (h *Handler) serveBugReport(w http.ResponseWriter, r *http.Request) {
|
||||
} else {
|
||||
h.logf("user bugreport health: ok")
|
||||
}
|
||||
if nm := h.b.NetMap(); nm != nil {
|
||||
if self := nm.SelfNode; self != nil {
|
||||
h.logf("user bugreport node info: nodeid=%q stableid=%q expiry=%q", self.ID, self.StableID, self.KeyExpiry.Format(time.RFC3339))
|
||||
}
|
||||
h.logf("user bugreport public keys: machine=%q node=%q", nm.MachineKey, nm.NodeKey)
|
||||
} else {
|
||||
h.logf("user bugreport netmap: no active netmap")
|
||||
}
|
||||
if defBool(r.URL.Query().Get("diagnose"), false) {
|
||||
h.b.Doctor(r.Context(), logger.WithPrefix(h.logf, "diag: "))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user