calico: Cannot access local node services when using eBPF
I have one cluster and also install Prometheus in it. So, each node has a service (HostIP:9100) to export node information. However, if I run one Pod on Node1(Node1 Host IP: 172.21.149.119), I cannot access 172.21.149.119:9100 in the Pod. But I can access other services on the other nodes, such as 172.21.149.xx:9100 .
Expected Behavior
All local serivces on every node can be accessed in the Pod.
Current Behavior
Now, only local services run on different nodes with my Pod can be accessed in my Pod.
Possible Solution
https://github.com/projectcalico/calico/issues/6065
Steps to Reproduce (for bugs)
- Install Calico v3.23.1 or v3.22.3
- Install Prometheus
- Run a Pod on any node
- In the Pod, use curl to access HostIP:9100 (HostIP is the node IP where the Pod runs on.)
Context
I also can see the following log messages in calico-node Pod.
libbpf: prog 'calico_connect_v4': failed to attach to cgroup: Invalid argument
2023-01-30 12:01:50.409 [INFO][129] felix/connecttime.go 146: Loaded cgroup program cgroup="/run/calico/cgroup" program="calico_connect_v4"
libbpf: prog 'calico_sendmsg_v4': failed to attach to cgroup: Invalid argument
2023-01-30 12:01:50.499 [INFO][129] felix/connecttime.go 146: Loaded cgroup program cgroup="/run/calico/cgroup" program="calico_sendmsg_v4"
libbpf: prog 'calico_recvmsg_v4': failed to attach to cgroup: Invalid argument
2023-01-30 12:01:50.501 [INFO][129] felix/connecttime.go 146: Loaded cgroup program cgroup="/run/calico/cgroup" program="calico_recvmsg_v4"
libbpf: prog 'calico_sendmsg_v6': failed to attach to cgroup: Invalid argument
2023-01-30 12:01:50.502 [INFO][129] felix/connecttime.go 146: Loaded cgroup program cgroup="/run/calico/cgroup" program="calico_sendmsg_v6"
libbpf: prog 'calico_recvmsg_v6': failed to attach to cgroup: Invalid argument
I think this problem is very similar as #6065. However, the problem still exists after upgrading Calico to v3.23.1.
Your Environment
- Calico version: v3.25.1
- Orchestrator version (e.g. kubernetes, mesos, rkt): kubernetes 1.26.5
- Operating System and version: Ubuntu 22.04 LTS
Someone can help me?
About this issue
- Original URL
- State: open
- Created a year ago
- Comments: 33 (16 by maintainers)
I modified it and it still not works. Here is my Felix config
@tomastigera Here are the output from my environment
Above information are dumped from calico-node pod which is running on Host 172.21.147.156. And I run a nginx pod on Host 172.21.147.156, too. Last, my http server is running on Host 172.21.147.156 and listening Port 9999 natively. (not pod)
Could you see anything wrong here?
@tomastigera Upstream kubernetes (1.27.5) installed with kubespray. Will try to gather some logs according to your guide and get back to you.