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() {
|
func (gpm *GenericPoolManager) eagerPoolCreator() {
|
||||||
failureCount := 0
|
|
||||||
maxFailures := 5
|
|
||||||
pollSleep := time.Duration(2 * time.Second)
|
pollSleep := time.Duration(2 * time.Second)
|
||||||
for {
|
for {
|
||||||
time.Sleep(pollSleep)
|
time.Sleep(pollSleep)
|
||||||
@@ -146,10 +144,7 @@ func (gpm *GenericPoolManager) eagerPoolCreator() {
|
|||||||
// get list of envs from controller
|
// get list of envs from controller
|
||||||
envs, err := gpm.fissionClient.Environments(api.NamespaceAll).List(api.ListOptions{})
|
envs, err := gpm.fissionClient.Environments(api.NamespaceAll).List(api.ListOptions{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
failureCount++
|
log.Fatalf("Failed to get environment list: %v", err)
|
||||||
if failureCount >= maxFailures {
|
|
||||||
log.Fatalf("Failed %v times: %v", maxFailures, err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create pools for all envs. TODO: we should make this a bit less eager, only
|
// Create pools for all envs. TODO: we should make this a bit less eager, only
|
||||||
|
|||||||
Reference in New Issue
Block a user