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

Support filesystem event triggering? #1469

Closed
hjoliver opened this issue May 20, 2015 · 4 comments
Closed

Support filesystem event triggering? #1469

hjoliver opened this issue May 20, 2015 · 4 comments
Assignees
Labels

Comments

@hjoliver
Copy link
Member

Worth considering?

pyuv Python interface for libuv, a high performance asynchronous networking and platform abstraction library.

Pyuv claims to provide a portable interface to filesystem events (inotify on Linux). Some OSes (or filesystems? - GPFS on AIX) apparently do not support filesystem events at all, but with pyuv maybe cylc could support a generic interface that just fails with a sensible error message if you try to use it on an inappropriate platform.

(credit: Milton Woods, BoM, for the idea).

@slwood
Copy link

slwood commented Jul 21, 2017

Note WRT inotify on GPFS it's not so much that GPFS doesn't support inotify, but that inotify cannot 'see' filesystem events that take place on remote hosts. File activity to a GPFS mount on host A will be reported by an inotify instance watching that path on the same host, but it will not be reported by inotify watching the same path on a different host.

This is not always a problem, for instance an ingest daemon watching for new data files pushed from a remote location could use inotify in a GPFS environment if it could be guaranteed that the remote producer always sent data to the host that the ingest daemon was running on -- which may be quite reasonable.

@hjoliver
Copy link
Member Author

@slwood - thanks for the explanation, makes sense (I think you did explain that to me once...).

@hjoliver
Copy link
Member Author

This could almost be closed as superseded by #2339, but I'd better leave it open till will we have some kind of a filesystem triggering plugin.

@hjoliver
Copy link
Member Author

hjoliver commented Oct 5, 2017

Filesystem event triggering via inotify requires, by definition, some kind of persistent connection that watches for events. The new "xtrigger" PR #2423 is based on intermittent checking, via arbitrary functions, for a trigger to be satisfied. This is not compatible with inotify because an event could happen between checks. In principle we could make a new persistent thread or process in the suite daemon that watches for registered events via inotify and queues them for use in triggering but it's probably not worth the effort because Cylc is used in shared filesystem environments where (as detailed above) events would only be visible if the suite daemon happens to be running on the host where the event originates - which would typically not be the case. On that basis I'm closing this issue. We will probably write xtrigger functions to check for file completion via ".done" files (for example) instead - less elegant but more general and portable.

@hjoliver hjoliver closed this as completed Oct 5, 2017
@hjoliver hjoliver self-assigned this Oct 5, 2017
@hjoliver hjoliver modified the milestones: some-day, never Oct 5, 2017
@matthewrmshin matthewrmshin removed this from the never milestone Oct 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants