fix: a single failed drive no longer blanks a controller's device paths - #91
fix: a single failed drive no longer blanks a controller's device paths#91g-carre wants to merge 6 commits into
Conversation
|
8f88eea to
cd16d11
Compare
|
| CustomFileExists = tc.fileExists | ||
| if tc.evalSymlinks != nil { | ||
| CustomEvalSymlinks = tc.evalSymlinks | ||
| } |
There was a problem hiding this comment.
CustomEvalSymlinks is only set when tc.evalSymlinks != nil, so after test case 2 ("wwn link present, os drive name empty") runs and installs its custom function, test cases 3 and 4 inherit that stale stub. Not a bug today because those cases never hit the EvalSymlinks code path, but fragile if cases are added or reordered. Resetting at the top of each iteration is safer:
| } | |
| CustomFileExists = tc.fileExists | |
| CustomEvalSymlinks = origEvalSymlinks | |
| if tc.evalSymlinks != nil { | |
| CustomEvalSymlinks = tc.evalSymlinks | |
| } |
— Claude Code
|
…olumes getPaths() returned an error when a volume's /dev/disk/by-id/wwn-* link was absent and the volume had more than one backing drive. A degraded-but-online RAID volume (one whose data drive has failed) still exposes a valid OS device path and still serves I/O, but its udev by-id link can be missing while the array is not optimal. The error propagated up through LogicalVolumes(), so a single failed drive aborted logical-volume discovery for the entire controller, leaving every disk on it with an empty device path. Resolve the by-id/wwn permanent path only when a SCSI NAA Id is reported and its link exists; otherwise fall back to the backing drive for single-drive volumes, or return the (still valid) OS device path with an empty permanent path for multi-drive volumes, instead of failing. Discovery now returns every volume with its status and a usable device path. Issue: ARTESCA-17960 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ails The "Disk Name" parser called lsblk purely to refine a drive's status to Used when the device is mounted or formatted; the device path was already set. A failed or pulled drive whose /dev node has disappeared makes that lsblk lookup fail, and the error aborted parsing for the whole controller, leaving every drive on it absent from discovery. Treat an lsblk lookup failure as "cannot refine status" and keep the status ssacli already reported, so a single unhealthy drive no longer takes down the controller's entire inventory. Mirrors the SmartArray equivalent of the MegaRAID logical-volume fix. Issue: ARTESCA-17960 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
parseDrive resolves host device paths for JBOD "Used" drives via ComputePaths, which reads the real filesystem. When that failed (e.g. a drive whose udev by-id link is missing or has not settled yet), the error aborted parsing for the whole controller, dropping every drive on it from discovery. Treat a path-resolution failure as best-effort: keep the drive with empty paths instead of failing the entire inventory, mirroring the megaraid and ssacli fixes for the same class of bug. Issue: ARTESCA-17960 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The storcli2 logical-volume getter resolves the device path of RAID disks, but end-to-end coverage only exercised the Optimal case; degraded/failed states were only checked at the lvStatus() mapping level. Add a test proving a degraded volume (one member drive failed) is still returned with its device and permanent path intact and does not abort the controller's discovery — the ARTESCA-17960 property for storcli2 RAID disks. Issue: ARTESCA-17960 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add a suite test that drives the full legacy v1 read path (logicalVolume -> fillPhysicalDrives -> getPaths) for a degraded multi-drive volume whose /dev/disk/by-id/wwn link is absent — the exact original-bug trigger. It asserts the volume is returned with its OS device path intact and degraded status, rather than erroring and blanking the whole controller. Complements the getPaths unit test with coverage of the real read chain. Issue: ARTESCA-17960 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
State the cross-adapter contract that a getter returns a drive or volume it cannot fully resolve (missing by-id link, failed JBOD device node, degraded array) with empty paths and its status, rather than failing and dropping the whole controller's inventory. Documents the behavior the megaraid, ssacli and storcli2 fixes now guarantee. Issue: ARTESCA-17960 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
cd16d11 to
d7e2206
Compare
|
LGTM — all three adapter fixes (megaraid v1, ssacli, storcli2) correctly demote a path-resolution failure to graceful degradation with empty paths rather than aborting the whole controller's inventory. The refactored |
Context
Backend root cause behind ARTESCA-17960 (and its UI/QA parents ARTESCA-17957 / RD-2154). On a bare-metal node with one failed data drive,
disk-management-agentproducedDiscoveredPhysicalDiskrecords with an emptystatus.devicePathfor the whole controller, not just the failed drive — so consumers keying on device path lost the entire node's disk inventory.For RAID-member drives the device path is not intrinsic to the drive; it is resolved from the containing logical volume. Several getters aborted a whole controller's enumeration when a single drive/volume could not be fully resolved, blanking every (including healthy) disk on that controller.
Fixes (one commit per controller)
getPathsreturned an error when a volume's/dev/disk/by-id/wwn-*link was absent and the volume had more than one backing drive. A degraded-but-online array still exposes a valid OS device path, so it is now returned (empty permanent path) instead of failing the whole controller.lsblkonly to refine status toUsed; a failed/pulled drive whose/devnode vanished made that lookup fail and aborted the whole inventory. The lookup failure is now non-fatal.parseDriveresolved JBODUseddevice paths viaComputePaths(real filesystem); a resolution failure now keeps the drive with empty paths instead of dropping the whole controller.Tests & docs
DESIGN.md: documents the cross-adapter contract that getters degrade gracefully rather than dropping a controller's inventory.rhel8 shares the structural pattern but is out of scope here (not consumed by the affected agent).
Issue: ARTESCA-17960
🤖 Generated with Claude Code