From f29e69c5819784a64462b95a058572febd9701d7 Mon Sep 17 00:00:00 2001 From: Soam Vasani Date: Sat, 10 Dec 2016 19:55:20 -0800 Subject: [PATCH] Fix cleanup on duplicate function specialization --- poolmgr/gp.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/poolmgr/gp.go b/poolmgr/gp.go index f4ed46e8..11f2dd8a 100644 --- a/poolmgr/gp.go +++ b/poolmgr/gp.go @@ -443,7 +443,9 @@ func (gp *GenericPool) GetFuncSvc(m *fission.Metadata) (*funcSvc, error) { // our own. TODO: this is grossly inefficient, improve it with some sort of state // machine log.Printf("func svc already exists: %v", existingFsvc.podName) - go gp.CleanupFunctionService(fsvc.podName) + go func() { + gp.kubernetesClient.Core().Pods(gp.namespace).Delete(fsvc.podName, nil) + }() return existingFsvc, nil } return fsvc, nil