Skip to content

CLI reports "failed to copy CNI config file" when pulling sysdump #41833

@joestringer

Description

@joestringer

Example failure in CI: https://github.com/cilium/cilium/actions/runs/17863574255/job/50800531398#step:28:498

🔍 Collecting sysdump with cilium-cli version: 9ba2179b, args: [connectivity test --include-unsafe-tests --conn-disrupt-test-restarts-path ./cilium-conn-disrupt-restarts --conn-disrupt-test-xfrm-errors-path ./cilium-conn-disrupt-xfrm-errors --flush-ct --sysdump-hubble-flows-count=1000000 --sysdump-hubble-flows-timeout=5m --sysdump-output-filename cilium-sysdump-conn-disrupt-test-cilium-upgrade-ipsec-2-concurrent-<ts> --junit-file cilium-junits/conn-disrupt-test-cilium-upgrade-ipsec-2-concurrent.xml --collect-sysdump-on-failure --log-code-owners --code-owners=CODEOWNERS --exclude-code-owners=@cilium/github-sec --external-target=bing.com. --external-cidr=8.0.0.0/8 --external-ip=8.8.4.4 --external-other-ip=8.8.8.8 --hubble=true --flow-validation=disabled --external-target=fake.external.service.cilium --external-other-target=fake.external.service.other.cilium --external-cidr=172.20.1.0/24 --external-cidrv6=fc00:c111::ffff:0/112 --external-ip=172.20.1.100 --external-ipv6=fc00:c111::ffff:ec --external-other-ip=172.20.1.101 --external-other-ipv6=fc00:c111::ffff:ee --external-target-ca-namespace=external-target-secrets --external-target-ca-name=custom-ca --external-target-ipv6-capable --junit-property github_job_step=Run conn disrupt tests (cilium-upgrade-ipsec-2-concurrent) --test !seq-.* --test-concurrency=5 --expected-xfrm-errors +inbound_no_state]
🔮 Detected Cilium installation in namespace: "kube-system"
🔮 Detected Cilium operator in namespace: "kube-system"
ℹ️ Using default Cilium Helm release name: "cilium"
ℹ️ Using default Tetragon Helm release name: "tetragon"
ℹ️ Failed to detect Cilium SPIRE installation - using Cilium namespace as Cilium SPIRE namespace: "kube-system"
🔍 Collecting Kubernetes nodes
🔮 Detected Cilium features: map[bpf-lb-external-clusterip:Disabled cidr-match-nodes:Disabled clustermesh-enable-endpoint-sync:Disabled cni-chaining:Disabled:none enable-bgp-control-plane:Disabled enable-egress-gateway:Disabled enable-encryption-strict-mode:Disabled enable-envoy-config:Disabled enable-gateway-api:Disabled enable-ipsec:Enabled enable-local-redirect-policy:Disabled enable-policy-secrets-sync:Enabled endpoint-routes:Disabled ingress-controller:Disabled ipam:Disabled:kubernetes ipv4:Enabled ipv6:Enabled loadbalancer-l7:Disabled multicast-enabled:Disabled mutual-auth-spiffe:Disabled policy-default-local-cluster:Enabled policy-secrets-only-from-secrets-namespace:Enabled tunnel:Disabled:vxlan tunnel-port:Disabled:8472 wireguard-encapsulate:Disabled]
🔍 Collecting profiling data from Cilium pods
🔍 Collecting profiling data from Cilium pods
⚠️ The following tasks failed, the sysdump may be incomplete:

...

⚠️ cniconflist-cilium-4qbq7: failed to copy CNI config file "" from directory "/etc/cni/net.d/": command failed (pod=kube-system/cilium-4qbq7, container=cilium-agent): command terminated with exit code 1: "/usr/bin/cat: /etc/cni/net.d: Is a directory\n"
⚠️ cniconflist-cilium-bfrtr: failed to copy CNI config file "" from directory "/etc/cni/net.d/": command failed (pod=kube-system/cilium-bfrtr, container=cilium-agent): command terminated with exit code 1: "/usr/bin/cat: /etc/cni/net.d: Is a directory\n"
⚠️ cniconflist-cilium-ldkhf: failed to copy CNI config file "" from directory "/etc/cni/net.d/": command failed (pod=kube-system/cilium-ldkhf, container=cilium-agent): command terminated with exit code 1: "/usr/bin/cat: /etc/cni/net.d: Is a directory\n"

Something seems to be wrong with the file listing for determining which CNI configuration files to pull, as it's generating empty strings for the filepath which subsequently results in the commands failing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/agentCilium agent related.area/bugtoolImpacts gathering of data for debugging purposes.area/cliImpacts the command line interface of any command in the repository.area/cniImpacts the Container Networking Interface between Cilium and the orchestrator.cilium-cliThis PR contains changes related with cilium-clihelp-wantedYou can help! Post a detailed plan on the issue or create a PR to solve this issue.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions