Skip to content

Commit

Permalink
clustermesh: Ignore ..data directory of secrets mount
Browse files Browse the repository at this point in the history
Skip any directory present in the config directory to avoid warnings like these:
```
level=warning msg="Unable to establish etcd connection to remote cluser" clusterName=..data config=/var/lib/cilium/clustermesh/..data error="read /var/lib/cilium/clustermesh/..data: is a directory" kvstoreErr="<nil>" kvstoreStatus= subsys=clustermesh
```

Fixes: #6408

Signed-off-by: Thomas Graf <thomas@cilium.io>
  • Loading branch information
tgraf authored and aanm committed Feb 19, 2020
1 parent 30277db commit 47531ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/clustermesh/config.go
Expand Up @@ -80,7 +80,7 @@ func (cdw *configDirectoryWatcher) watch() error {
// lrwxrwxrwx. 1 root root 12 Jul 21 16:32 test7 -> ..data/test7
//
// Ignore all backing files and only read the symlinks
if strings.HasPrefix(f.Name(), "..") {
if strings.HasPrefix(f.Name(), "..") || f.IsDir() {
continue
}

Expand Down

0 comments on commit 47531ad

Please sign in to comment.