Closed libzhang closed 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
f45d675
) 72.76% compared to head (6302fdb
) 72.79%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Purpose
Resolves #
This is to resolve that an issue that GetVolumePath always return a nil when met error in getting partition stage. we should return error if any error met in getting partition stage.
In RPC NodeStageVolume request, below code should return an err if GetVolumePath failed, this will then cause NodeStageVolume failure. then Kubelet should retry this rpc again and again. This give the chance that driveCR updated success.
Changes: this change fix an issue that a global err is defined, but we have another local err variable defined in a {} scope, so finally the global err always is nil.
Here we remove the retry for loop and always use the global err variable, as currently in search partition command, we already have a retry. so the retry here is not needed any more.
PR checklist
Testing
Provide test details