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

[RFE] Run the checks over a must-gather #30

Open
e-minguez opened this issue Feb 25, 2021 · 4 comments
Open

[RFE] Run the checks over a must-gather #30

e-minguez opened this issue Feb 25, 2021 · 4 comments

Comments

@e-minguez
Copy link
Contributor

It would be nice to run those checks over a must-gather.tar.gz instead of a running cluster.

Maybe we can leverage https://github.com/kxr/o-must-gather to mimic the 'oc' commands. For oc debug it would be harder tho...

@iranzo
Copy link
Member

iranzo commented Apr 20, 2021

This would require to rewrite the tests, I recommend the usage of a variable to check if running against a live system or a must-gather (or sosreport) and depending on that, act over one path or the other but provide a consistent output for both

@iranzo
Copy link
Member

iranzo commented Apr 22, 2021

kxr/o-must-gather#48 this will help if implemented as jsonpath is extensively used in the scripts, alternatively, the parsing could be done out of the general json but probably will increase operation time in 'online' operations

@iranzo
Copy link
Member

iranzo commented May 5, 2021

In regards to PR #67 from @dcritch and 'ssh' tests...

Personally, I would not make a difference between 'regular' and 'ssh' tests per-se, in the end, those are still only checks, and the difference between those and the ones related to the must-gather ones, it's just the way to obtain the data.

I would suggest to leave the execution to be more 'agnostic', it's a test, "just run it":tm: and leave the logic to the test itself based on environment variables.

Via environment variables we could define if:

  • execution is against a live system (that means we can use ssh, use OC commands or whatever)
  • execution is against a non-live system (that means, using o-must-gather instead) and path to the must-gather tarball expanded indicated

Each test (info, pre, checks), should use proper return code to indicate state of failure (or 'info') to be able to focus on the most important issues.

The logic inside the checks would be to just check if running live or not, and based on it, either skip the test (for example for a 'ssh-only' check) or to use alternate o-must-gather command to grab the data.

For making that easier, I would focus on return codes for each one (similar to what it's done now):

  • OK (no errors found) (and no output on console)
  • SKIP (tests was skipped due to non satisfied requirements, like SSH check or not having baremetal and checking only baremetal, with 'output' saying what conditon was not satisfied)
  • ERROR with output about the actual error
  • INFO things that should be watched even if those are not critical for operation and output about the condition

With above conventions, it should be easy to quickly sort problems/info found based on priority and still cover 'ssh' tests, 'o-must-gather' ones, etc.

WDYT?

@iranzo
Copy link
Member

iranzo commented Dec 14, 2022

As pinged by Gabriel, https://github.com/gmeghnag/omc should support jsonpath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants