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:
Soam Vasani
2017-08-09 22:37:55 -07:00
parent 7d83f5713a
commit 42261d8810
+1 -6
View File
@@ -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