ipn,tka: improve Tailnet Lock logs

* Refer to "tailnet-lock" instead of "network-lock" in log messages
* Log keys as `tlpub:<hex>` rather than as Go structs

Updates tailscale/corp#39455
Updates tailscale/corp#37904

Change-Id: I644407d1eda029ee11027bcc949897aa4ba52787
Signed-off-by: Alex Chan <alexc@tailscale.com>
This commit is contained in:
Alex Chan
2026-04-01 12:27:51 +01:00
committed by Alex Chan
parent 1e2fdfd745
commit 88e7330ff1
3 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -67,11 +67,11 @@ func (b *UpdateBuilder) AddKey(key Key) error {
}
if _, err := b.state.GetKey(keyID); err == nil {
return fmt.Errorf("cannot add key %v: already exists", key)
return fmt.Errorf("cannot add key tlpub:%x: already exists", key.Public)
}
if len(b.state.Keys) >= maxKeys {
return fmt.Errorf("cannot add key %v: maximum number of keys reached", key)
return fmt.Errorf("cannot add key tlpub:%x: maximum number of keys reached", key.Public)
}
return b.mkUpdate(AUM{MessageKind: AUMAddKey, Key: &key})