Fix redeploying process when locally deleted

This commit is contained in:
Ingo Oppermann
2023-07-23 20:33:18 +02:00
parent 6789dbb783
commit bc76b4615d
2 changed files with 106 additions and 0 deletions

View File

@@ -998,6 +998,10 @@ func synchronize(wish map[string]string, want []store.Process, have []proxy.Proc
if nodeid, ok := wish[pid]; ok {
// Check for how long the node hasn't been contacted, or if it still exists.
if node, ok := nodes[nodeid]; ok {
if node.State != "disconnected" {
continue
}
if time.Since(node.LastContact) <= nodeRecoverTimeout {
reality[pid] = nodeid
delete(wantMap, pid)