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:
+2
-2
@@ -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})
|
||||
|
||||
Reference in New Issue
Block a user