From 21d3f21c549ec87ed1eb097c52c86f9c2ffe8c51 Mon Sep 17 00:00:00 2001 From: zhoujunhao <18853925545@163.com> Date: Thu, 14 Jun 2018 17:37:24 +0800 Subject: [PATCH] [FXI] fix the file address does not exist --- appruntimesync/clean/clean.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/appruntimesync/clean/clean.go b/appruntimesync/clean/clean.go index aa1ffacbe..e5ea56c84 100644 --- a/appruntimesync/clean/clean.go +++ b/appruntimesync/clean/clean.go @@ -80,7 +80,7 @@ func (t *tenantServiceResource) DeleteResources() error { if v.FinalStatus == "success" { if v.DeliveredType == "slug" { if err := os.Remove(v.DeliveredPath); err != nil { - if !strings.Contains(err.Error(), "No such file or directory") { + if !strings.Contains(err.Error(), "no such file or directory") { return err } } @@ -527,6 +527,7 @@ func QueryRcResource(m *Manager) []Resource { } fmt.Println("ReplicationControllersMap",ReplicationControllersMap) for _, v := range ReplicationControllersList.Items { + fmt.Println("命名空间",v.Namespace) val, ok := ReplicationControllersMap[v.Namespace] if ok { fmt.Println("ok:",v.Namespace) @@ -632,6 +633,7 @@ func (m *Manager) PerformTasks() { if err := res.DeleteResources(); err != nil { logrus.Error("failed to delete:", err) } + logrus.Info("DeleteResources success!") } m.l.Remove(rs) }