Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

listInterfaces() will fail to report errors from convertToInterfaces() #3032

Closed
dgibson opened this issue Oct 29, 2020 · 0 comments
Closed
Assignees
Labels
bug Incorrect behaviour needs-forward-port Changes need to be applied to a newer branch / repository needs-review Needs to be assessed by the team.

Comments

@dgibson
Copy link
Contributor

dgibson commented Oct 29, 2020

Description of problem

Problem pointed out by @amshinde at #3003 (review)

In #3003 we allowed convertToInterfaces() to fail, but a bug in the implementation means that listInterfaces() doesn't properly propagate an error here to the caller.

Expected result

Errors reported by convertToInterfaces() are reported to the caller of listInterfaces().

Actual result

Errors reported by convertToInterfaces() will be lost and listInterfaces() will report an empty list and no error.

Further information

When looking at this, I noticed there's also a pre-existing bug where if the upcast to *grpc.Interfaces fails we'll also report no error. There are several other bugs with the same pattern in kata_agent.go. I'll try to address those too.

@dgibson dgibson added bug Incorrect behaviour needs-review Needs to be assessed by the team. labels Oct 29, 2020
@dgibson dgibson self-assigned this Oct 29, 2020
@dgibson dgibson added the needs-forward-port Changes need to be applied to a newer branch / repository label Oct 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Incorrect behaviour needs-forward-port Changes need to be applied to a newer branch / repository needs-review Needs to be assessed by the team.
Projects
None yet
Development

No branches or pull requests

1 participant