-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set a bundle path when using preflight #1308
Comments
Considerations: does this introduce any minimum disk space requirements for preflight usage? If results are being stored? |
The preflight and support-bundle are using different way of processing collectResults. In preflight, we are using troubleshoot/pkg/preflight/run.go Line 96 in 6972789
You can see our collector pass the data directly to In the It is using And in That can confirm that To explain of sharing troubleshoot/pkg/preflight/collect.go Line 143 in 6972789
The decoupled from troubleshoot/pkg/preflight/collect.go Line 51 in 6972789
since they have Analyze() and IsRBACAllowed() method
|
However, in our support-bundle we are using And in
|
I think we may need to use the same way as preflight of reading from memory, since we return collectedData as troubleshoot/pkg/collect/host_run.go Lines 73 to 78 in 6972789
|
I'm not saying we shouldn't add a bundlePath for Preflight for whatever reason, but have we confirmed that the above is true? Are there analyzers which can't be used in
|
I looked at the spec in question (below) apiVersion: troubleshoot.sh/v1beta2
kind: HostPreflight
spec:
collectors:
- run:
name: iptables
collectorName: iptables-forward-chain
command: iptables
args:
- '-L'
- FORWARD
analyzers:
- textAnalyze:
checkName: forward-chain-reject-check
fileName: iptables/iptables-forward-chain.log
regex: ^REJECT\s+all\s+.*\s+anywhere\s+anywhere
outcomes:
- pass:
message: No default REJECT rule found in iptables FORWARD chain
when: "false"
- fail:
message: |
Default REJECT rule found in iptables FORWARD chain.
Please remove it and re-run the installer.
when: "true" and noticed that the path specified in the analyser is wrong. It ought to be Recommended doc update
|
As a debugging tip, run the
|
Docs update PR: replicatedhq/troubleshoot.sh#521 |
Describe the rationale for the suggested feature.
We should configure a bundle path for preflight usage, even if we don't store the final outcomes. This would allow using a lot of collector/analyzer combinations that expect a result written using
SaveResult
and then read in via the analyzer.eg. using the
run
collector with thetextAnalyze
analyzer in preflights.Describe the feature
What we do now in preflight - https://github.com/replicatedhq/troubleshoot/blob/main/pkg/preflight/collect.go#L108 (empty
""
for bundle path)What we do in support bundle - https://github.com/replicatedhq/troubleshoot/blob/main/pkg/supportbundle/collect.go#L34
Make this behaviour consistent across both.
Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: