Merge pull request #1212 from mrIncompetent/return-annotations-bandwith-error

Return actual error when fetching the bandwidth info from annotation fails
This commit is contained in:
Mike Brown 2019-07-29 13:39:51 -05:00 committed by GitHub
commit b23e2cf9d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -551,7 +551,7 @@ func (c *criService) setupPod(id string, path string, config *runtime.PodSandbox
// or an unreasonable valure see validateBandwidthIsReasonable()
bandWidth, err := toCNIBandWidth(config.Annotations)
if err != nil {
return "", nil, errors.Errorf("failed to find network info for sandbox %q", id)
return "", nil, errors.Wrap(err, "failed to get bandwidth info from annotations")
}
result, err := c.netPlugin.Setup(id,