Repository navigation
fix(pnfs): re-probe a mount whose data goes through the MDS, and report one that stays there (SFAM-2850) - #931
Merged
Merged
Conversation
…one that stays there (SFAM-2850) A fence from the device brings no reconnect. The client marks the device unusable, and every READ and WRITE of the mount goes through the metadata server. The node plugin probed a staging mount only when first seen, after a reconnect, or after a failed probe, so nothing took the layout again from a namespace that can see the device. In SFAM-2850 the mount also sent all of its I/O through the MDS for the rest of the run, and the only trace was a warning per probe in the node plugin's log. The primer now also probes a primed mount whose READs and WRITEs through the server grew since the last pass, at most every 30 seconds, since some I/O, such as unaligned direct I/O, goes through the server by design. A mount whose probes have failed for 5 minutes is logged as an error and reported once per run of failures with a PNFSDataThroughMDS Warning event on the volume's claim, or on its PersistentVolume when it has no claim. The node plugin's role already allows creating events and listing PersistentVolumes. Together with vela-os patch 0026, which holds a client's layouts again after a fence or a probe through the server, the probe makes the first device lookup once the device is usable again. Tests were written first and failed on the unchanged primer: no probe while data went through the server, no report after 5 minutes, and no event. Test plan rows U-129 to U-133 and F-21. F-21, a failover on a live cluster, is not run yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t (SFAM-2850) In SFAM-2850 one client sent 6.8 GB through the metadata server in 11 minutes, for the rest of a run, and nothing on the server said which client it was. vela-os patch 0027 has the guest's nfsd count, per client, the bytes of the READs and WRITEs it carries outside the grace period and the layout hold, in /proc/fs/nfsd/clients/<id>/info. The guest agent reads those counts every minute (--mds-data-interval, 0 turns it off) and logs a warning naming each client, by its NFS name and address, that sent 1 MiB or more since the last look. The log reaches the MDS pod log the way the nfsd watchdog's does. The first look names nobody, a client first seen later is counted from zero, and a guest kernel without the counts names nobody. Tests were written first and failed on a watch that did nothing. Test plan rows U-134 and U-135. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…est [skip ci] CI built the MDS image only from the shared pnfsos tag, which only main and pnfs-minimal move in vela-os. A guest built from any other vela-os branch publishes only commit-pinned pnfsos-<sha> tags, so testing one meant a local multi-architecture build. A manual run now takes the guest image as guest_image, defaulting to pnfsos, so push and release builds are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d probes, report a hung probe F-21 on dev-ocp found two defects in the report this branch added. A probe counts as failed when the mount's WRITE count grows under it, which a pod's own writes through the metadata server cause too. A pod writing unaligned O_DIRECT therefore failed every probe: 201 probes in 400 seconds, each with its own LAYOUTGET, and after five minutes a PNFSDataThroughMDS event said the probes could not take the block layout, which they had. - The report is driven by what the node sees: the mount's READs and WRITEs going through the server for five minutes, whatever its probes say. That covers a fenced client, a kernel that cannot open the device (RHEL 9.5 on lab cluster 111), and a pod doing I/O the layout does not serve. The event names those causes and the last probe's outcome, without picking one. - A failed probe is retried after 2s, doubling to 30s, instead of on every pass. A reconnect still retries it at once. - A probe that has not returned for five minutes is reported once, as PNFSLayoutProbeHung. On cluster 111 a probe sat in D state in unlinkat and the mount was never probed again. Test plan: U-131 rewritten, U-136 to U-139 and F-22 added. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
An unbounded reporting request can stall layout recovery for every mount on the node, and transient PV-list failures can permanently suppress warning events.
2 open issues
What changed in this PR
Adds recovery and diagnostics for pNFS traffic that goes through the metadata server instead of the block device, covering the CSI node plugin and guest MDS agent.
Changes:
- Re-probes mounts with metadata-server traffic, backs off failed probes, and reports persistent traffic or hung probes.
- Adds a configurable MDS-agent watch that logs clients exceeding the traffic threshold.
- Allows manual builds to select a guest image and expands unit tests and failure-injection scenarios.
| File | Description |
|---|---|
operator/docs/tests/test-plan-pnfs-rwx.md |
Documents new regression and failure-injection scenarios. |
csi-driver/internal/mds/agent/mds_data_watch.go |
Watches per-client metadata-server byte counters. |
csi-driver/internal/mds/agent/mds_data_watch_test.go |
Tests traffic thresholds, initial counts, and missing counters. |
csi-driver/internal/driver/driver.go |
Connects the layout primer to Kubernetes event reporting. |
csi-driver/internal/csi/node/pnfs_report.go |
Records traffic and hung-probe warnings on PVCs or PVs. |
csi-driver/internal/csi/node/pnfs_report_test.go |
Tests event targets, reasons, and messages. |
csi-driver/internal/csi/node/pnfs_prime.go |
Adds traffic-triggered probes, retry backoff, and reporting state. |
csi-driver/internal/csi/node/pnfs_prime_test.go |
Tests re-probing, backoff, persistent traffic, and hung probes. |
csi-driver/cmd/mds-agent/main.go |
Configures and starts the MDS traffic watch. |
.github/workflows/csi_build.yaml |
Adds a guest-image override for manual MDS builds. |
Review effort: Balanced
…etry a failed one Two review findings on #931: - The report ran in the primer's only loop, on a context with no deadline, through a client with no request timeout. An API server that accepted the request and never answered stopped probes, data re-probes, and alias refreshes for every mount on the node. Each report now runs in its own goroutine under a 30s deadline. - overdue() marked a mount reported before the report was recorded, and a failed report was only logged, so a mount that stayed affected never got its event. A failed report clears that mark and is sent again after a minute. The reporter returns its error to the primer instead of logging it. Test plan: U-144 and U-145. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
boddumanohar
approved these changes
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


The CSI and MDS-agent side of SFAM-2850. The guest kernel side is simplyblock/vela-os#33 (patches 0026 and 0027).
Changes
pnfs_prime.go):PNFSDataThroughMDSWarning event on the PVC, or on the PV when there is no PVC (pnfs_report.go).mds_data_watch.go,--mds-data-interval, default 1 min): reads 0027's per-client counters and logs each client that sent at least 1 MiB through the server since its last look. Counts present at the agent's first look are not reported. A kernel without the counters produces no output.csi_build.yaml): a manual run can build the MDS image from another pnfs-os guest (guest_imageinput), because vela-os branch builds publish onlypnfsos-<sha>tags.No RBAC change: the node role already lists PVs and creates events.
Verification
-race. golangci-lint, the house-style gate, codespell, andgo mod tidyare clean.spdkcsi:fix-pnfs-probe-on-mds-dataandspdkcsi:pnfs-mds-fix-pnfs-probe-on-mds-data(guestpnfsos-b6a7871) were built in run 44313979555.F-22 defects, fixed in 39aecbf
F-21 on dev-ocp found that a pod writing unaligned O_DIRECT made every probe look failed. The primer judges a probe by the mount-wide WRITE count, so it got 201 probes in 400 s and a
PNFSDataThroughMDSevent wrongly saying the probes "cannot take the block layout". Now:PNFSLayoutProbeHung. Lab cluster 111 had a probe stuck in D state inunlinkat.The new behavior has not run live yet.
Merge order
Merge vela-os#33 first. The default
GUEST_IMAGE(pnfsos) only carries 0027's counters after that merge. Without them the mds-agent watch stays silent.🤖 Generated with Claude Code