commiting uncommited changes on 2024-08-14 12:46:00 -0400

This commit is contained in:
Hemant Kumar 2024-08-14 12:46:00 -04:00
parent 99fc7cc7b1
commit 97eddc8f65
4 changed files with 4 additions and 4 deletions

View File

@ -960,7 +960,7 @@ func (asw *actualStateOfWorld) volumeNeedsExpansion(volumeObj attachedVolume, de
return currentSize, false
}
klog.V(5).Infof("NodeExpandVolume checking size, actual size %s, desired size %s, for volume %s", volumeObj.persistentVolumeSize.String(), desiredVolumeSize.String(), volumeObj.volumeName)
klog.V(5).InfoS("NodeExpandVolume checking size", "actualSize", volumeObj.persistentVolumeSize.String(), "desiredSize", desiredVolumeSize.String(), "volume", volumeObj.volumeName)
if desiredVolumeSize.Cmp(*volumeObj.persistentVolumeSize) > 0 {
volumePlugin, err := asw.volumePluginMgr.FindNodeExpandablePluginBySpec(volumeObj.spec)

View File

@ -384,7 +384,7 @@ func (dswp *desiredStateOfWorldPopulator) checkVolumeFSResize(
pvCap := volumeSpec.PersistentVolume.Spec.Capacity.Storage()
pvcStatusCap := pvc.Status.Capacity.Storage()
dswp.desiredStateOfWorld.UpdatePersistentVolumeSize(uniqueVolumeName, pvCap)
klog.V(5).Infof("NodeExpandVolume updating size, actual size %s, desired size %s, for volume %s", pvcStatusCap.String(), pvCap.String(), uniqueVolumeName)
klog.V(5).InfoS("NodeExpandVolume updating size", "actualSize", pvcStatusCap.String(), "desiredSize", pvCap.String(), "volumeName", uniqueVolumeName)
// in case the actualStateOfWorld was rebuild after kubelet restart ensure that claimSize is set to accurate value
dswp.actualStateOfWorld.InitializeClaimSize(klog.TODO(), uniqueVolumeName, pvcStatusCap)
}

View File

@ -175,7 +175,7 @@ func (ne *NodeExpander) expandOnPlugin() (bool, resource.Quantity, error, testRe
// File system resize succeeded, now update the PVC's Capacity to match the PV's
ne.pvc, err = util.MarkFSResizeFinished(ne.pvc, ne.pluginResizeOpts.NewSize, ne.kubeClient)
if err != nil {
return true, ne.pluginResizeOpts.NewSize, fmt.Errorf("mountVolume.NodeExpandVolume update pvc status failed: %v", err), testResponseData{true, true}
return true, ne.pluginResizeOpts.NewSize, fmt.Errorf("mountVolume.NodeExpandVolume update pvc status failed: %w", err), testResponseData{true, true}
}
return true, ne.pluginResizeOpts.NewSize, nil, testResponseData{true, true}
}

View File

@ -2056,7 +2056,7 @@ func (og *operationGenerator) nodeExpandVolume(
currentSize := pvc.Status.Capacity.Storage()
if err != nil {
// Return error rather than leave the file system un-resized, caller will log and retry
return false, *currentSize, fmt.Errorf("mountVolume.NodeExpandVolume get PVC failed : %v", err)
return false, *currentSize, fmt.Errorf("mountVolume.NodeExpandVolume get PVC failed : %w", err)
}
if volumeToMount.VolumeSpec.ReadOnly {