Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Malformed Info log String in authmanager.go #3110

Open
scranshoff opened this issue Nov 18, 2024 · 1 comment
Open

Malformed Info log String in authmanager.go #3110

scranshoff opened this issue Nov 18, 2024 · 1 comment
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.

Comments

@scranshoff
Copy link
Contributor

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:

  • Do not assign "Host.Config.Storage" Permissions to the user specified in the vsphere-csi-config-secret secret
  • Attempt to create a PVC with RWX capabilities
  • Check the logs of the controller for the above info log

Anything else we need to know?:

Environment:

  • csi-vsphere version: 3.3.0
  • vsphere-cloud-controller-manager version: ANY
  • Kubernetes version: ANY
  • vSphere version: ANY
@k8s-ci-robot k8s-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Nov 18, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

3 participants