Hide Forgot
Description of problem: fs-lib.sh's is_alive function attempts to determine if a filesystem resource is healthy by writing and reading a file from disk. The method used to pick the file name involves a infinite loop where we try different file names until we get one that doesn't exist. We don't need to be doing that... Instead we should create a unique filename based on the resource's instance name and use that for testing.
Created attachment 815990 [details] optimize fs monitoring with mktemp for write testing This patch removes the loop for a single call to mktemp.
+ file=$(mktemp "$mount_point/check_writable.XXXXXX") best if file is hidden and contains the hostname /.check_writable.$(hostname).XXXXXX this avoid a potential problem for clusterfs without posix locks where two nodes could theoretically create the same file.
Created attachment 816216 [details] optimize fs monitoring with mktemp for write testing uploaded new patch that makes file hidden and includes hostname
Unit testing. No special case needs to be verified for this. This is an optimization. Sanity checking that a fs-lib.sh based file system resource (such as fs.sh) can properly start, monitor, and stop a filesystem is enough. No behavior change is expected. -- Vossel
I have verified that the filesystem resource behaves as expect with resource-agents-3.9.2-47.el6.x86_64.
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-2014-1428.html