contiv / netplugin

Container networking for various use cases
Apache License 2.0
512 stars 177 forks source link

fix_the_etcdv2_1000ErrorCodeEventIndexCleared_bug #1141

Open liucimin opened 6 years ago

liucimin commented 6 years ago

Description of the changes

Type of fix: Bug Fix

Fixes #1140

Please describe:

Add the protection for the watcher. When the watcher get the ErrorCodeEventIndexCleared from the etcd,we should create a new watcher to catch Future events。

TODO

2.Use the contiv until the etcd index 1000 larger than step 1. Result : use the curl to get the etcd's index.

3.Interrupt the network between netplugin and etcd. Result: can see "Error client:etcd cluster is unavailable or misconfigured during watch" in the netplugin log.

4.Resume the etwork between netplugin and etcd. Result: can see "Error 401: The event in requested index is outdated and cleared (*) during watch" in the netplugin log.

5.Create a new network for the contiv. Result: create succeed. 6.Create new pods. Result : make sure the pod can be create by the new network.

liucimin commented 6 years ago

@dseevr