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

Make it easier for the end user to debug issues with their sriov config #357

Merged
merged 2 commits into from
Jun 30, 2021

Conversation

johnoloughlin
Copy link
Contributor

With this patch the config is logged before the error is returned.
When the user looks through the logs they will be able to see their config,
along with a message asking them to check if config is in json format.

Signed-off-by: John O'Loughlin john.oloughlin@intel.com

With this patch the config is logged before the error is returned.
When the user looks through the logs they will be able to see their config,
along with a message asking them to check if config is in json format.

Signed-off-by: John O'Loughlin <john.oloughlin@intel.com>
@johnoloughlin johnoloughlin changed the title make it easier for the end user to debug issues with their sriov config Make it easier for the end user to debug issues with their sriov config Jun 21, 2021
if err = json.Unmarshal(rawBytes, resources); err != nil {
return fmt.Errorf("error unmarshalling raw bytes %v", err)
return fmt.Errorf("error unmarshalling raw bytes %v\n please make sure the config is in json format \n", err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: mind dropping the \n ?
i.e

fmt.Errorf("error unmarshalling raw bytes %v. please make sure the config is in json format", err)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@zshi-redhat zshi-redhat merged commit a7c4b75 into k8snetworkplumbingwg:master Jun 30, 2021
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.

3 participants