Skip to content
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

Create a sysctl host analyzer #1675

Closed
JGAntunes opened this issue Nov 5, 2024 · 1 comment
Closed

Create a sysctl host analyzer #1675

JGAntunes opened this issue Nov 5, 2024 · 1 comment
Labels
type::feature New feature or request

Comments

@JGAntunes
Copy link
Member

Describe the rationale for the suggested feature.

Related to - #1674.

The current sysctl analyzer is in cluster specifc:

  • https://troubleshoot.sh/docs/analyze/sysctl/
  • // The when condition for outcomes in this analyzer is interpreted as "for some node".
    // For example, "when: net.ipv4.ip_forward = 0" is true if at least one node has IP forwarding
    // disabled.
    func (a *AnalyzeSysctl) analyzeSysctl(analyzer *troubleshootv1beta2.SysctlAnalyze, findFiles getChildCollectedFileContents) (*AnalyzeResult, error) {

In our view a sysctl collector for the host, before a cluster is actually running is pretty valuable. Particularly for a lot of the work currently being done in embedded cluster - (e.g. replicatedhq/embedded-cluster#1449 as well as ongoing work for arp filter detection).

Describe the feature

The analyzer spec would basically be the same as the one we have right now for the in cluster one:

(...)
  analyzers:
    - sysctl:
        checkName: IP forwarding enabled
        outcomes:
        - fail:
            when: "net.ipv4.ip_forward = 0"
            message: "IP forwarding is not enabled"

Seems like for the current analyzer we also support greater/lower than comparisons, so it probably makes sense to support that here too:

Describe alternatives you've considered

See - #1674 for a list of the alternatives considered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants