From b199333c7a9801fb89c63de27b62c5cf1534a140 Mon Sep 17 00:00:00 2001 From: Paul Chaignon Date: Wed, 25 Mar 2020 15:29:21 +0100 Subject: [PATCH] daemon: Remove old policy call map The policy call map was renamed in commit 5d6b669 from cilium_policy to cilium_call_policy, but the code to remove the old reference in case of upgrade is missing. Fixes: 5d6b669 ("maps/policymap: Rename policy call map to clarify intent") Signed-off-by: Paul Chaignon --- daemon/cmd/datapath.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/daemon/cmd/datapath.go b/daemon/cmd/datapath.go index dfde518ef364..287a738f67d5 100644 --- a/daemon/cmd/datapath.go +++ b/daemon/cmd/datapath.go @@ -302,13 +302,14 @@ func (d *Daemon) initMaps() error { return nil } - // Delete old proxymaps if left over from an upgrade. - // TODO: Remove this code when Cilium 1.6 is the oldest supported release - for _, name := range []string{"cilium_proxy4", "cilium_proxy6"} { + // Delete old maps if left over from an upgrade. + // TODO: Remove proxymaps when Cilium 1.6 is the oldest supported release. + // TODO: Remove policy map when Cilium 1.8 is the oldest supported release. + for _, name := range []string{"cilium_proxy4", "cilium_proxy6", "cilium_policy"} { path := bpf.MapPath(name) if _, err := os.Stat(path); err == nil { if err = os.RemoveAll(path); err == nil { - log.Infof("removed legacy proxymap file %s", path) + log.Infof("removed legacy map file %s", path) } } }