• Kubernetes Submit Queue's avatar
    Merge pull request #57702 from mlmhl/volume_resize_event · 6dfc4b38
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 57702, 57128). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    format error message and remove duplicated event for resize volume failure
    
    **What this PR does / why we need it**:
    
    1. The `operationGenerator.resizeFileSystem` method returns errors generated by `volumeToMount.GenerateErrorDetailed`, and the outside code(`operationGenerator.GenerateMountVolumeFunc`) uses `volumeToMount.GenerateError` to generate a new error again, which lead to the event message redundant and confused, we should use `volumeToMount.GenerateError` inside `operationGenerator.resizeFileSystem` only, in outside code is not necessary.
    
    2. The `eventRecorderFunc` will record an event if `resizeFileSystem` returns an error, so we needn't to record event inside `resizeFileSystem` itself.
    
    **Release note**:
    
    ```release-note
    NONE
    ```
    
    /sig storage
    /kind enhancement
    6dfc4b38
Name
Last commit
Last update
..
nestedpendingoperations Loading commit data...
operationexecutor Loading commit data...
types Loading commit data...
volumehelper Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
atomic_writer.go Loading commit data...
atomic_writer_test.go Loading commit data...
device_util.go Loading commit data...
device_util_linux.go Loading commit data...
device_util_linux_test.go Loading commit data...
device_util_unsupported.go Loading commit data...
doc.go Loading commit data...
error.go Loading commit data...
finalizer.go Loading commit data...
fs.go Loading commit data...
fs_unsupported.go Loading commit data...
io_util.go Loading commit data...
metrics.go Loading commit data...
util.go Loading commit data...
util_linux.go Loading commit data...
util_test.go Loading commit data...
util_unsupported.go Loading commit data...