agent v0.33.0: C1 net — pre-start self-heal hook + decommission mp-delete

Pre-start PVE hookscript (internal/guesthook) creates host-root placeholders for
absent bind-mount sources so the guest always boots (fail-closed); decommission
now pct set --delete's the dead mp (GuestBinder.DetachBind) so a missing source
can't brick the next reboot (B3 C1 bug). Non-hollow tests + companions. Installed
+ registered per-guest by the provision back-half. Transitional ahead of the
intermediary-mount re-architecture which makes C1 structural.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-15 16:11:10 +02:00
parent 2a4affc3a8
commit 44cdf82631
11 changed files with 490 additions and 3 deletions
+20 -1
View File
@@ -389,7 +389,11 @@ type fakeGuestAttacher struct {
vmid int
slot, where string
}
reboots []int
reboots []int
detaches []struct {
vmid int
slot string
}
}
func (f *fakeGuestAttacher) AttachBind(_ context.Context, vmid int, mountKey, where string) error {
@@ -403,6 +407,21 @@ func (f *fakeGuestAttacher) AttachBind(_ context.Context, vmid int, mountKey, wh
}
func (f *fakeGuestAttacher) count() int { f.mu.Lock(); defer f.mu.Unlock(); return len(f.calls) }
func (f *fakeGuestAttacher) DetachBind(_ context.Context, vmid int, mountKey string) error {
f.mu.Lock()
defer f.mu.Unlock()
f.detaches = append(f.detaches, struct {
vmid int
slot string
}{vmid, mountKey})
return nil
}
func (f *fakeGuestAttacher) detachCount() int {
f.mu.Lock()
defer f.mu.Unlock()
return len(f.detaches)
}
func (f *fakeGuestAttacher) RebootGuest(_ context.Context, vmid int) error {
f.mu.Lock()
defer f.mu.Unlock()