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

feat: allow users to check cpu flags #1631

Merged

Conversation

ricardomaraschini
Copy link
Contributor

Description, Motivation and Context

allow users to check if specific cpu flags are supported by the host.

apiVersion: troubleshoot.sh/v1beta2
kind: HostPreflight
metadata:
  name: ec-cluster-preflight
spec:
  collectors:
  - cpu: {}
  analyzers:
  - cpu:
      checkName: CPU
      outcomes:
        - pass:
            when: hasFlags cmov,cx8,fpu,fxsr,mmx
            message: CPU supports all required flags
        - fail:
            message: CPU not supported

Checklist

  • New and existing tests pass locally with introduced changes.
  • Tests for the changes have been added (for bug fixes / features)
  • The commit message(s) are informative and highlight any breaking changes
  • Any documentation required has been added/updated. For changes to https://troubleshoot.sh/ create a PR here

Does this PR introduce a breaking change?

  • Yes
  • No

@ricardomaraschini ricardomaraschini added the type::feature New feature or request label Sep 30, 2024
@ricardomaraschini ricardomaraschini requested a review from a team as a code owner September 30, 2024 11:01
@CLAassistant
Copy link

CLAassistant commented Sep 30, 2024

CLA assistant check
All committers have signed the CLA.

allow users to check if specific cpu flags are supported by the host.

```yaml
apiVersion: troubleshoot.sh/v1beta2
kind: HostPreflight
metadata:
  name: ec-cluster-preflight
spec:
  collectors:
  - cpu: {}
  analyzers:
  - cpu:
      checkName: CPU
      outcomes:
        - pass:
            when: hasFlags cmov,cx8,fpu,fxsr,mmx
            message: CPU supports all required flags
        - fail:
            message: CPU not supported
```
@ricardomaraschini ricardomaraschini force-pushed the ricardomaraschini/sc-109040/allow-check-cpu-flags branch from 308f3d4 to 0473f8d Compare September 30, 2024 11:24
@ricardomaraschini ricardomaraschini merged commit 2efbc20 into main Oct 1, 2024
27 checks passed
@ricardomaraschini ricardomaraschini deleted the ricardomaraschini/sc-109040/allow-check-cpu-flags branch October 1, 2024 08:48
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

Successfully merging this pull request may close these issues.

4 participants