F11 matrix-correction: re-arm on guest-blind (active mounts not inherited by rebooted guest — live finding)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017CDMFpFx84pfviCTVuGGhf
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
// netReasserter is the reassert capability (satisfied by *storage.SudoHostOps; faked in tests).
|
||||
type netReasserter interface {
|
||||
ReassertNetworkAutomounts(ctx context.Context) []storage.NetReassertResult
|
||||
RearmNetworkAutomount(ctx context.Context, where string) error
|
||||
}
|
||||
|
||||
// PostStartNetworkReassert re-arms idle NAS automount triggers after vmid started, then verifies
|
||||
@@ -48,9 +49,21 @@ func postStartNetworkReassert(ctx context.Context, vmid string, ops netReasserte
|
||||
if sees(ctx, vmid, res.Where) {
|
||||
fmt.Fprintf(os.Stderr, "felhom-agent guest-hook: vmid %s post-start — network share %s visible in guest (%s)\n",
|
||||
vmid, res.Name, res.Action)
|
||||
continue
|
||||
}
|
||||
// F11 matrix-correction: the guest is blind even though the pass classified this share
|
||||
// skip-active/rearmed. A freshly-started namespace does NOT inherit an ACTIVE host mount — only
|
||||
// a FRESH trigger event propagates in. Re-arm this specific share and re-verify once.
|
||||
fmt.Fprintf(os.Stderr, "felhom-agent guest-hook: vmid %s post-start — network share %s not visible after reassert (%s) — re-arming\n",
|
||||
vmid, res.Name, res.Action)
|
||||
if err := ops.RearmNetworkAutomount(ctx, res.Where); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "felhom-agent guest-hook: vmid %s post-start — WARNING: re-arm of %s failed: %v\n", vmid, res.Name, err)
|
||||
continue
|
||||
}
|
||||
if sees(ctx, vmid, res.Where) {
|
||||
fmt.Fprintf(os.Stderr, "felhom-agent guest-hook: vmid %s post-start — network share %s visible in guest after re-arm (healed)\n", vmid, res.Name)
|
||||
} else {
|
||||
fmt.Fprintf(os.Stderr, "felhom-agent guest-hook: vmid %s post-start — WARNING: network share %s NOT visible in guest after reassert (%s)\n",
|
||||
vmid, res.Name, res.Action)
|
||||
fmt.Fprintf(os.Stderr, "felhom-agent guest-hook: vmid %s post-start — WARNING: network share %s STILL NOT visible after re-arm\n", vmid, res.Name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user