controller v0.67.5: startup recreate waits for stack scan
recreateBootStaleApps ran before the stack manager finished scanning (GetStacks empty) so it found no apps; add a bounded wait for stacks before the one-time boot-stale recreate. Deterministic guest-reboot convergence. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -203,6 +203,14 @@ func (s *Server) ReconcileDriveGates() {
|
||||
// startup recreate (see recreateBootStaleApps) to converge a guest reboot deterministically, then the
|
||||
// periodic gate.
|
||||
func (s *Server) driveGateLoop() {
|
||||
// Wait for the stack scan to complete (GetStacks empty at NewServer time) and the agent to come up,
|
||||
// so the one-time boot-stale recreate sees the real deployed apps + drive state. Bounded poll.
|
||||
for i := 0; i < 30; i++ {
|
||||
if s.stackMgr != nil && len(s.stackMgr.GetStacks()) > 0 {
|
||||
break
|
||||
}
|
||||
time.Sleep(time.Second)
|
||||
}
|
||||
s.recreateBootStaleApps()
|
||||
s.ReconcileDriveGates()
|
||||
t := time.NewTicker(30 * time.Second)
|
||||
|
||||
Reference in New Issue
Block a user