Skip to content

AIMVT-139: migrate remaining dmesg/journal scans to node-scraper#272

Open
speriaswamy-amd wants to merge 2 commits into
mainfrom
aimvt-139/pr3-dmesg-migrate-main
Open

AIMVT-139: migrate remaining dmesg/journal scans to node-scraper#272
speriaswamy-amd wants to merge 2 commits into
mainfrom
aimvt-139/pr3-dmesg-migrate-main

Conversation

@speriaswamy-amd

Copy link
Copy Markdown
Contributor

Summary

  • Migrate verify_dmesg_for_errors, full_journalctl_scan, and verify_driver_errors to the node-scraper adapter behind CVS_DMESG_PARSER (builds on merged AIMVT-139: node-scraper offline dmesg adapter + full_dmesg_scan toggle #221).
  • Consolidate shared parsing into _node_scraper_scan() plus helpers: cvs_dmesg_error_regex() (legacy pattern extensions), _parse_cvs_time() (tz-aware time windows).
  • Refactor full_dmesg_scan to reuse the shared helper and CVS pattern extensions.
  • Add unit tests for time-range filtering, journalctl path, driver-only filtering, and helper shape.

Test plan

  • python -m unittest cvs.lib.unittests.test_verify_lib.TestDmesgMigrations
  • python -m unittest cvs.lib.unittests.test_verify_lib.TestFullDmesgScan
  • Confirm CVS_DMESG_PARSER=legacy still uses regex paths for all four scanners
  • Confirm default node-scraper path uses ISO dmesg / journalctl -k -o short-iso collection commands

Made with Cursor

speriaswamy-amd and others added 2 commits July 24, 2026 15:03
Route verify_dmesg_for_errors, full_journalctl_scan and verify_driver_errors
through the node-scraper adapter behind the same CVS_DMESG_PARSER toggle, and
consolidate the shared scan loop into _node_scraper_scan().

- cvs_dmesg_error_regex(): expose CVS's err_patterns_dict as case-insensitive
  node-scraper error_regex extensions so nothing the legacy regex caught is
  lost (added on top of node-scraper's built-in table)
- verify_dmesg_for_errors: replace sed/awk timestamp slicing with the
  analyzer's analysis_range_start/end; _parse_cvs_time() converts the
  `date +"%a %b %e %H:%M"` strings to tz-aware datetimes
- full_journalctl_scan: scan the full kernel journal (journalctl -k -o
  short-iso) instead of the lossy egrep prefilter
- verify_driver_errors: parse full dmesg, then keep this check driver-focused
  by reporting amdgpu/SW_DRIVER events only
- full_dmesg_scan: reuse the shared helper + CVS pattern extensions
- tests cover all node-scraper paths, time-range args, driver filtering,
  _parse_cvs_time, and cvs_dmesg_error_regex

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop is_available mocks from TestDmesgMigrations; the adapter no longer
exposes that helper after PR #221 merged.

Co-authored-by: Cursor <cursoragent@cursor.com>
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

Successfully merging this pull request may close these issues.

1 participant