troubleshoot
troubleshoot copied to clipboard
In a large cluster, support bundle can fail with too many open files error
Bug Description
When running redactors, all redactions are batched together, which causes too many files to be open at the same time
* failed to run collector "cluster-resources": failed to redact: failed to create redacted result: failed to create temp file: open /var/folders/g2/05ngff7d71gds3_kl24gs0f80000gn/T/replace-465965942: too many open files
Expected Behavior
Support bundle should be collected successfully.
Steps To Reproduce
cat << EOF > spec.yaml
apiVersion: troubleshoot.sh/v1beta2
kind: SupportBundle
metadata:
name: sample
spec:
collectors:
- clusterResources: {}
EOF
kubectl support-bundle spec.yaml
Additional Context
Include the following information.
- Troubleshoot version: built from source at revision 9666679, go version 1.16.6
- Operating system: Mac OS
- Operating system version: Catalina
- Other details that might be helpful in diagnosing the problem: this happened on a cluster with over 300 pods, 1300 jobs, and thousands of other objects, including custom resources.