Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to create HostComputeNetwork flannel.4096: hcnCreateNetwork failed in Win32: The parameter is incorrect. (0x57) #1966

Open
jidaojiuyou opened this issue May 10, 2024 · 5 comments
Labels

Comments

@jidaojiuyou
Copy link

failed to create HostComputeNetwork flannel.4096: hcnCreateNetwork failed in Win32: The parameter is incorrect. (0x57)

Expected Behavior

the flannel pod for windows is error

Current Behavior

PS C:\hpc\flannel> .\flanneld.exe  --kube-subnet-mgr --iface 192.168.1.162
I0510 14:32:06.657094    6728 main.go:210] CLI flags config: {etcdEndpoints:http://127.0.0.1:4001,http://127.0.0.1:2379 etcdPrefix:/coreos.com/network etcdKeyfile: etcdCertfile: etcdCAFile: etcdUsername: etcdPassword: version:false kubeSubnetMgr:true kubeApiUrl: kubeAnno
tationPrefix:flannel.alpha.coreos.com kubeConfigFile: iface:[192.168.1.162] ifaceRegex:[] ipMasq:true ifaceCanReach: subnetFile:/run/flannel/subnet.env publicIP: publicIPv6: subnetLeaseRenewMargin:60 healthzIP:0.0.0.0 healthzPort:0 iptablesResyncSeconds:5 iptablesForward
Rules:true netConfPath:/etc/kube-flannel/net-conf.json setNodeNetworkUnavailable:true}
W0510 14:32:06.689895    6728 client_config.go:618] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I0510 14:32:06.711721    6728 kube.go:139] Waiting 10m0s for node controller to sync
I0510 14:32:06.711721    6728 kube.go:455] Starting kube subnet manager
I0510 14:32:06.718552    6728 kube.go:476] Creating the node lease for IPv4. This is the n.Spec.PodCIDRs: [10.244.0.0/24]
I0510 14:32:06.719112    6728 kube.go:476] Creating the node lease for IPv4. This is the n.Spec.PodCIDRs: [10.244.1.0/24]
I0510 14:32:07.726932    6728 kube.go:146] Node controller sync successful
I0510 14:32:07.726932    6728 main.go:230] Created subnet manager: Kubernetes Subnet Manager - win-node-1
I0510 14:32:07.727511    6728 main.go:233] Installing signal handlers
I0510 14:32:07.727511    6728 main.go:442] Found network config - Backend type: vxlan
I0510 14:32:07.728088    6728 match.go:74] Searching for interface using 192.168.1.162
I0510 14:32:07.736642    6728 match.go:263] Using interface with name vEthernet (Ethernet0) and address 192.168.1.162
I0510 14:32:07.737202    6728 match.go:285] Defaulting external address to interface address (192.168.1.162)
I0510 14:32:07.737718    6728 vxlan_windows.go:126] VXLAN config: Name=flannel.4096 MacPrefix=0E-2A VNI=4096 Port=4789 GBP=false DirectRouting=false
time="2024-05-10T14:32:07+08:00" level=info msg="HCN feature check" supportedFeatures="{{true true true true} {true true} true true true true false false false false false true false false false false false}" version="{9 5}"
I0510 14:32:07.757337    6728 device_windows.go:127] Attempting to create HostComputeNetwork &{ flannel.4096 Overlay [{NetAdapterName [123 34 78 101 116 119 111 114 107 65 100 97 112 116 101 114 78 97 109 101 34 58 34 118 69 116 104 101 114 110 101 116 32 40 69 116 104 1
01 114 110 101 116 48 41 34 125]}] {[]} { [] [] []} [{Static [{10.244.1.0/24 [[123 34 84 121 112 101 34 58 34 86 83 73 68 34 44 34 83 101 116 116 105 110 103 115 34 58 123 34 73 115 111 108 97 116 105 111 110 73 100 34 58 52 48 57 54 125 125]] [{10.244.1.1 0.0.0.0/0 0}]}
]}] 8 {<nil> {[] []    }} {2 0}}
E0510 14:32:08.154575    6728 main.go:333] Error registering network: failed to create VXLAN network: failed to create HostComputeNetwork flannel.4096: hcnCreateNetwork failed in Win32: The parameter is incorrect. (0x57) {"Success":false,"Error":"参数错误。 ","ErrorCode"
:2147942487}
I0510 14:32:08.155167    6728 main.go:422] Stopping shutdownHandler...

Possible Solution

Steps to Reproduce (for bugs)

  1. look at doc
  2. modify the net-conf.json section and deploy linux flannel
  3. get flannel for window yaml
  4. use Dockerfile to build latest version docker image and use this version image to deploy the flannel for windows
  5. the pod will occurred error

Context

Your Environment

  • Flannel version: v0.25.1
  • containernetworkingCniVersion: v1.4.1
  • windows cniVersion: v0.3.0
  • flannelCniVersion: v1.4.1-flannel1
  • Backend used (e.g. vxlan or udp): default (vxlan ?)
  • Etcd version: 3.5.12-0
  • Kubernetes version (if used): 1.30.0
  • Operating System and version: windows server 2019(node)、centos 7.9(master)
  • Link to your project (optional): none
@jidaojiuyou
Copy link
Author

the microsoft official doesn't provide the v0.21.5 image. so i build the latest image with Dockerfile,but it occurred the error

@jidaojiuyou
Copy link
Author

jidaojiuyou commented May 10, 2024

when i use the Dockerfile to build v0.21.5 image, it works.

what‘s trouble with the v0.25.1 flanneld.exe ?

@rbrtbnfgl
Copy link
Contributor

@manuelbuil Do you have any idea on this?

@manuelbuil
Copy link
Collaborator

Not really, it is working in my env but I am executing flanneld directly, not using the Dockerfile or guide mentioned in this issue. That one belongs to sig-windows and it was never tested in Flannel, so it might be that it is outdated, but this is just a guess 🤷

Copy link

stale bot commented Nov 9, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants