Commit Graph

13 Commits

Author SHA1 Message Date
Vladimir Vivien
e86bdc7989 Forces fsnotify CREATE and REMOVE to occur serially 2018-11-26 22:11:47 -05:00
saad-ali
8f666d9e41 Modify kubelet watcher to support old versions
Modify kubelet plugin watcher to support older CSI drivers that use an
the old plugins directory for socket registration.
Also modify CSI plugin registration to support multiple versions of CSI
registering with the same name.
2018-11-21 18:37:31 -08:00
Renaud Gaubert
229418f261 Update pluginwatcher to ignore CSI metadata dir and non socket files 2018-11-17 01:51:00 +01:00
Vladimir Vivien
f16d3c56f6 Kubelet plugin watcher update to v1 2018-11-14 05:46:27 -05:00
Davanum Srinivas
e558e291d1
s/glog/klog/ - keep up with master
Change-Id: I27ff0545bc456ed8c0900cfeb90555f9ab7ae235
2018-11-10 07:57:01 -05:00
Davanum Srinivas
954996e231
Move from glog to klog
- Move from the old github.com/golang/glog to k8s.io/klog
- klog as explicit InitFlags() so we add them as necessary
- we update the other repositories that we vendor that made a similar
change from glog to klog
  * github.com/kubernetes/repo-infra
  * k8s.io/gengo/
  * k8s.io/kube-openapi/
  * github.com/google/cadvisor
- Entirely remove all references to glog
- Fix some tests by explicit InitFlags in their init() methods

Change-Id: I92db545ff36fcec83afe98f550c9e630098b3135
2018-11-10 07:50:31 -05:00
Renaud Gaubert
11fef8ba3b Pluginwatcher should prevent kubelet from starting if we cannot watch the plugin root 2018-11-09 00:20:22 +00:00
Renaud Gaubert
3a467ff44b Pluginwatcher: log error when walking fs rather than fail 2018-11-08 23:22:07 +00:00
Renaud Gaubert
3f5039a2d1 Fix pluginwatcher panic on failed startup 2018-11-08 23:22:07 +00:00
fisherxu
89f3fa3d62 use dailcontext 2018-09-08 16:07:38 +08:00
Renaud Gaubert
4d18aa63cd Refactor pluginwatcher to use the new API 2018-09-06 14:42:21 +02:00
hui luo
d04f596829 Add hierarchy support for plugin directory
it traverses and watch plugin directory and its sub directory recursively,
plugin socket file only need be unique within one directory,

- plugin socket directory
-    |
-    ---->sub directory 1
-    |              |
-    |              ----->  socket1,  socket2 ...
-    ----->sub directory 2
-                  |
-                  ------> socket1, socket2 ...

the design itself allow sub directory be anything,
but in practical, each plugin type could just use one sub directory.

four bonus changes added as below

1. extract example handler out from test, it is easier to read the code
with the seperation.

2. there are two variables here: "Watcher" and "watcher".
"Watcher" is the plugin watcher, and "watcher" is the fsnotify watcher.
so rename the "watcher" to "fsWatcher" to make code easier to
understand.

3. change RegisterCallbackFn() return value order, it is
conventional to return error last, after this change,
the pkg/volume/csi is compliance with golint, so remove it
from hack/.golint_failures

4. refactor errors handling at invokeRegistrationCallbackAtHandler()
to make error message more clear.
2018-06-25 17:32:18 -07:00
vikaschoudhary16
3a2e3bcc70 Add probe based mechanism for kubelet plugin discovery 2018-05-29 12:00:37 -04:00