Repository navigation
mount: ownership options are checked state; drift remounts without a lazy detach (fixes #642) - #643
Merged
Merged
Conversation
…t a lazy detach (fixes #642) check_script compared only the mounted SOURCE, so a share mounted with the right source and the wrong uid/gid/file_mode/dir_mode/mode reported converged, and apply never remounted it. Measured on lambda-labs: the NAS declared gid changed and forjar would have said converged while the kernel still showed gid=1000. The check now reads the declared ownership keys back from findmnt OPTIONS: modes compare as numbers (0755 == 755), a user or group name resolves to its id, and a key the kernel omits counts as the default. On drift, apply remounts with a plain umount and NO `umount -l` fallback: a busy mount fails loudly naming the path instead of being detached under live jobs. tests_mount_options runs the generated scripts against a fake findmnt/umount/mount. Neutralising options_condition turns 5 of its 8 tests RED (the three converged cases stay green, as they must). Refs #642 Pmat-Ticket: PMAT-642 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
quorum-review (AD-04): NOT agreed (auto_merge: checked=true was_armed=false disarmed=false) {
"ticket": "PMAT-642",
"head": "6c1cabf22bf4f324990b6258b4166bfc30f06be9",
"width": 3,
"executor": "agy",
"agreed": false,
"auto_merge": {
"checked": true,
"was_armed": false,
"disarmed": false,
"note": "auto-merge not armed"
},
"lanes": [
{
"lane": 1,
"verdict": "FAIL",
"findings": 1
},
{
"lane": 2,
"verdict": "FAIL",
"findings": 1
},
{
"lane": 3,
"verdict": "PASS",
"findings": 0
}
]
} |
…quorum R1) Round 1 lanes 1 and 2 refuted the first head. `[ -z "$_fj_v" ] || ...` let a key the kernel leaves out match ANY declared value, so a declared uid=1000 over a tmpfs that omits uid (= 0) read converged. That is the same false green #642 exists to remove. An omitted key is now compared as its kernel default: uid and gid are 0, and mode is 1777. file_mode and dir_mode have no default, because cifs always echoes both, so a missing one never matches. fj642_an_omitted_key_is_its_default_not_a_wildcard goes RED with the old wildcard restored and GREEN with this fix. Refs #642 Pmat-Ticket: PMAT-642 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
quorum-review (AD-04): three PASS — agreed (auto_merge: checked=true was_armed=false disarmed=false) {
"ticket": "PMAT-642",
"head": "0b5882e06de1bdf2197de0b09ad7ac953cc465cf",
"width": 3,
"executor": "agy",
"agreed": true,
"auto_merge": {
"checked": true,
"was_armed": false,
"disarmed": false,
"note": "auto-merge not armed"
},
"lanes": [
{
"lane": 1,
"verdict": "PASS",
"findings": 4
},
{
"lane": 2,
"verdict": "PASS",
"findings": 0
},
{
"lane": 3,
"verdict": "PASS",
"findings": 0
}
]
} |
Refs #642 Pmat-Ticket: PMAT-642 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An integration target the quorum gate can run (`cargo test --test`). It executes the generated check/apply scripts against a fake findmnt, umount and mount; with src/resources/mount.rs reverted to the base, 4 of 5 fail. Refs #642 Pmat-Ticket: PMAT-642 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d-key wildcard; fixed and re-reviewed) Refs #642 Pmat-Ticket: PMAT-642 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Quorum 3/3 PASS at 0b5882e (R1 refuted the omitted-key wildcard, fixed and re-reviewed). After review, 184876b adds only |
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.
Fixes #642.
Defect: the
mountcheck compared only the findmnt SOURCE. A share mounted from the right source with the wronguid/gid/file_mode/dir_mode/modereported converged, and apply never remounted it. This is a tool reporting what it did not measure. Found on lambda-labs: the NAS gid must change so thecourseuser can write the share (paiml/infra#1208), and 1.32.0 would have reported converged with the old gid still live.Fix (
src/resources/mount.rs):findmnt -o OPTIONS.0755equals755.id -uorgetent group.uid=0) counts as the default.umountand noumount -lfallback. A busy mount fails loudly and names the path, instead of being detached under live jobs.Tests (
src/resources/tests_mount_options.rs): the generated scripts run against a fakefindmnt/umount/mount, so the tests measure what the host is told, not the script text. There are 8 tests; all 41resources::tests_mount*pass and clippy-D warningsis clean.Discriminates: with
options_conditionneutralised, 5 of the 8 go RED: the wrong gid, the wrong mode, the group name, the remount on drift, and the refusal when busy. The 3 converged cases stay green, as they must.🤖 Generated with Claude Code