projectcalico / calico

Cloud native networking and network security
https://docs.tigera.io/calico/latest/about/
Apache License 2.0
6.04k stars 1.35k forks source link

timed out waiting for interface matching the management IP (192.168.229.229) of network Calico,windows node #9236

Open 13567436138 opened 2 months ago

13567436138 commented 2 months ago

Expected Behavior

allocate ip ok

Current Behavior

firewall is closed in windows

root@k8s-master01:~# kubectl get node
NAME              STATUS   ROLES           AGE   VERSION
k8s-master01      Ready    control-plane   15d   v1.31.0
k8s-worker01      Ready    <none>          15d   v1.31.0
k8s-worker02      Ready    <none>          15d   v1.31.0
win-f1njfokn3tm   Ready    <none>          27m   v1.31.0
  Warning  FailedCreatePodSandBox  4s    kubelet            Failed to create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "cf8199556fa7cd64da0971c6dfa030be43b42d0e9c20a2ccc8fb9c4831bc395b": plugin type="calico" name="Calico" failed (add): timed out waiting for interface matching the management IP (192.168.229.229) of network Calico
apiVersion: v1
kind: Pod
metadata:
  name: windows-pod
spec:
  containers:
  - name: windows-container
    image: mcr.microsoft.com/windows/servercore:ltsc2019
    command: ["powershell.exe", "-Command", "while($true) { Write-Host 'Hello, Windows!' -ForegroundColor Green; Start-Sleep -Seconds 1 }"]
  nodeSelector:
    kubernetes.io/os: windows
  os:
    name: windows

Possible Solution

Steps to Reproduce (for bugs)

1.install windows node 2.apply the yaml above 3. 4.

Context

Your Environment

13567436138 commented 2 months ago

image do we need other cni plugins

13567436138 commented 2 months ago

cni error

2024-09-17 16:40:08.573 [INFO][5812] dataplane_windows.go 431: Found existing HNS network [&{Id:C84DDB4C-022B-421A-89D5-6FBC2F5C347C Name:Calico Type:L2Bridge NetworkAdapterName: SourceMac: Policies:[] MacPools:[{StartMacAddress:00-15-5D-51-70-00 EndMacAddress:00-15-5D-51-7F-FF}] Subnets:[{AddressPrefix:10.244.15.128/26 GatewayAddress:10.244.15.129 Policies:[]}] DNSSuffix: DNSServerList: DNSServerCompartment:0 ManagementIP:192.168.229.229 AutomaticDNS:false}] ContainerID="364be85717e1fed8d4c159e46ae0f42bf5d3cd6acfd456d49c9cab8130bfeb4c" Namespace="default" Pod="windows-pod" WorkloadEndpoint="win--f1njfokn3tm-k8s-windows--pod-eth0"
2024-09-17 16:40:08.860 [WARNING][5812] dataplane_windows.go 639: Waiting for interface matching management IP... ContainerID="364be85717e1fed8d4c159e46ae0f42bf5d3cd6acfd456d49c9cab8130bfeb4c" Namespace="default" Pod="windows-pod" WorkloadEndpoint="win--f1njfokn3tm-k8s-windows--pod-eth0" error=no index found for interface "" ip="192.168.229.229" network="Calico"
2024-09-17 16:40:10.158 [WARNING][5812] dataplane_windows.go 639: Waiting for interface matching management IP... ContainerID="364be85717e1fed8d4c159e46ae0f42bf5d3cd6acfd456d49c9cab8130bfeb4c" Namespace="default" Pod="windows-pod" WorkloadEndpoint="win--f1njfokn3tm-k8s-windows--pod-eth0" error=no index found for interface "" ip="192.168.229.229" network="Calico"
2024-09-17 16:40:11.599 [WARNING][5812] dataplane_windows.go 639: Waiting for interface matching management IP... ContainerID="364be85717e1fed8d4c159e46ae0f42bf5d3cd6acfd456d49c9cab8130bfeb4c" Namespace="default" Pod="windows-pod" WorkloadEndpoint="win--f1njfokn3tm-k8s-windows--pod-eth0" error=no index found for interface "" ip="192.168.229.229" network="Calico"
2024-09-17 16:40:12.888 [WARNING][5812] dataplane_windows.go 639: Waiting for interface matching management IP... ContainerID="364be85717e1fed8d4c159e46ae0f42bf5d3cd6acfd456d49c9cab8130bfeb4c" Namespace="default" Pod="windows-pod" WorkloadEndpoint="win--f1njfokn3tm-k8s-windows--pod-eth0" error=no index found for interface "" ip="192.168.229.229" network="Calico"
2024-09-17 16:40:14.176 [WARNING][5812] dataplane_windows.go 639: Waiting for interface matching management IP... ContainerID="364be85717e1fed8d4c159e46ae0f42bf5d3cd6acfd456d49c9cab8130bfeb4c" Namespace="default" Pod="windows-pod" WorkloadEndpoint="win--f1njfokn3tm-k8s-windows--pod-eth0" error=no index found for interface "" ip="192.168.229.229" network="Calico"
2024-09-17 16:40:15.498 [WARNING][5812] dataplane_windows.go 639: Waiting for interface matching management IP... ContainerID="364be85717e1fed8d4c159e46ae0f42bf5d3cd6acfd456d49c9cab8130bfeb4c" Namespace="default" Pod="windows-pod" WorkloadEndpoint="win--f1njfokn3tm-k8s-windows--pod-eth0" error=no index found for interface "" ip="192.168.229.229" network="Calico"
2024-09-17 16:40:16.798 [WARNING][5812] dataplane_windows.go 639: Waiting for interface matching management IP... ContainerID="364be85717e1fed8d4c159e46ae0f42bf5d3cd6acfd456d49c9cab8130bfeb4c" Namespace="default" Pod="windows-pod" WorkloadEndpoint="win--f1njfokn3tm-k8s-windows--pod-eth0" error=no index found for interface "" ip="192.168.229.229" network="Calico"
13567436138 commented 2 months ago

cni config

{
              "name": "Calico",
              "cniVersion": "0.3.1",
              "plugins": [{"DNS":{"Nameservers":["10.96.0.10"],"Search":["svc.cluster.local"]},"capabilities":{"dns":true},"datastore_type":"kubernetes","ipam":{"subnet":"usePodCidr","type":"calico-ipam"},"kubernetes":{"k8s_api_root":"https://192.168.229.180:6443","kubeconfig":"c:/etc/cni/net.d/calico-kubeconfig"},"log_file_max_age":30,"log_file_max_count":10,"log_file_max_size":100,"log_file_path":"c:/var/log/calico/cni/cni.log","log_level":"Info","mode":"windows-bgp","mtu":0,"name":"Calico","nodename":"win-f1njfokn3tm","nodename_file":"c:/var/run/calico/nodename","nodename_file_optional":true,"policies":[{"Name":"EndpointPolicy","Value":{"ExceptionList":["10.96.0.0/12"],"Type":"OutBoundNAT"}},{"Name":"EndpointPolicy","Value":{"DestinationPrefix":"10.96.0.0/12","NeedEncap":true,"Type":"SDNROUTE"}}],"policy":{"type":"k8s"},"type":"calico","vxlan_mac_prefix":"0E-2A","vxlan_vni":4096,"windows_loopback_DSR":true,"windows_use_single_network":true}]
            }
coutinhop commented 2 months ago

@13567436138 from your screenshot I can see you're using a non-English version of windows, any chance the interface name has non-English characters? If so, there currently is an issue with supporting those, it was fixed in https://github.com/projectcalico/calico/pull/9062 and will be released on Calico v3.29.0, but for now the work around is to config windows to use English...

13567436138 commented 2 months ago

When will v3.29.0 release