From 9aec38164d93eb4eac17892433ca27d10f5a38dd Mon Sep 17 00:00:00 2001 From: Henrik Schmidt Date: Sun, 28 Jul 2019 09:47:31 +0200 Subject: [PATCH] Return actual error when fetching the bandwidth info from annotation fails Signed-off-by: mrIncompetent --- pkg/server/sandbox_run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/server/sandbox_run.go b/pkg/server/sandbox_run.go index 0b0a19ad1116..dddf5c81ef5e 100644 --- a/pkg/server/sandbox_run.go +++ b/pkg/server/sandbox_run.go @@ -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,