Change:
I gathered e2e test results of suite for last 100 runs. The following is the list of flaky tests. Some might not be related to . I will start with the service tests. Any help would be appreciated. Detail list: Jenkins project:
cc/ Cluster team is working on to make kubenet default. Once we switch this to production, we don't need to restart docker to configure cbr0.
After a bunch of PRs got merged, the kubenet suite is much more stable. One more known flake can be fixed by I will post new flake tests here.
Just bump into a new failure: One of the nodes () got panic: Looks like it crashed at shaper reset.: Can you take a look?

Discussion:
"fmt" "net" "strings" <ins> "sync" </ins> "syscall" "github.com/vishvananda/netlink"

podCIDRs map[kubecontainer.ContainerID]string MTU      int <ins> mu       sync.Mutex //Mutex for protecting podCIDRs map and netConfig </ins> } func NewPlugin() network.NetworkPlugin {

return } <ins> plugin.mu.Lock() defer plugin.mu.Unlock() </ins> podCIDR, ok := details[network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE_DETAIL_CIDR].(string) if !ok { glog.Warningf("%s event didn't contain pod CIDR", network.NET_PLUGIN_EVENT_POD_CIDR_CHANGE)

return fmt.Errorf("Error building CNI config: %v", err) } <del> glog.V(3).Infof("Calling cni plugins to add container to network with cni runtime: %+v", rt) res, err := plugin.cniConfig.AddNetwork(plugin.netConfig, rt) if err != nil { return fmt.Errorf("Error adding container to network: %v", err) } if res.IP4 == nil { return fmt.Errorf("CNI plugin reported no IPv4 address for container %v.", id) </del> <ins> if err = plugin.addContainerToNetwork(id, rt); err != nil { return err </ins> } <del> plugin.podCIDRs[id] = res.IP4.IP.String() </del> // The first SetUpPod call creates the bridge; ensure shaping is enabled if plugin.shaper == nil { plugin.shaper = bandwidth.NewTCShaper(BridgeName)

} } } <del> delete(plugin.podCIDRs, id) glog.V(3).Infof("Calling cni plugins to remove container from network with cni runtime: %+v", rt) if err := plugin.cniConfig.DelNetwork(plugin.netConfig, rt); err != nil { return fmt.Errorf("Error removing container from network: %v", err) </del> <ins> if err = plugin.delContainerFromNetwork(id, rt); err != nil { return err </ins> } return nil

// TODO: Use the addToNetwork function to obtain the IP of the Pod. That will assume idempotent ADD call to the plugin. // Also fix the runtime's call to Status function to be done only in the case that the IP is lost, no need to do periodic calls func (plugin *kubenetNetworkPlugin) Status(namespace string, name string, id kubecontainer.ContainerID) (*network.PodNetworkStatus, error) { <ins> plugin.mu.Lock() defer plugin.mu.Unlock() </ins> cidr, ok := plugin.podCIDRs[id] if !ok { return nil, fmt.Errorf("No IP address found for pod %v", id)

IfName:      network.DefaultInterfaceName, } } <ins> func (plugin *kubenetNetworkPlugin) addContainerToNetwork(id kubecontainer.ContainerID, rt *libcni.RuntimeConf) error { plugin.mu.Lock() defer plugin.mu.Unlock() glog.V(3).Infof("Calling cni plugins to add container to network with cni runtime: %+v", rt) res, err := plugin.cniConfig.AddNetwork(plugin.netConfig, rt) if err != nil { return fmt.Errorf("Error adding container to network: %v", err) } if res.IP4 == nil || res.IP4.IP.String() == "" { return fmt.Errorf("CNI plugin reported no IPv4 address for container %v.", id) } plugin.podCIDRs[id] = res.IP4.IP.String() return nil } func (plugin *kubenetNetworkPlugin) delContainerFromNetwork(id kubecontainer.ContainerID, rt *libcni.RuntimeConf) error { plugin.mu.Lock() defer plugin.mu.Unlock() glog.V(3).Infof("Calling cni plugins to remove container from network with cni runtime: %+v", rt) if err := plugin.cniConfig.DelNetwork(plugin.netConfig, rt); err != nil { return fmt.Errorf("Error removing container from network: %v", err) } delete(plugin.podCIDRs, id) return nil } </ins>