Skip to content

var/lib/cni/multus maintenace #1488

@pasztorl

Description

@pasztorl

What happend:

I found > 300k files at /var/lib/cni/multus/results
sample file:

cat /var/lib/cni/multus/results/cilium-0539c85548a7b33981de5478dcea6d97314fba4ed2c4a8afbba54271465a0fce-eth0
{"kind":"cniCacheV1","containerId":"0539c85548a7b33981de5478dcea6d97314fba4ed2c4a8afbba54271465a0fce","config":"CnsKICAiY25pVmVyc2lvbiI6ICIwLjMuMSIsCiAgIm5hbWUiOiAiY2lsaXVtIiwKICAicGx1Z2lucyI6IFsKICAgIHsKICAgICAgICJ0eXBlIjogImNpbGl1bS1jbmkiLAogICAgICAgImVuYWJsZS1kZWJ1ZyI6IGZhbHNlLAogICAgICAgImxvZy1maWxlIjogIi92YXIvcnVuL2NpbGl1bS9jaWxpdW0tY25pLmxvZyIKICAgIH0KICBdCn0=","ifName":"eth0","networkName":"cilium","netns":"/var/run/netns/cni-c54a077d-d037-cfee-9539-3d00c421cced","cniArgs":[["IgnoreUnknown","true"],["K8S_POD_NAMESPACE","vc-prod-brandlift-hu"],["K8S_POD_NAME","ingress-public-kubernetes-ingress-c8kxx-x-ingress-x-vcluster"],["K8S_POD_INFRA_CONTAINER_ID","0539c85548a7b33981de5478dcea6d97314fba4ed2c4a8afbba54271465a0fce"],["K8S_POD_UID","066d422b-2c4f-4848-b206-9da12d2e0de9"]],"result":{"cniVersion":"0.3.1","dns":{},"interfaces":[{"mac":"26:8a:ea:05:69:3f","name":"lxce751ef859f45"},{"mac":"26:3f:72:06:1b:b2","name":"eth0","sandbox":"/var/run/netns/cni-c54a077d-d037-cfee-9539-3d00c421cced"}],"ips":[{"address":"10.15.64.3/32","gateway":"10.207.0.92","interface":1,"version":"4"}],"routes":[{"dst":"10.207.0.92/32"},{"dst":"0.0.0.0/0","gw":"10.207.0.92"}]}}

What you expected to happen:

This directory is maintained by multus, so stale files deleted.

Environment:

  • Multus version
    image path and image ID (from 'docker images')
 ghcr.io/k8snetworkplumbingwg/multus-cni:v4.1.4-thick
  • Kubernetes version (use kubectl version):
kubectl version
Client Version: v1.33.7
Kustomize Version: v5.6.0
Server Version: v1.33.7
  • Primary CNI for Kubernetes cluster:
cilium 1.17.13
  • OS (e.g. from /etc/os-release):
PRETTY_NAME="Ubuntu 24.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.4 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
  • File of '/etc/cni/net.d/'
cat /etc/cni/net.d/*
{"cniVersion":"0.3.1","logLevel":"verbose","logToStderr":true,"name":"multus-cni-network","clusterNetwork":"/host/etc/cni/net.d/05-cilium.conflist","type":"multus-shim"}
{
  "cniVersion": "0.3.1",
  "name": "cilium",
  "plugins": [
    {
       "type": "cilium-cni",
       "enable-debug": false,
       "log-file": "/var/run/cilium/cilium-cni.log"
    }
  ]
}
  • File of '/etc/cni/multus/net.d'
find /etc/cni/multus/net.d
find: ‘/etc/cni/multus/net.d’: No such file or directory
  • NetworkAttachment info (use kubectl get net-attach-def -o yaml)
    currently not using:
kubectl get net-attach-def -o yaml
apiVersion: v1
items: []
kind: List
metadata:
  resourceVersion: ""

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions