Skip to content

ECOPROJECT-4271 | fix: hint at vCenter permissions when schema validation detects missing data - #394

Open
Jos-Jerus wants to merge 2 commits into
mainfrom
fix-schema-validation-permissions-hint
Open

ECOPROJECT-4271 | fix: hint at vCenter permissions when schema validation detects missing data#394
Jos-Jerus wants to merge 2 commits into
mainfrom
fix-schema-validation-permissions-hint

Conversation

@Jos-Jerus

Copy link
Copy Markdown
Collaborator

Summary

  • When schema validation fires MISSING_CLUSTER or NO_VMS after collection, append a hint suggesting the user verify vCenter read-only access to clusters and hosts
  • The existing privilege check (System.Read/System.View) passes for under-privileged users because VMware silently returns partial inventory without an RBAC error — this is a known VMware behavior
  • This catch-and-wrap approach gives users actionable guidance regardless of which specific permission is missing

What changed

Both v1 and v2 collector_work.go: when result.HasErrors() includes MISSING_CLUSTER or NO_VMS, the error message now includes:

"this may indicate insufficient vCenter permissions; VMware can return incomplete inventory without an explicit permission error; verify your vCenter user has read-only access to all clusters and hosts"

Context

QA tested with the privilege-check fix (PRs #339/#341) and the issue persists — the user has System.Read/System.View but VMware still returns empty cluster data. This matches Igor's earlier findings in the Slack thread and the MTV precedent.

Test plan

  • Connect with a user lacking cluster-level read access → error message now includes permissions hint
  • Connect with a fully privileged user → no change in behavior

🤖 Generated with Claude Code

…tion detects missing data

System.Read/System.View privilege checks pass but VMware still returns
incomplete inventory for under-privileged users (known VMware behavior).
When MISSING_CLUSTER or NO_VMS fires after collection, append a hint
suggesting the user verify read-only access to clusters and hosts.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Signed-off-by: yjacobi <yjacobi@redhat.com>
@Jos-Jerus
Jos-Jerus requested a review from a team as a code owner August 23, 2026 11:45
@Jos-Jerus
Jos-Jerus requested review from ronenav and tupyy and removed request for a team August 23, 2026 11:45
@coderabbitai

coderabbitai Bot commented Aug 23, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b763f7c-e24d-4a7e-bd56-8c9676437332


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…tion warnings detect missing infrastructure data

Empty networks/hosts/datastores warnings now log with "(may indicate
insufficient permissions)" suffix. VMware returns partial inventory
without RBAC errors — same root cause as ECOPROJECT-4271.

Co-Authored-By: Claude Code <noreply@anthropic.com>
Signed-off-by: yjacobi <yjacobi@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant