Update libcni cache when default-route net selection is used

To keep consistency between actual network and CNI result in cache,
update libcni cache when multus add/del default routes by
`default-route` network selection.
This commit is contained in:
Tomofumi Hayashi
2021-12-04 00:48:50 +09:00
parent b9d0d93d6e
commit d52f2b6a45
6 changed files with 1439 additions and 64 deletions

View File

@@ -366,10 +366,13 @@ func TryLoadPodDelegates(pod *v1.Pod, conf *types.NetConf, clientInfo *ClientInf
}
if isGatewayConfigured == true {
types.CheckGatewayConfig(conf.Delegates)
err = types.CheckGatewayConfig(conf.Delegates)
if err != nil {
return 0, nil, err
}
}
return len(delegates), clientInfo, nil
return len(delegates), clientInfo, err
}
if _, ok := err.(*NoK8sNetworkError); ok {