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: add CPU micro architecture support #1628

Conversation

ricardomaraschini
Copy link
Member

@ricardomaraschini ricardomaraschini commented Sep 27, 2024

Description, Motivation and Context

allows troubleshoot to collect and analyze CPU x86-64 micro architecture. this is an usage example:

apiVersion: troubleshoot.sh/v1beta2
kind: HostPreflight
metadata:
  name: ec-cluster-preflight
spec:
  collectors:
  - cpu: {}
  analyzers:
  - cpu:
      checkName: CPU
      outcomes:
        - pass:
            when: 'supports x86-64-v2'
            message: CPU supports x86-64-v2
        - fail:
            message: CPU does not support x86-64-v2

this pr adds micro architecture analysis for the following cpus:

x86-64
x86-64-v2
x86-64-v3
x86-64-v4

for the analysis the reserved word supports has been chosen so the following rules are valid:

supports x86-64 (analyse only the basic set of features for x86-64)
supports x86-64-v2 (basic set of features for x86-64 + v2 features)
supports x86-64-v3 (basic set of features for x86-64 + v3 features)
supports x86-64-v4 (basic set of features for x86-64 + v4 features)

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 27, 2024
@ricardomaraschini ricardomaraschini requested a review from a team as a code owner September 27, 2024 11:38
allows troubleshoot to collect and analyze CPU micro architecture. this
is an usage example:

```yaml
apiVersion: troubleshoot.sh/v1beta2
kind: HostPreflight
metadata:
  name: ec-cluster-preflight
spec:
  collectors:
  - cpu: {}
  analyzers:
  - cpu:
      checkName: CPU
      outcomes:
        - pass:
            when: 'supports x86-64-v2'
            message: CPU supports x86-64-v2
        - fail:
            message: CPU does not support x86-64-v2
```
@ricardomaraschini ricardomaraschini force-pushed the ricardomaraschini/sc-109040/preflight-for-x86-64-v2-support-in-embedded branch from 968f4cc to f7ea465 Compare September 27, 2024 11:55
Copy link
Member

@hedge-sparrow hedge-sparrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ricardomaraschini ricardomaraschini merged commit 668b7ed into main Sep 27, 2024
27 checks passed
@ricardomaraschini ricardomaraschini deleted the ricardomaraschini/sc-109040/preflight-for-x86-64-v2-support-in-embedded branch September 27, 2024 15:16
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.

3 participants