Skip to content

Commit

Permalink
daemon: Remove old policy call map
Browse files Browse the repository at this point in the history
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 <paul@cilium.io>
  • Loading branch information
pchaigno committed Apr 3, 2020
1 parent b9ef15f commit b199333
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions daemon/cmd/datapath.go
Expand Up @@ -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)
}
}
}
Expand Down

0 comments on commit b199333

Please sign in to comment.