feat: patch scheduler loop; record patch results and verify reboots from the agent stream

This commit is contained in:
2026-09-15 09:17:27 +00:00
parent 1bb2ba7f2b
commit 139658864b
3 changed files with 155 additions and 0 deletions
+9
View File
@@ -236,6 +236,12 @@ func (s *vantageServer) ReportInventory(ctx context.Context, req *pb.InventoryRe
if err := services.StoreInventory(srv.ServerID, req); err != nil {
log.Printf("store inventory for %s: %v", srv.ServerID, err)
}
// Only static snapshots compute reboot_required, so only they can settle a
// reboot. The agent sends one at start, so the first report after a
// reboot qualifies.
if req.IncludeStatic && req.BootTimeUnix > 0 {
services.VerifyPatchReboots(srv.InstanceID, srv.ServerID, time.Unix(req.BootTimeUnix, 0), req.RebootRequired)
}
return &pb.InventoryReportResponse{}, nil
}
@@ -330,6 +336,9 @@ func (s *vantageServer) CommandStream(stream pb.Vantage_CommandStreamServer) err
if m.WorkloadLogsResult != nil {
services.WorkloadResults.Deliver(m.WorkloadLogsResult)
}
if m.PatchResult != nil {
services.RecordPatchResult(srv.InstanceID, srv.ServerID, m.PatchResult)
}
if m.StepResult != nil {
services.StepResults.Deliver(m.StepResult)
}