You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug:
When a pod using Branch ENI is created and the controller is immediately restarted since EC2 is eventually consistent the EC2 API call can return ENI list without the newly created ENI leading to the controller not marking the VLAN ID allocated to the ENI as assigned in it's internal cache.
This can lead to new Branch ENI created on the node to fail since the controller will try to reuse the existing VLAN ID which it's not aware of.
Proposed Fix:
Check the error message, if the error message says that the VLAN ID is still in use, add the VLAN ID to cache.
_, err = t.ec2ApiHelper.AssociateBranchToTrunk(&t.trunkENIId, nwInterface.NetworkInterfaceId, vlanID)
if err != nil {
// Check error here if VLAN is already used mark it in cache.
trunkENIOperationsErrCount.WithLabelValues("associate_branch").Inc()
break
}
How to reproduce it (as minimally and precisely as possible):
Can be reproduced on trying multiple times to create Branch ENIs for new pods and kill the controller just after new Branch ENIs are created.
Environment:
Kubernetes version (use kubectl version): v1.0.5
CNI Version: v1.7.5
The text was updated successfully, but these errors were encountered:
abhipth
changed the title
VLAN ID is not freed from cache becasuse as EC2 is evenutally consistent
VLAN ID is not freed from cache becasuse as EC2 API is evenutally consistent
Dec 4, 2020
Describe the Bug:
When a pod using Branch ENI is created and the controller is immediately restarted since EC2 is eventually consistent the EC2 API call can return ENI list without the newly created ENI leading to the controller not marking the VLAN ID allocated to the ENI as assigned in it's internal cache.
This can lead to new Branch ENI created on the node to fail since the controller will try to reuse the existing VLAN ID which it's not aware of.
Proposed Fix:
Check the error message, if the error message says that the VLAN ID is still in use, add the VLAN ID to cache.
How to reproduce it (as minimally and precisely as possible):
Can be reproduced on trying multiple times to create Branch ENIs for new pods and kill the controller just after new Branch ENIs are created.
Environment:
kubectl version
): v1.0.5The text was updated successfully, but these errors were encountered: