Remove retries from poolmgr eagerPoolCreator
This was initially added to avoid restarts if poolmgr starts before fission api; but we don't really need that since k8s will restart it. Also, poolmgr now talks to the k8s api directly instead of the fission api.
This commit is contained in:
+1
-6
@@ -137,8 +137,6 @@ func (gpm *GenericPoolManager) CleanupPools(envs []tpr.Environment) {
|
||||
}
|
||||
|
||||
func (gpm *GenericPoolManager) eagerPoolCreator() {
|
||||
failureCount := 0
|
||||
maxFailures := 5
|
||||
pollSleep := time.Duration(2 * time.Second)
|
||||
for {
|
||||
time.Sleep(pollSleep)
|
||||
@@ -146,10 +144,7 @@ func (gpm *GenericPoolManager) eagerPoolCreator() {
|
||||
// get list of envs from controller
|
||||
envs, err := gpm.fissionClient.Environments(api.NamespaceAll).List(api.ListOptions{})
|
||||
if err != nil {
|
||||
failureCount++
|
||||
if failureCount >= maxFailures {
|
||||
log.Fatalf("Failed %v times: %v", maxFailures, err)
|
||||
}
|
||||
log.Fatalf("Failed to get environment list: %v", err)
|
||||
}
|
||||
|
||||
// Create pools for all envs. TODO: we should make this a bit less eager, only
|
||||
|
||||
Reference in New Issue
Block a user