-
Bug
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
1
-
False
-
-
False
-
-
Bug Fix
-
-
-
Builds Sprint #33, Builds Sprint #35
-
2
Description of problem:
There is a bug in the error handling in the code of csi-driver that is fetching the secret/configmap. The bug is in the GetSecret and GetConfigMap functions(in pkg/client/listers.go). Both correctly log the "forbidden" error from the API server, but then it hides the error and returns 'nil'. This causes the driver to mount an empty volume instead of failing the mount.
Workaround
Prerequisites (if any, like setup, operators/versions):
Steps to Reproduce
# <steps>
Actual results:
GetSecret and GetConfigMap functions(in pkg/client/listers.go) are correctly logging the "forbidden" error from the API server, but then it hides the error and returns 'nil'. This causes the driver to mount an empty volume instead of failing the mount. This allows CSI driver to have access to the secret/configmap where the name-spaced RoleBinding is not created yet.
Expected results:
Instead of just logging the error and returning `nil`, both of these functions should pass the error up to the function(s) that called it. mapBackingResourceToPod function from pkg/csidriver/driver.go would then correctly tell the kubelet to fail the mount.
Reproducibility (Always/Intermittent/Only Once):
Acceptance criteria:
Definition of Done:
Build Details:
Additional info (Such as Logs, Screenshots, etc):