troubleshoot icon indicating copy to clipboard operation
troubleshoot copied to clipboard

Support bundle redaction fails on Windows

Open manderson23 opened this issue 1 year ago • 0 comments

Bug Description

Running the support-bundle executable on Windows with redaction (either when collecting the bundle or running against an existing bundle) fails will an error saying a file is in use.

Expected Behavior

support-bundle with redaction should succeed with no errors on Windows.

Steps To Reproduce

Run support-bundle.exe ./support-bundle.yaml gives error

Error: failed to run collect and analyze process: failed to run collectors: failed to redact in cluster collector results: failed to create redacted result: failed to rename tmp file: rename C:\Users\212534~1\AppData\Local\Temp\replace-22978352 C:\Users\212534~1\AppData\Local\Temp\supportbundle458253607\support-bundle-2024-09-04T10_29_56\cluster-resources\jobs\simulation-worker.json: The process cannot access the file because it is being used by another process.

Run support-bundle.exe redact redactor.yaml --bundle support-bundle-2024-09-04T09_12_48.tar.gz gives error

Error: failed to redact support bundle: failed to create redacted result: failed to rename tmp file: rename C:\Users\212534~1\AppData\Local\Temp\replace-603473377 C:\Users\212534~1\AppData\Local\Temp\troubleshoot-k8s1501536515\support-bundle-2024-09-04T09_12_48\cluster-resources\limitranges\default.json: The process cannot access the file because it is being used by another process.

Additional Context

Windows 10 - same error in git bash, command or powershell

manderson23 avatar Sep 04 '24 15:09 manderson23