fix(kyber): preserve host recovery through SMART failures - #2614
Conversation
|
Warning This organization's free trial has ended, so Indent couldn't continue this review. Manage billing to resume reviews on this repository.
All required CI checks passed on |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe host health script now runs timeout-protected SMART wear checks per disk, alerts on read or invalid-data failures, and updates endurance alerts only for valid measurements. Recovery checks run before disk checks. ShellSpec tests cover status bits, failures, invalid values, healthy readings, and ordering. ChangesDisk wear health checks
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to The host-health script now bounds and validates SMART reads while allowing CRI and freezer recovery to run first. Current coverage supports the intended alert and recovery behavior, with no remaining merge-blocking risk identified. Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Reviewed changes
This PR adds SMART health monitoring to the kyber host health script to prevent premature termination of host recovery. Previously, a nonzero SMART health status would terminate the host-health script before CRI checks and freezer recovery. The fix introduces a check_disk_wear() function that captures SMART health status separately, allowing the system to continue host recovery even when SMART readings fail (due to timeouts, malformed output, or hardware unavailability). Existing wear warnings are preserved when SMART reads are unavailable.
Changes:
config/k3s/kyber-host-health.sh: Addedcheck_disk_wear_device()function and integrated SMART health checks intomanage_orchestration_circuit_breaker()to run before SMART probes.spec/activate_kyber_spec.sh: Updated the activation script to include SMART health check handling in the test specifications.
These changes ensure that host recovery proceeds normally even when SMART health status is problematic, while still capturing wear warnings and alerting appropriately.
openrouter/openrouter/free | 𝕏

A nonzero SMART health status previously terminated the host-health script before CRI checks and freezer recovery. Bound each SMART read, distinguish command failures from health-status bits, validate the normalized endurance value, and retain existing wear warnings when a fresh reading is unavailable. Run CRI and freezer recovery before SMART probes.
Validation at head
9df7c4c97564dfa80a107da64af96fc4570d8bba: reproduced the previous exit-16 failure; all 2,509 ShellSpec examples pass, including 118 focused Kyber examples. ShellCheck and whitespace validation pass. Tests cover SMART warning bitmasks, command failures/timeouts, malformed or absent measurements, alert recovery, and execution order.Runtime activation is pending. This fixes a monitor failure path; it does not establish the cause of recurring host I/O pressure or resolve the existing SSD-wear warning. Freeze thresholds and containment remain unchanged.