Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a fsnotify-related risk #42

Open
mars1024 opened this issue Jun 28, 2019 · 4 comments
Open

a fsnotify-related risk #42

mars1024 opened this issue Jun 28, 2019 · 4 comments

Comments

@mars1024
Copy link
Contributor

Ocicni now is using fsnotify to load cni config files real-time, but fsnotify has a risk, if we remove cni config path /etc/cni/net.d and recreate it, any changes of this directory will not be detected by fsnotify any more. In other words, ocicni will not work properly after cni config path was removed.

@mars1024
Copy link
Contributor Author

@dcbw @mrunalp PTAL ~

@mrunalp
Copy link
Member

mrunalp commented Jul 2, 2019

Is that something that can be fixed in fsnotify upstream?

@mars1024
Copy link
Contributor Author

mars1024 commented Jul 3, 2019

Is that something that can be fixed in fsnotify upstream?

I don't think so, because fsnotify is using inotify in linux, and inotify is using inode. Maybe we need some changes in ocicni.

@kwilczynski
Copy link
Member

@mars1024, what use case would favour removing the entire directory over files within it?

Do you also want to cover the removal of the /etc/cni aside from /etc/cni/net.d? Monitoring /etc to look for /etc/cni deletion can be done, but it would be a bit of an overkill, I think. While keeping the scope to /etc/cni only might be more feasible, I suppose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants