[mce-2.6] Remove existing Secret files in (deprovision) Pod#2426
Conversation
For Pods with `restartPolicy: OnFailure`, a failed container may be rerun in the same Pod, which will reuse the same file system as the initial run. When we project Secrets (for credentials, certs, etc) to directories in such containers, those writes can fail the second time around because the file already exists. Fix by removing the file, if it exists, before we write it. Note that at the time of this commit, this only affects deprovision pods: - imageset pods don't use ProjectToDir - provision pods have `restartPolicy: Never` HIVE-2604
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: 2uasimojo, openshift-cherrypick-robot The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@openshift-cherrypick-robot: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## mce-2.6 #2426 +/- ##
===========================================
- Coverage 58.60% 58.60% -0.01%
===========================================
Files 181 181
Lines 25822 25824 +2
===========================================
Hits 15134 15134
- Misses 9415 9417 +2
Partials 1273 1273
|
|
@openshift-cherrypick-robot: new pull request created: #2427 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
This is an automated cherry-pick of #2425
/assign 2uasimojo
/cherrypick mce-2.5 mce-2.4 mce-2.3
HIVE-2604