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

Fix Gratuitous ARPs critical error on ipv6 #306

Merged
merged 1 commit into from
Jul 30, 2024

Conversation

SchSeba
Copy link
Collaborator

@SchSeba SchSeba commented Jul 29, 2024

In the case where the Gratuitous ARPs send function failed we failed the all CNI create and revert the configuration

In the case where the Gratuitous ARPs send function failed
we failed the all CNI create and revert the configuration

Signed-off-by: Sebastian Sch <[email protected]>
@SchSeba
Copy link
Collaborator Author

SchSeba commented Jul 29, 2024

example:

time="2024-07-29T18:56:13.497646845Z" level="debug" msg="function called" cniName="sriov-cni" containerID="4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025" netns="/var/run/netns/46717f3d-c952-4636-8d2c-80ba93795526" ifname="net1" func="cmdAdd" args.Path="/var/lib/cni/bin" args.StdinData="{\"cniVersion\":\"1.0.0\",\"deviceID\":\"0000:86:09.1\",\"ipam\":{\"type\":\"static\"},\"logLevel\":\"debug\",\"name\":\"sriovnetpolicy\",\"pciBusID\":\"0000:86:09.1\",\"trust\":\"on\",\"type\":\"sriov\",\"vlan\":0,\"vlanQoS\":0}" args.Args="IgnoreUnknown=true;K8S_POD_NAMESPACE=policy-tests;K8S_POD_NAME=client2;K8S_POD_INFRA_CONTAINER_ID=4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025;K8S_POD_UID=79b25fd3-4575-4c29-884a-564c4da26e6b;IP=2001:1db8:85a3::3/64"
time="2024-07-29T18:56:13.498059523Z" level="debug" msg="Check if the device is already allocated" cniName="sriov-cni" containerID="4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025" netns="/var/run/netns/46717f3d-c952-4636-8d2c-80ba93795526" ifname="net1" func="LoadConf" DefaultCNIDir="/var/lib/cni/sriov" n.DeviceID="0000:86:09.1"
time="2024-07-29T18:56:13.911353403Z" level="debug" msg="1. Set link down" cniName="sriov-cni" containerID="4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025" netns="/var/run/netns/46717f3d-c952-4636-8d2c-80ba93795526" ifname="net1" func="SetupVF" linkObj="&{LinkAttrs:{Index:172 MTU:1500 TxQLen:1000 Name:ens5f1v1 HardwareAddr:6e:33:0a:12:31:6b Flags:broadcast|multicast RawFlags:4098 ParentIndex:0 MasterIndex:0 Namespace:<nil> Alias: AltNames:[enp134s0f1v1] Statistics:0xc0002bc000 Promisc:0 Allmulti:0 Multi:1 Xdp:0xc0002a2030 EncapType:ether Protinfo:<nil> OperState:down PhysSwitchID:0 NetNsID:-1 NumTxQueues:16 NumRxQueues:16 TSOMaxSegs:65535 TSOMaxSize:65536 GSOMaxSegs:65535 GSOMaxSize:65536 GROMaxSize:65536 GSOIPv4MaxSize:65536 GROIPv4MaxSize:65536 Vfs:[] Group:0 Slave:<nil>}}"
time="2024-07-29T18:56:13.912038264Z" level="debug" msg="2. Set temp name" cniName="sriov-cni" containerID="4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025" netns="/var/run/netns/46717f3d-c952-4636-8d2c-80ba93795526" ifname="net1" func="SetupVF" linkObj="&{LinkAttrs:{Index:172 MTU:1500 TxQLen:1000 Name:ens5f1v1 HardwareAddr:6e:33:0a:12:31:6b Flags:broadcast|multicast RawFlags:4098 ParentIndex:0 MasterIndex:0 Namespace:<nil> Alias: AltNames:[enp134s0f1v1] Statistics:0xc0002bc000 Promisc:0 Allmulti:0 Multi:1 Xdp:0xc0002a2030 EncapType:ether Protinfo:<nil> OperState:down PhysSwitchID:0 NetNsID:-1 NumTxQueues:16 NumRxQueues:16 TSOMaxSegs:65535 TSOMaxSize:65536 GSOMaxSegs:65535 GSOMaxSize:65536 GROMaxSize:65536 GSOIPv4MaxSize:65536 GROIPv4MaxSize:65536 Vfs:[] Group:0 Slave:<nil>}}" tempName="temp_172"
time="2024-07-29T18:56:13.930862321Z" level="debug" msg="3. Remove interface original name from alt names" cniName="sriov-cni" containerID="4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025" netns="/var/run/netns/46717f3d-c952-4636-8d2c-80ba93795526" ifname="net1" func="SetupVF" linkObj="&{LinkAttrs:{Index:172 MTU:1500 TxQLen:1000 Name:ens5f1v1 HardwareAddr:6e:33:0a:12:31:6b Flags:broadcast|multicast RawFlags:4098 ParentIndex:0 MasterIndex:0 Namespace:<nil> Alias: AltNames:[enp134s0f1v1] Statistics:0xc0002bc000 Promisc:0 Allmulti:0 Multi:1 Xdp:0xc0002a2030 EncapType:ether Protinfo:<nil> OperState:down PhysSwitchID:0 NetNsID:-1 NumTxQueues:16 NumRxQueues:16 TSOMaxSegs:65535 TSOMaxSize:65536 GSOMaxSegs:65535 GSOMaxSize:65536 GROMaxSize:65536 GSOIPv4MaxSize:65536 GROIPv4MaxSize:65536 Vfs:[] Group:0 Slave:<nil>}}" OriginalLinkName="ens5f1v1" tempName="temp_172"
time="2024-07-29T18:56:13.93112059Z" level="debug" msg="4. Change netns" cniName="sriov-cni" containerID="4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025" netns="/var/run/netns/46717f3d-c952-4636-8d2c-80ba93795526" ifname="net1" func="SetupVF" linkObj="&{LinkAttrs:{Index:172 MTU:1500 TxQLen:1000 Name:temp_172 HardwareAddr:6e:33:0a:12:31:6b Flags:broadcast|multicast RawFlags:4098 ParentIndex:0 MasterIndex:0 Namespace:<nil> Alias: AltNames:[enp134s0f1v1] Statistics:0xc0002bc180 Promisc:0 Allmulti:0 Multi:1 Xdp:0xc0002a2210 EncapType:ether Protinfo:<nil> OperState:down PhysSwitchID:0 NetNsID:-1 NumTxQueues:16 NumRxQueues:16 TSOMaxSegs:65535 TSOMaxSize:65536 GSOMaxSegs:65535 GSOMaxSize:65536 GROMaxSize:65536 GSOIPv4MaxSize:65536 GROIPv4MaxSize:65536 Vfs:[] Group:0 Slave:<nil>}}" netns.Fd()="3"
time="2024-07-29T18:56:13.949332775Z" level="debug" msg="5. Set Pod IF name" cniName="sriov-cni" containerID="4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025" netns="/var/run/netns/46717f3d-c952-4636-8d2c-80ba93795526" ifname="net1" func="SetupVF" linkObj="&{LinkAttrs:{Index:172 MTU:1500 TxQLen:1000 Name:temp_172 HardwareAddr:6e:33:0a:12:31:6b Flags:broadcast|multicast RawFlags:4098 ParentIndex:0 MasterIndex:0 Namespace:<nil> Alias: AltNames:[enp134s0f1v1] Statistics:0xc0002bc180 Promisc:0 Allmulti:0 Multi:1 Xdp:0xc0002a2210 EncapType:ether Protinfo:<nil> OperState:down PhysSwitchID:0 NetNsID:-1 NumTxQueues:16 NumRxQueues:16 TSOMaxSegs:65535 TSOMaxSize:65536 GSOMaxSegs:65535 GSOMaxSize:65536 GROMaxSize:65536 GSOIPv4MaxSize:65536 GROIPv4MaxSize:65536 Vfs:[] Group:0 Slave:<nil>}}" podifName="net1"
time="2024-07-29T18:56:13.961814572Z" level="debug" msg="6. Enable IPv4 ARP notify and IPv6 Network Discovery notify" cniName="sriov-cni" containerID="4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025" netns="/var/run/netns/46717f3d-c952-4636-8d2c-80ba93795526" ifname="net1" func="SetupVF" podifName="net1"
time="2024-07-29T18:56:13.962028174Z" level="debug" msg="8. Bring IF up in Pod netns" cniName="sriov-cni" containerID="4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025" netns="/var/run/netns/46717f3d-c952-4636-8d2c-80ba93795526" ifname="net1" func="SetupVF" linkObj="&{LinkAttrs:{Index:172 MTU:1500 TxQLen:1000 Name:temp_172 HardwareAddr:6e:33:0a:12:31:6b Flags:broadcast|multicast RawFlags:4098 ParentIndex:0 MasterIndex:0 Namespace:<nil> Alias: AltNames:[enp134s0f1v1] Statistics:0xc0002bc180 Promisc:0 Allmulti:0 Multi:1 Xdp:0xc0002a2210 EncapType:ether Protinfo:<nil> OperState:down PhysSwitchID:0 NetNsID:-1 NumTxQueues:16 NumRxQueues:16 TSOMaxSegs:65535 TSOMaxSize:65536 GSOMaxSegs:65535 GSOMaxSize:65536 GROMaxSize:65536 GSOIPv4MaxSize:65536 GROIPv4MaxSize:65536 Vfs:[] Group:0 Slave:<nil>}}"
time="2024-07-29T18:56:13.973640183Z" level="debug" msg="Cache NetConf for CmdDel" cniName="sriov-cni" containerID="4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025" netns="/var/run/netns/46717f3d-c952-4636-8d2c-80ba93795526" ifname="net1" func="cmdAdd" config.DefaultCNIDir="/var/lib/cni/sriov" netConf="&{NetConf:{CNIVersion:1.0.0 Name:sriovnetpolicy Type:sriov Capabilities:map[] IPAM:{Type:static} DNS:{Nameservers:[] Domain: Search:[] Options:[]} RawPrevResult:map[] PrevResult:<nil>} SriovNetConf:{OrigVfState:{HostIFName:ens5f1v1 SpoofChk:true Trust:false AdminMAC:6e:33:0a:12:31:6b EffectiveMAC:6e:33:0a:12:31:6b Vlan:0 VlanQoS:0 VlanProto:33024 MinTxRate:0 MaxTxRate:0 LinkState:0} DPDKMode:false Master:ens5f1 MAC: MTU:0xc0001a2000 Vlan:0xc000015328 VlanQoS:0xc000015330 VlanProto:0xc000016a80 DeviceID:0000:86:09.1 VFID:1 MinTxRate:<nil> MaxTxRate:<nil> SpoofChk: Trust:on LinkState: RuntimeConfig:{Mac:} LogLevel:debug LogFile:}}"
time="2024-07-29T18:56:13.974316372Z" level="debug" msg="Mark the PCI address as in use" cniName="sriov-cni" containerID="4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025" netns="/var/run/netns/46717f3d-c952-4636-8d2c-80ba93795526" ifname="net1" func="cmdAdd" config.DefaultCNIDir="/var/lib/cni/sriov" netConf.DeviceID="0000:86:09.1"
time="2024-07-29T18:56:14.077888082Z" level="debug" msg="announcing IPs" cniName="sriov-cni" containerID="4ac9c8780d269136fbecb1795e01ae972fd54811d71c726772c271a1bc632025" netns="/var/run/netns/46717f3d-c952-4636-8d2c-80ba93795526" ifname="net1" hasCarrier="true" IPs="[{Interface:0xc0001a25c8 Address:{IP:2001:1db8:85a3::3 Mask:ffffffffffffffff0000000000000000} Gateway:<nil>}]" announceError="failed to send GARP/NA message for ip 2001:1db8:85a3::3 on interface \"net1\": failed to send Unsolicited Neighbor Advertisement for IPv6 2001:1db8:85a3::3 on Interface net1: cannot assign requested address"

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10150180367

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 51.554%

Totals Coverage Status
Change from base Build 10059475956: 0.0%
Covered Lines: 680
Relevant Lines: 1319

💛 - Coveralls

@SalDaniele
Copy link
Contributor

/lgtm

@wizhaoredhat
Copy link
Contributor

LGTM

@SchSeba
Copy link
Collaborator Author

SchSeba commented Jul 30, 2024

Thanks! merging this one

@SchSeba SchSeba merged commit 16795cd into k8snetworkplumbingwg:master Jul 30, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants