Skip to content

Manual endpoint regeneration fails due to "'lxc_config.h' file not found" #10603

@brb

Description

@brb

It was noted by a user that endpoint regeneration via cilium endpoint regenerate $ENDPOINT_ID fails with the following error:

level=error msg="Failed to compile bpf_lxc.o: exit status 1" compiler-pid=747 linker-pid=748 subsys=datapath-loader
level=warning msg="/var/lib/cilium/bpf/bpf_lxc.c:19:10: fatal error: 'lxc_config.h' file not found" subsys=datapath-loader
level=warning msg="#include <lxc_config.h>" subsys=datapath-loader
level=warning msg="         ^~~~~~~~~~~~~~" subsys=datapath-loader
level=warning msg="1 error generated." subsys=datapath-loader
level=warning msg="JoinEP: Failed to compile" containerID=c13e7c6811 datapathPolicyRevision=1 debug=false desiredPolicyRevision=1 endpointID=4068 error="Failed to compile bpf_lxc.o: exit status 1" identity=27003 ipv4=10.217.0.56 ipv6= k8sPodName=default/nginx-6db489d4b7-xqq7v params="&{Source:bpf_lxc.c Output:bpf_lxc.o OutputType:obj}" subsys=datapath-loader
level=info msg="Regenerated endpoint BPF program" containerID=c13e7c6811 datapathPolicyRevision=1 desiredPolicyRevision=1 endpointID=4068 error="Failed to compile bpf_lxc.o: exit status 1" identity=27003 ipv4=10.217.0.56 ipv6= k8sPodName=default/nginx-6db489d4b7-xqq7v subsys=endpoint
level=warning msg="generating BPF for endpoint failed, keeping stale directory." containerID=c13e7c6811 datapathPolicyRevision=1 desiredPolicyRevision=1 endpointID=4068 file-path=4068_next_fail identity=27003 ipv4=10.217.0.56 ipv6= k8sPodName=default/nginx-6db489d4b7-xqq7v subsys=endpoint

I've checked with v1.6.2, v1.6.7 and v1.7.1 (deployed via https://github.com/cilium/cilium/blob/$VSN/install/kubernetes/quick-install.yaml) - all of them experience the same failure.

Steps to reproduce:

  1. kubeadm init --pod-network-cidr=10.217.0.0/16
  2. kubectl taint nodes --all node-role.kubernetes.io/master-
  3. kubectl apply -f https://raw.githubusercontent.com/cilium/cilium/v1.7.1/install/kubernetes/quick-install.yaml
  4. kubectl run nginx --image=nginx --replicas=1
  5. Manually regenerate the endpoint and inspect cilium-agent logs.

Metadata

Metadata

Labels

kind/bugThis is a bug in the Cilium logic.kind/community-reportThis was reported by a user in the Cilium community, eg via Slack.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions