restore-test: verdict is liveness, not start-task exitstatus (v0.7.0)
Fixes the crying-wolf false-fail surfaced by the live hub-enrollment runbook: PVE's guest-start task exits "WARNINGS: 1" for the benign systemd-nesting advisory, and WaitTask treated any non-OK exitstatus as failure, so the verdict was decided by an advisory exit code before the real boot check ran. Every modern-distro restore-test reported pass:false. - proxmox.WaitOptions.AllowWarnings (opt-in; default keeps all callers strict) - restore-test start step accepts warnings, surfaces them, verdict stays waitRunning - RestoreTestResult.StartWarnings/.WarningsRecognized + version-free "enable nesting" recognizer (can't rot back at systemd 258+); GuestAPI.TaskLogTail - hub.RestoreTest.warnings/.warnings_recognized wire fields (consumed by hub v0.7.5) - scheduler logs clean / passed-with-recognized / passed-with-unrecognized warnings - tests: WaitTask warnings matrix; restore-test pass/fail-on-liveness; version-free regression guard (systemd 256-300) Single agent bump 0.6.0 -> 0.7.0 covering the agent half of both task phases. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,6 +29,8 @@ type fakeAPI struct {
|
||||
waitFunc func(upid string) (proxmox.TaskStatus, error)
|
||||
// statusFunc backs TaskStatusOnce (crash recovery); default = stopped/OK.
|
||||
statusFunc func(upid string) (proxmox.TaskStatus, error)
|
||||
// logTailFunc backs TaskLogTail (restore-test start-warning surfacing); default = empty.
|
||||
logTailFunc func(upid string) ([]string, error)
|
||||
|
||||
starts []int
|
||||
stops []int
|
||||
@@ -75,6 +77,13 @@ func (f *fakeAPI) TaskStatusOnce(_ context.Context, upid string) (proxmox.TaskSt
|
||||
return proxmox.TaskStatus{UPID: upid, Status: "stopped", ExitStatus: "OK"}, nil
|
||||
}
|
||||
|
||||
func (f *fakeAPI) TaskLogTail(_ context.Context, upid string, _ int) ([]string, error) {
|
||||
if f.logTailFunc != nil {
|
||||
return f.logTailFunc(upid)
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
type setCall struct {
|
||||
vmid int
|
||||
params map[string]string
|
||||
|
||||
Reference in New Issue
Block a user