Skip to content

Keep the NIC loopback test off the NFS root and tolerate logind session races - #130

Merged
adambagley merged 2 commits into
mainfrom
nettest_nfs_safe
Nov 1, 2026
Merged

adambagley merged 2 commits into
mainfrom
nettest_nfs_safe

Conversation

@adambagley

Copy link
Copy Markdown
Collaborator

frost_nettest read its sysfs counters by absolute path while the NIC was down. On an NFS root, such a lookup can need the link the test has taken down, so the test blocked for good and the root never came back. The test now opens the interface's sysfs files while the link is up and reads them through those descriptors. The shell restores MTU, flags and IPv6 through files it opened before the test. The stage holds the link down for 65 seconds (FROST_NETTEST_EXPIRE_NFS_CACHE=1), past NFS's default 60-second directory attribute lifetime, so a lookup left in that window would hang every run instead of occasionally.

On a slow boot, a logind session scope can fail with result resources ("No PIDs left to attach to the scope's control group"), which leaves systemd degraded. The systemd check now accepts degraded only when every failed unit is a session-N.scope with Result=resources, and logs the scopes it tolerated. Any other failed unit still fails the stage.

The Linux-stage tests cover a running system, tolerated session races, mixed and unrelated failures, and incomplete query output. Lint and the fast tests pass.

Open sysfs attributes before taking the interface down and rewind their
descriptors for each read. Restore MTU, flags and IPv6 through files
opened before the test. Require cache-drop setup to succeed and enable a
65-second offline hold to expire default NFS directory attributes.

Preserve frame, ordering, socket-drop and counter checks and result tokens.
Validate setup failure and restoration with a shell test. Lint and the
fast Python suite pass in the pinned image; the static cross build passes
with warnings treated as errors.
Inspect each failed unit's Result before accepting degraded systemd.
Limit the exception to numeric session scopes with resources results,
require a complete successful listing, and log the tolerated scopes.

Cover normal startup, session races, mixed and unrelated failures, and
incomplete or conflicting query output in the Linux-stage tests.
Lint and the fast Python suite pass in the pinned image.
@adambagley
adambagley merged commit 2102a9d into main Nov 1, 2026
4 of 85 checks passed
@adambagley
adambagley deleted the nettest_nfs_safe branch November 1, 2026 03:34
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