mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 02:15:43 +03:00
Fix GC'd alloc tracking
The Client.allocs map now contains all AllocRunners again, not just un-GC'd AllocRunners. Client.allocs is only pruned when the server GCs allocs. Also stops logging "marked for GC" twice.
This commit is contained in:
committed by
Preetha Appan
parent
0aeda0d39e
commit
9c1e595e2e
@@ -115,7 +115,8 @@ func (s *HTTPServer) ClientGCRequest(resp http.ResponseWriter, req *http.Request
|
||||
return nil, structs.ErrPermissionDenied
|
||||
}
|
||||
|
||||
return nil, s.agent.Client().CollectAllAllocs()
|
||||
s.agent.Client().CollectAllAllocs()
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (s *HTTPServer) allocGC(allocID string, resp http.ResponseWriter, req *http.Request) (interface{}, error) {
|
||||
@@ -131,7 +132,9 @@ func (s *HTTPServer) allocGC(allocID string, resp http.ResponseWriter, req *http
|
||||
} else if aclObj != nil && !aclObj.AllowNsOp(namespace, acl.NamespaceCapabilitySubmitJob) {
|
||||
return nil, structs.ErrPermissionDenied
|
||||
}
|
||||
return nil, s.agent.Client().CollectAllocation(allocID)
|
||||
|
||||
s.agent.Client().CollectAllocation(allocID)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (s *HTTPServer) allocSnapshot(allocID string, resp http.ResponseWriter, req *http.Request) (interface{}, error) {
|
||||
|
||||
Reference in New Issue
Block a user