-
Notifications
You must be signed in to change notification settings - Fork 296
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
Add doc in vsphere error message & improve verbose logging output #9400
base: main
Are you sure you want to change the base?
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9400 +/- ##
=======================================
Coverage 69.46% 69.46%
=======================================
Files 672 672
Lines 49360 49361 +1
=======================================
+ Hits 34286 34287 +1
Misses 13288 13288
Partials 1786 1786 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
27d19f3
to
71d5c4c
Compare
Previous log message example❌ Validation failed {"validation": "vsphere Provider setup is valid", "error": "validating vsphere user privileges: user [email protected] missing vSphere permissions", "remediation": ""} New log message example❌ Validation failed {"validation": "vsphere Provider setup is valid", "error": "validating vsphere user privileges: user [email protected] missing vSphere permissions | See required permissions at: https://anywhere.eks.amazonaws.com/docs/getting-started/vsphere/vsphere-preparation/ | Use -v 3 for full missing permissions", "remediation": ""} Verbose logging change examplePrevious New |
bf3d222
to
3f3499c
Compare
/retest |
pkg/providers/vsphere/vsphere.go
Outdated
@@ -376,7 +381,7 @@ func (p *vsphereProvider) SetupAndValidateCreateCluster(ctx context.Context, clu | |||
|
|||
if !p.skippedValidations[validations.VSphereUserPriv] { | |||
if err := p.validator.validateVsphereUserPrivs(ctx, vSphereClusterSpec); err != nil { | |||
return fmt.Errorf("validating vsphere user privileges: %v", err) | |||
return fmt.Errorf("validating vsphere user privileges: %v | See required permissions at: %s | Use -v 3 for full missing permissions", err, vSpherePermissionDoc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return fmt.Errorf("validating vsphere user privileges: %v | See required permissions at: %s | Use -v 3 for full missing permissions", err, vSpherePermissionDoc) | |
return fmt.Errorf("validating vsphere user privileges: %w, please refer to %s for required permissions or use -v 3 for full missing permissions", err, vSpherePermissionDoc) |
/override |
@2ez4szliu: /override requires failed status contexts to operate on, but none was given In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Issue #, if available:
3055
Description of changes:
Testing (if applicable):
modified existing test in vsphere_test.go
Documentation added/planned (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.