Skip to content

Commit 63f2466

Browse files
sjenningk8s-publishing-bot
authored andcommitted
UPSTREAM: 59923: Rework volume manager log levels
Origin-commit: a2ec6c9a67bbcde43b7c36fd3c4b41beef37ca4d
1 parent 265f47a commit 63f2466

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,13 @@ func (dswp *desiredStateOfWorldPopulator) findAndRemoveDeletedPods() {
240240
}
241241

242242
if runningContainers {
243-
glog.V(5).Infof(
243+
glog.V(4).Infof(
244244
"Pod %q has been removed from pod manager. However, it still has one or more containers in the non-exited state. Therefore, it will not be removed from volume manager.",
245245
format.Pod(volumeToMount.Pod))
246246
continue
247247
}
248248

249-
glog.V(5).Infof(volumeToMount.GenerateMsgDetailed("Removing volume from desired state", ""))
249+
glog.V(4).Infof(volumeToMount.GenerateMsgDetailed("Removing volume from desired state", ""))
250250

251251
dswp.desiredStateOfWorld.DeletePodFromVolume(
252252
volumeToMount.PodName, volumeToMount.VolumeName)
@@ -296,7 +296,7 @@ func (dswp *desiredStateOfWorldPopulator) processPodVolumes(pod *v1.Pod) {
296296
allVolumesAdded = false
297297
}
298298

299-
glog.V(10).Infof(
299+
glog.V(4).Infof(
300300
"Added volume %q (volSpec=%q) for pod %q to desired state.",
301301
podVolume.Name,
302302
volumeSpec.Name(),
@@ -350,7 +350,7 @@ func (dswp *desiredStateOfWorldPopulator) createVolumeSpec(
350350
podVolume v1.Volume, podName string, podNamespace string, mountsMap map[string]bool, devicesMap map[string]bool) (*volume.Spec, string, error) {
351351
if pvcSource :=
352352
podVolume.VolumeSource.PersistentVolumeClaim; pvcSource != nil {
353-
glog.V(10).Infof(
353+
glog.V(5).Infof(
354354
"Found PVC, ClaimName: %q/%q",
355355
podNamespace,
356356
pvcSource.ClaimName)
@@ -366,7 +366,7 @@ func (dswp *desiredStateOfWorldPopulator) createVolumeSpec(
366366
err)
367367
}
368368

369-
glog.V(10).Infof(
369+
glog.V(5).Infof(
370370
"Found bound PV for PVC (ClaimName %q/%q pvcUID %v): pvName=%q",
371371
podNamespace,
372372
pvcSource.ClaimName,
@@ -384,7 +384,7 @@ func (dswp *desiredStateOfWorldPopulator) createVolumeSpec(
384384
err)
385385
}
386386

387-
glog.V(10).Infof(
387+
glog.V(5).Infof(
388388
"Extracted volumeSpec (%v) from bound PV (pvName %q) and PVC (ClaimName %q/%q pvcUID %v)",
389389
volumeSpec.Name,
390390
pvName,

pkg/kubelet/volumemanager/reconciler/reconciler.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func (rc *reconciler) reconcile() {
193193
if rc.controllerAttachDetachEnabled || !volumeToMount.PluginIsAttachable {
194194
// Volume is not attached (or doesn't implement attacher), kubelet attach is disabled, wait
195195
// for controller to finish attaching volume.
196-
glog.V(12).Infof(volumeToMount.GenerateMsgDetailed("Starting operationExecutor.VerifyControllerAttachedVolume", ""))
196+
glog.V(5).Infof(volumeToMount.GenerateMsgDetailed("Starting operationExecutor.VerifyControllerAttachedVolume", ""))
197197
err := rc.operationExecutor.VerifyControllerAttachedVolume(
198198
volumeToMount.VolumeToMount,
199199
rc.nodeName,
@@ -216,7 +216,7 @@ func (rc *reconciler) reconcile() {
216216
VolumeSpec: volumeToMount.VolumeSpec,
217217
NodeName: rc.nodeName,
218218
}
219-
glog.V(12).Infof(volumeToAttach.GenerateMsgDetailed("Starting operationExecutor.AttachVolume", ""))
219+
glog.V(5).Infof(volumeToAttach.GenerateMsgDetailed("Starting operationExecutor.AttachVolume", ""))
220220
err := rc.operationExecutor.AttachVolume(volumeToAttach, rc.actualStateOfWorld)
221221
if err != nil &&
222222
!nestedpendingoperations.IsAlreadyExists(err) &&
@@ -289,7 +289,7 @@ func (rc *reconciler) reconcile() {
289289
glog.Infof(attachedVolume.GenerateMsgDetailed("Volume detached", fmt.Sprintf("DevicePath %q", attachedVolume.DevicePath)))
290290
} else {
291291
// Only detach if kubelet detach is enabled
292-
glog.V(12).Infof(attachedVolume.GenerateMsgDetailed("Starting operationExecutor.DetachVolume", ""))
292+
glog.V(5).Infof(attachedVolume.GenerateMsgDetailed("Starting operationExecutor.DetachVolume", ""))
293293
err := rc.operationExecutor.DetachVolume(
294294
attachedVolume.AttachedVolume, false /* verifySafeToDetach */, rc.actualStateOfWorld)
295295
if err != nil &&

pkg/volume/util/operationexecutor/operation_executor.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ type BlockVolumeHandler struct {
917917
// MountVolumeHandler mount/remount a volume when a volume is attached
918918
// This method is handler for filesystem volume
919919
func (f FilesystemVolumeHandler) MountVolumeHandler(waitForAttachTimeout time.Duration, volumeToMount VolumeToMount, actualStateOfWorld ActualStateOfWorldMounterUpdater, isRemount bool, remountingLogStr string) error {
920-
glog.V(12).Infof(volumeToMount.GenerateMsgDetailed("Starting operationExecutor.MountVolume", remountingLogStr))
920+
glog.V(5).Infof(volumeToMount.GenerateMsgDetailed("Starting operationExecutor.MountVolume", remountingLogStr))
921921
err := f.oe.MountVolume(
922922
waitForAttachTimeout,
923923
volumeToMount,
@@ -929,7 +929,7 @@ func (f FilesystemVolumeHandler) MountVolumeHandler(waitForAttachTimeout time.Du
929929
// UnmountVolumeHandler unmount a volume if a volume is mounted
930930
// This method is handler for filesystem volume
931931
func (f FilesystemVolumeHandler) UnmountVolumeHandler(mountedVolume MountedVolume, actualStateOfWorld ActualStateOfWorldMounterUpdater) error {
932-
glog.V(12).Infof(mountedVolume.GenerateMsgDetailed("Starting operationExecutor.UnmountVolume", ""))
932+
glog.V(5).Infof(mountedVolume.GenerateMsgDetailed("Starting operationExecutor.UnmountVolume", ""))
933933
err := f.oe.UnmountVolume(
934934
mountedVolume,
935935
actualStateOfWorld)
@@ -939,7 +939,7 @@ func (f FilesystemVolumeHandler) UnmountVolumeHandler(mountedVolume MountedVolum
939939
// UnmountDeviceHandler unmount and detach a device if a volume isn't referenced
940940
// This method is handler for filesystem volume
941941
func (f FilesystemVolumeHandler) UnmountDeviceHandler(attachedVolume AttachedVolume, actualStateOfWorld ActualStateOfWorldMounterUpdater, mounter mount.Interface) error {
942-
glog.V(12).Infof(attachedVolume.GenerateMsgDetailed("Starting operationExecutor.UnmountDevice", ""))
942+
glog.V(5).Infof(attachedVolume.GenerateMsgDetailed("Starting operationExecutor.UnmountDevice", ""))
943943
err := f.oe.UnmountDevice(
944944
attachedVolume,
945945
actualStateOfWorld,

pkg/volume/util/operationexecutor/operation_generator.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ func (og *operationGenerator) GenerateMountVolumeFunc(
544544
simpleMsg, detailedMsg := volumeToMount.GenerateMsg("MountVolume.SetUp succeeded", "")
545545
verbosity := glog.Level(1)
546546
if isRemount {
547-
verbosity = glog.Level(7)
547+
verbosity = glog.Level(4)
548548
} else {
549549
og.recorder.Eventf(volumeToMount.Pod, v1.EventTypeNormal, kevents.SuccessfulMountVolume, simpleMsg)
550550
}
@@ -582,7 +582,7 @@ func (og *operationGenerator) GenerateMountVolumeFunc(
582582

583583
func (og *operationGenerator) resizeFileSystem(volumeToMount VolumeToMount, devicePath, deviceMountPath, pluginName string) error {
584584
if !utilfeature.DefaultFeatureGate.Enabled(features.ExpandPersistentVolumes) {
585-
glog.V(6).Infof("Resizing is not enabled for this volume %s", volumeToMount.VolumeName)
585+
glog.V(4).Infof("Resizing is not enabled for this volume %s", volumeToMount.VolumeName)
586586
return nil
587587
}
588588

@@ -1061,7 +1061,7 @@ func (og *operationGenerator) GenerateUnmapDeviceFunc(
10611061
}
10621062

10631063
// The block volume is not referenced from Pods. Release file descriptor lock.
1064-
glog.V(5).Infof("UnmapDevice: deviceToDetach.DevicePath: %v", deviceToDetach.DevicePath)
1064+
glog.V(4).Infof("UnmapDevice: deviceToDetach.DevicePath: %v", deviceToDetach.DevicePath)
10651065
loopPath, err := og.blkUtil.GetLoopDevice(deviceToDetach.DevicePath)
10661066
if err != nil {
10671067
glog.Warningf(deviceToDetach.GenerateMsgDetailed("UnmapDevice: Couldn't find loopback device which takes file descriptor lock", fmt.Sprintf("device path: %q", deviceToDetach.DevicePath)))

0 commit comments

Comments
 (0)