Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

virtual machine - Incorrect `inotify` events using vagrant-fsnotify

My colleagues and I are developing a project in which users can import various multimedia files, and then the files must be processed. The project system deploys using Vagrant and will be deploying separately for each of the customers on their machines. Vagrant guest is Ubuntu 18.04, and any OS, such as MacOS, Windows or Linux might be a Vagrant host(It depends on the customers). The folder where users import the files is on vagrant host, and the vagrant guest mounts the folder using SSHFS(vagrant-sshfs plugin).

To be sure the files are imported(moved) to the folder correctly and fully, we are using vagrant-fsnotify plugin. It listens to filesystem changes(in the folder) on the Vagrant host and passes notifications about it to the Vagrant guest. So on the Vagrant guest we have inotify events. Also the files can be copied to the Vagrant host folder from some other device, such as USB device, or from another machine trough SMB. A problem is that in a moment when files copy to the folder, the vagrant guest receives incorrect inotify events -> https://github.com/adrienkohlbecker/vagrant-fsnotify/issues/33. the files are at risk to be processed without fully copying or to be unnoticed. Has anybody had similiar problem?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...