Bug 769874

Summary: tail: fix --follow on FhGFS remote file systems
Product: Red Hat Enterprise Linux 6 Reporter: Sven Breuner <sven.breuner>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: asersen, azelinka, meyering, plazonic, pope_svr4, prc
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: coreutils-8.4-17.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 14:34:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sven Breuner 2011-12-22 15:39:09 UTC
Description of problem:
"tail" from coreutils is trying to use inotify with the FhGFS remote file system, which isn't working (i.e. a process will not receive inotify notifications when a file is updated by a process on another machine in a cluster).

Steps to reproduce:
1. Use "tail -f" on a log file from machine A in an FhGFS mount directory.
2. Append text to the log file from machine B.
3. "tail -f" will not show/notice that the file has been updated, because it is waiting for an inotify notification (which won't be coming).
  
Actual results:
"tail -f" does not show updates, although the file has in fact been updated.

Expected results:
"tail -f" should fallback to the stat-based polling method instead of using inotify on a remote file system. Then it would work as expected and show/notice that the file has been updated.

Additional info:
Most of our users are using RHEL and thus currently experience problems when they try to watch their compute job log files with "tail -f" on a cluster.

Tail has an internal list of remote file systems, for which it automatically disables inotify. I already reported the problem to the GNU coreutils mailing list and a small patch has been developed by Jim Meyering to add FhGFS to tail's list of remote file systems, which resolves the problem:
http://lists.gnu.org/archive/html/bug-coreutils/2011-12/msg00129.html

To resolve the problem for our users as quickly as possible, can you please apply the patch to the RHEL version of the GNU coreutils.

Thanks and best regards,

Sven Breuner
Fraunhofer HPC, FhGFS Development Team

Comment 6 Josko Plazonic 2012-03-12 21:15:41 UTC
Indeed - please consider adding support for detecting GPFS - we have just hit that issue and it is defaulting to inotify use on GPFS file systems (and therefore failing miserably).  The strace is indicating the right magic number (from above coreutils commits) so adding those commits would fix it.

Thanks!

Comment 7 Ondrej Vasik 2012-04-04 13:45:58 UTC
*** Bug 809828 has been marked as a duplicate of this bug. ***

Comment 8 Joe Pope 2012-04-04 19:26:18 UTC
When is an updated coreutils rpm going to be released to support GPFS? I found a workaround by using the "---disable-inotify" option but would prefer an updated version of tail.

Comment 9 Ondrej Vasik 2012-04-05 07:35:44 UTC
At the moment the fix is planned for RHEL-6.3 minor update. I can't give any promise but it is very likely that this will be fixed in that update.

Comment 11 errata-xmlrpc 2012-06-20 14:34:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0933.html