controller v0.67.1: gate only acts on external drives under /mnt/felhom-drives/
Fix caught live: planDriveGates falsely marked the internal SSD path /mnt/sys_drive/felhom-data disconnected (agent never reports it), which would block starting SSD-resident apps. Gate now skips non-/mnt/felhom-drives/ paths. Regression case added. No apps were stopped (none depended on the SSD path). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
## Changelog
|
||||
|
||||
### v0.67.1 — gate: only act on external drives under /mnt/felhom-drives/ (2026-06-15)
|
||||
|
||||
Fix (caught live on the v0.67.0 deploy): `planDriveGates` marked the internal SSD path
|
||||
`/mnt/sys_drive/felhom-data` "disconnected" because the agent never reports it as a drive — which would
|
||||
have blocked starting SSD-resident apps. The gate now only considers EXTERNAL drives registered under
|
||||
the stable parent `/mnt/felhom-drives/<name>`; always-present SSD/system paths are skipped. Regression
|
||||
case added to `TestPlanDriveGates`. (No apps were stopped — no app depended on the SSD path.)
|
||||
|
||||
### v0.67.0 — intermediary-mount: HDD_PATH repoint + drive-absent gate + H1 routes (2026-06-15)
|
||||
|
||||
Controller half of the intermediary-mount re-architecture (pairs with agent v0.34.0). Drives are now
|
||||
|
||||
@@ -105,6 +105,14 @@ func planDriveGates(paths []settings.StoragePath, disks []agentapi.DiskInfo) []g
|
||||
if sp.Decommissioned {
|
||||
continue
|
||||
}
|
||||
// ONLY gate EXTERNAL drives — those registered under the stable parent /mnt/felhom-drives/<name>.
|
||||
// Internal SSD / system paths (e.g. /mnt/sys_drive/felhom-data) are always-present locals the agent
|
||||
// never reports as drives; gating them on "absence" would falsely stop/block their apps. (Legacy
|
||||
// raw /mnt/<name> external paths are present via the agent's MountPath during the transition and get
|
||||
// repointed under the parent by the migration.)
|
||||
if !strings.HasPrefix(sp.Path, StableParentDir+"/") {
|
||||
continue
|
||||
}
|
||||
switch {
|
||||
case !present[sp.Path] && !sp.Disconnected:
|
||||
actions = append(actions, gateAction{Path: sp.Path, Stop: true})
|
||||
|
||||
@@ -38,6 +38,7 @@ func TestPlanDriveGates(t *testing.T) {
|
||||
{Path: "/mnt/felhom-drives/back", Disconnected: true}, // present + disconnected → RETURN
|
||||
{Path: "/mnt/felhom-drives/gone", Disconnected: true}, // ABSENT + disconnected → no action (steady)
|
||||
{Path: "/mnt/felhom-drives/dead", Decommissioned: true}, // decommissioned → never touched
|
||||
{Path: "/mnt/sys_drive/felhom-data"}, // INTERNAL SSD (absent from agent) → never gated
|
||||
}
|
||||
disks := []agentapi.DiskInfo{
|
||||
{MountPath: "/mnt/usb", GuestPath: "/mnt/felhom-drives/usb", State: "attached"},
|
||||
@@ -66,4 +67,7 @@ func TestPlanDriveGates(t *testing.T) {
|
||||
if _, acted := actions["/mnt/felhom-drives/dead"]; acted {
|
||||
t.Errorf("decommissioned drive must never be gated")
|
||||
}
|
||||
if _, acted := actions["/mnt/sys_drive/felhom-data"]; acted {
|
||||
t.Errorf("internal SSD/system path must NEVER be gated (only /mnt/felhom-drives/ externals)")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user