Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog - klog as explicit InitFlags() so we add them as necessary - we update the other repositories that we vendor that made a similar change from glog to klog * github.com/kubernetes/repo-infra * k8s.io/gengo/ * k8s.io/kube-openapi/ * github.com/google/cadvisor - Entirely remove all references to glog - Fix some tests by explicit InitFlags in their init() methods Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
This commit is contained in:
@@ -24,7 +24,7 @@ import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/golang/glog"
|
||||
"k8s.io/klog"
|
||||
|
||||
"k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/types"
|
||||
@@ -627,14 +627,14 @@ func (oe *operationExecutor) VerifyVolumesAreAttached(
|
||||
for node, nodeAttachedVolumes := range attachedVolumes {
|
||||
for _, volumeAttached := range nodeAttachedVolumes {
|
||||
if volumeAttached.VolumeSpec == nil {
|
||||
glog.Errorf("VerifyVolumesAreAttached: nil spec for volume %s", volumeAttached.VolumeName)
|
||||
klog.Errorf("VerifyVolumesAreAttached: nil spec for volume %s", volumeAttached.VolumeName)
|
||||
continue
|
||||
}
|
||||
volumePlugin, err :=
|
||||
oe.operationGenerator.GetVolumePluginMgr().FindPluginBySpec(volumeAttached.VolumeSpec)
|
||||
|
||||
if err != nil || volumePlugin == nil {
|
||||
glog.Errorf(
|
||||
klog.Errorf(
|
||||
"VolumesAreAttached.FindPluginBySpec failed for volume %q (spec.Name: %q) on node %q with error: %v",
|
||||
volumeAttached.VolumeName,
|
||||
volumeAttached.VolumeSpec.Name(),
|
||||
@@ -673,7 +673,7 @@ func (oe *operationExecutor) VerifyVolumesAreAttached(
|
||||
// If node doesn't support Bulk volume polling it is best to poll individually
|
||||
nodeError := oe.VerifyVolumesAreAttachedPerNode(nodeAttachedVolumes, node, actualStateOfWorld)
|
||||
if nodeError != nil {
|
||||
glog.Errorf("BulkVerifyVolumes.VerifyVolumesAreAttached verifying volumes on node %q with %v", node, nodeError)
|
||||
klog.Errorf("BulkVerifyVolumes.VerifyVolumesAreAttached verifying volumes on node %q with %v", node, nodeError)
|
||||
}
|
||||
break
|
||||
}
|
||||
@@ -686,14 +686,14 @@ func (oe *operationExecutor) VerifyVolumesAreAttached(
|
||||
volumeSpecMapByPlugin[pluginName],
|
||||
actualStateOfWorld)
|
||||
if err != nil {
|
||||
glog.Errorf("BulkVerifyVolumes.GenerateBulkVolumeVerifyFunc error bulk verifying volumes for plugin %q with %v", pluginName, err)
|
||||
klog.Errorf("BulkVerifyVolumes.GenerateBulkVolumeVerifyFunc error bulk verifying volumes for plugin %q with %v", pluginName, err)
|
||||
}
|
||||
|
||||
// Ugly hack to ensure - we don't do parallel bulk polling of same volume plugin
|
||||
uniquePluginName := v1.UniqueVolumeName(pluginName)
|
||||
err = oe.pendingOperations.Run(uniquePluginName, "" /* Pod Name */, generatedOperations)
|
||||
if err != nil {
|
||||
glog.Errorf("BulkVerifyVolumes.Run Error bulk volume verification for plugin %q with %v", pluginName, err)
|
||||
klog.Errorf("BulkVerifyVolumes.Run Error bulk volume verification for plugin %q with %v", pluginName, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -862,7 +862,7 @@ func (oe *operationExecutor) ReconstructVolumeOperation(
|
||||
// Filesystem Volume case
|
||||
if volumeMode == v1.PersistentVolumeFilesystem {
|
||||
// Create volumeSpec from mount path
|
||||
glog.V(5).Infof("Starting operationExecutor.ReconstructVolumepodName")
|
||||
klog.V(5).Infof("Starting operationExecutor.ReconstructVolumepodName")
|
||||
volumeSpec, err := plugin.ConstructVolumeSpec(volumeSpecName, mountPath)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -872,7 +872,7 @@ func (oe *operationExecutor) ReconstructVolumeOperation(
|
||||
|
||||
// Block Volume case
|
||||
// Create volumeSpec from mount path
|
||||
glog.V(5).Infof("Starting operationExecutor.ReconstructVolume")
|
||||
klog.V(5).Infof("Starting operationExecutor.ReconstructVolume")
|
||||
if mapperPlugin == nil {
|
||||
return nil, fmt.Errorf("Could not find block volume plugin %q (spec.Name: %q) pod %q (UID: %q)",
|
||||
pluginName,
|
||||
|
||||
Reference in New Issue
Block a user