Require Dispatcher identity in Agent activation

This commit is contained in:
2026-09-30 07:57:53 +08:00
parent 5ed5409994
commit 58f23660b8
8 changed files with 25 additions and 14 deletions
+1 -1
View File
@@ -435,7 +435,7 @@ func connectConfiguredAgents(ctx context.Context, cfg config.Config) (*connected
}
// Zero lets Agent-side durable session state allocate the next generation
// after a Dispatcher restart; hard-coding 1 would self-fence recovery.
session, activateErr := runtime.coordinator.Activate(ctx, endpoint.AgentID, endpoint.CellID, status.BootId, epoch, 0)
session, activateErr := runtime.coordinator.Activate(ctx, cfg.DispatcherID, endpoint.AgentID, endpoint.CellID, status.BootId, epoch, 0)
if activateErr != nil {
return fail(fmt.Errorf("activate Agent %q: %w", endpoint.AgentID, activateErr))
}