mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 07:20:13 +00:00
Log get PVC/PV errors in MaxPD predicate only at high verbosity
This commit is contained in:
parent
4fd040afc7
commit
9fbb705e64
@ -33,7 +33,6 @@ go_library(
|
||||
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/labels:go_default_library",
|
||||
"//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
|
||||
"//vendor/k8s.io/apiserver/pkg/util/feature:go_default_library",
|
||||
"//vendor/k8s.io/client-go/util/workqueue:go_default_library",
|
||||
"//vendor/k8s.io/metrics/pkg/client/clientset_generated/clientset:go_default_library",
|
||||
|
@ -28,7 +28,6 @@ import (
|
||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/apimachinery/pkg/labels"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
utilfeature "k8s.io/apiserver/pkg/util/feature"
|
||||
"k8s.io/client-go/util/workqueue"
|
||||
v1helper "k8s.io/kubernetes/pkg/api/v1/helper"
|
||||
@ -237,7 +236,7 @@ func (c *MaxPDVolumeCountChecker) filterVolumes(volumes []v1.Volume, namespace s
|
||||
if err != nil {
|
||||
// if the PVC is not found, log the error and count the PV towards the PV limit
|
||||
// generate a random volume ID since its required for de-dup
|
||||
utilruntime.HandleError(fmt.Errorf("Unable to look up PVC info for %s/%s, assuming PVC matches predicate when counting limits: %v", namespace, pvcName, err))
|
||||
glog.V(4).Infof("Unable to look up PVC info for %s/%s, assuming PVC matches predicate when counting limits: %v", namespace, pvcName, err)
|
||||
source := rand.NewSource(time.Now().UnixNano())
|
||||
generatedID := "missingPVC" + strconv.Itoa(rand.New(source).Intn(1000000))
|
||||
filteredVolumes[generatedID] = true
|
||||
@ -258,7 +257,7 @@ func (c *MaxPDVolumeCountChecker) filterVolumes(volumes []v1.Volume, namespace s
|
||||
// if the PV is not found, log the error
|
||||
// and count the PV towards the PV limit
|
||||
// generate a random volume ID since it is required for de-dup
|
||||
utilruntime.HandleError(fmt.Errorf("Unable to look up PV info for %s/%s/%s, assuming PV matches predicate when counting limits: %v", namespace, pvcName, pvName, err))
|
||||
glog.V(4).Infof("Unable to look up PV info for %s/%s/%s, assuming PV matches predicate when counting limits: %v", namespace, pvcName, pvName, err)
|
||||
source := rand.NewSource(time.Now().UnixNano())
|
||||
generatedID := "missingPV" + strconv.Itoa(rand.New(source).Intn(1000000))
|
||||
filteredVolumes[generatedID] = true
|
||||
|
Loading…
Reference in New Issue
Block a user