Malformed Info log String in authmanager.go #3110
Labels
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/stale
Denotes an issue or PR has remained open with no activity and has become stale.
Is this a BUG REPORT or FEATURE REQUEST?:
/kind bug
What happened:
Malformed Info log string in authmanager.go occurs because of bad string concatenation.
Example output:
{"level":"info","time":"2024-11-14T17:22:56.632405175Z","caller":"common/authmanager.go:472","msg":"auth manager: user vcenter.example.local on vCenter [{{} "ClusterComputeResource:domain-c8" [{{} "Host.Config.Storage" %!q(bool=false)}]}] doesn't have privileges for any ClusterComputeResource. HasUserPrivilegeOnEntities returns [Host.Config.Storage], when checking privileges [ClusterComputeResource:domain-c13] on entities %!v(MISSING)[email protected]","TraceId":"50a0d607-5fd0-460c-a2fc-0729cbdfa6aa"}
What you expected to happen:
Variables to be correctly placed in the Info log string
Example output:
{"level":"info","time":"2024-11-14T17:22:56.632405175Z","caller":"common/authmanager.go:472","msg":"auth manager: user [email protected] on vCenter vcenter.example.local doesn't have privileges for any ClusterComputeResource. HasUserPrivilegeOnEntities returns [{{} "ClusterComputeResource:domain-c13" [{{} "Host.Config.Storage" %!q(bool=false)}]}] , when checking privileges [Host.Config.Storage] on entities [ClusterComputeResource:domain-c13].","TraceId":"50a0d607-5fd0-460c-a2fc-0729cbdfa6aa"}
How to reproduce it (as minimally and precisely as possible):
To reproduce:
Anything else we need to know?:
Environment:
The text was updated successfully, but these errors were encountered: