From 57ea19599e6e05a79d79be77f9da90f7bc6a8f88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Osipiuk?= Date: Wed, 13 Jun 2018 19:58:23 +0200 Subject: [PATCH] Explicitly return AutoscalerError from GetNodeTargetGpus --- cluster-autoscaler/utils/gpu/gpu.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cluster-autoscaler/utils/gpu/gpu.go b/cluster-autoscaler/utils/gpu/gpu.go index 76e8b28be1..77b547b30c 100644 --- a/cluster-autoscaler/utils/gpu/gpu.go +++ b/cluster-autoscaler/utils/gpu/gpu.go @@ -161,7 +161,7 @@ func GetGpuRequests(pods []*apiv1.Pod) map[string]GpuRequestInfo { // GetNodeTargetGpus returns the number of gpus on a given node. This includes gpus which are not yet // ready to use and visible in kubernetes. -func GetNodeTargetGpus(node *apiv1.Node, nodeGroup cloudprovider.NodeGroup) (gpuType string, gpuCount int64, err error) { +func GetNodeTargetGpus(node *apiv1.Node, nodeGroup cloudprovider.NodeGroup) (gpuType string, gpuCount int64, error errors.AutoscalerError) { gpuLabel, found := node.Labels[GPULabel] if !found { return "", 0, nil