Bug 812342 - [FEAT] inotify support
[FEAT] inotify support
Status: NEW
Product: GlusterFS
Classification: Community
Component: upcall (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Soumya Koduri
: FutureFeature, Reopened, Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-04-13 08:59 EDT by Joaquin Diaz Trepat
Modified: 2018-03-05 08:00 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-10-22 11:46:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A C program that can test that the GlusterFS does not support inotify (1.59 KB, text/x-csrc)
2012-04-13 08:59 EDT, Joaquin Diaz Trepat
no flags Details

  None (edit)
Description Joaquin Diaz Trepat 2012-04-13 08:59:59 EDT
Created attachment 577328 [details]
A C program that can test that the GlusterFS does not support inotify

Description of feature:

Inotify is a Linux kernel feature that monitors file systems and immediately alerts an attentive application to relevant events, such as a delete, read, write, and even an unmount operation. You can also track the origin and destination of a move, among other niceties.
Well, it would be nice to have this implemented in GlusterFS. To register directly to a system call, instead of checking the inode with a program/script.

Version-Release number of selected component (if applicable):

I leave it to your criteria, the version release number. But i think it would be awesome. Contact me if i can help in any way.

How reproducible:

I leave a c source file attached to this request. You can compile it and see that in the mounted point you choose ( you need to edit the file ) got no response from the program.

Steps to Reproduce:
1. Download de file.
2. Edit it and put the path to a mounted GlusterFS.
3. Run it.
Actual results:

No stdout

Expected results:

The directory/file was deleted/created/modified

Additional info:

The application creates an inotify instance with fd = inotify_init(); and adds one watch to monitor modifications, new files, and destroyed files in /path/to/mount/point, as specified by wd = inotify_add_watch(...). The read() method blocks until one or more alerts arrive. The specifics of the alert(s)—each file, each event—are sent as a stream of bytes; hence, the loop in the application casts the stream of bytes into a series of event structures.

There is a beautiful article of this, written by Ian Shields in this link http://www.ibm.com/developerworks/linux/library/l-inotify/

Cheers. And thank you, in advance.

Joaquin Diaz Treat
Comment 1 Arie Skliarouk 2013-09-26 14:58:17 EDT
Isn't it already done as described here? http://gluster.org/pipermail/gluster-users/2010-September/005296.html
Comment 2 Joaquin Diaz Trepat 2013-09-26 15:20:07 EDT
I appreciate the time devoted to this inquiry.

The mail describes a way to use inotify in the local storage ( not a GlusterFS file system ) and replicate the files that are changing INTO the GlusterFS.

"...Our approach is to 
point the DocumentRoot to the local storage, and use inotify to 
replicate the changes made by Apache to the GlusterFS mountpoint. "

The feature requested in this ticket, is to support inotify IN the mount point of glusterfs such as, it is posible to watch a file inside the mount point:

watch /mount/point/of/glusterfs/somefile

Thanks in advance for any effort put in this.

Comment 3 Niels de Vos 2014-11-27 09:45:09 EST
Feature requests make most sense against the 'mainline' release, there is no ETA for an implementation and requests might get forgotten when filed against a particular version.
Comment 4 Kaleb KEITHLEY 2015-10-22 11:46:38 EDT
because of the large number of bugs filed against mainline version\ is ambiguous and about to be removed as a choice.

If you believe this is still a bug, please change the status back to NEW and choose the appropriate, applicable version for it.
Comment 5 James (purpleidea) 2015-10-22 15:46:53 EDT
I think this is still a valid bug. Changed back to new. Maintainers feel free to correct version, I just put to latest version.

Note You need to log in before you can comment on or make changes to this bug.