fix(sftp): fix startup cleanup and fusermount3 fallback in mount/umount-sshfs #7202
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #7202"
general
weight: 0.35
ajoshua2004
What type of PR is this?
/kind bug
What this PR does / why we need it:
Wait for the sftp server and the launch goroutines when mount-sshfs
fails to start, so that no zombie or orphan is left behind. Also fix
typos in umount-sshfs (the fusermount3 command name, and Stdin being
set on the wrong command), and swapped log arguments.
How to verify it
The script below checks whether
buildah mount-sshfscleans up after astartup failure.
"sshfs" on $PATH is an empty executable, so exec() fails with ENOEXEC
after the sftp server has been started. A fixed buildah reaps that
server before exiting and sees the error without polling the mountpoint.
By setting PR_SET_CHILD_SUBREAPER, any process buildah leaves behind is
reparented to the script: as a zombie if buildah didn't Wait() for it, or
still running if buildah exited before its deferred cleanup ran.
Build buildah before and after this PR, and run the script against each
binary:
Before:
After:
Which issue(s) this PR fixes:
None
Special notes for your reviewer:
PR_SET_CHILD_SUBREAPER from BATS, and tests that check processes or
signals across the process tree and namespaces could themselves make CI flaky.
where the code should have been waiting, so I prioritized fixing
that obvious problem over adding a test.
Given the above, I'd like a maintainer to decide whether to apply the 'No New Tests' label.
Does this PR introduce a user-facing change?
``
release-note
``buildah umount-sshfs now falls back to fusermount3 correctly when umount fails.