Bug 1023099 - optimize fs-lib.sh based filesystem monitor code [NEEDINFO]
Summary: optimize fs-lib.sh based filesystem monitor code
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: resource-agents
Version: 6.6
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: David Vossel
QA Contact: Cluster QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-24 15:33 UTC by David Vossel
Modified: 2019-10-10 09:11 UTC (History)
6 users (show)

Fixed In Version: resource-agents-3.9.2-45.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 04:59:32 UTC
Target Upstream Version:
nkshirsa: needinfo?


Attachments (Terms of Use)
optimize fs monitoring with mktemp for write testing (942 bytes, patch)
2013-10-25 03:20 UTC, David Vossel
no flags Details | Diff
optimize fs monitoring with mktemp for write testing (955 bytes, patch)
2013-10-25 15:10 UTC, David Vossel
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1428 0 normal SHIPPED_LIVE resource-agents bug fix and enhancement update 2014-10-14 01:06:18 UTC

Description David Vossel 2013-10-24 15:33:57 UTC
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.

Comment 3 David Vossel 2013-10-25 03:20:53 UTC
Created attachment 815990 [details]
optimize fs monitoring with mktemp for write testing

This patch removes the loop for a single call to mktemp.

Comment 4 Fabio Massimo Di Nitto 2013-10-25 03:55:37 UTC
+		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.

Comment 5 David Vossel 2013-10-25 15:10:47 UTC
Created attachment 816216 [details]
optimize fs monitoring with mktemp for write testing

uploaded new patch that makes file hidden and includes hostname

Comment 7 David Vossel 2014-04-22 22:23:14 UTC
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

Comment 8 michal novacek 2014-05-07 14:34:27 UTC
I have verified that the filesystem resource behaves as expect  with 
resource-agents-3.9.2-47.el6.x86_64.

Comment 9 errata-xmlrpc 2014-10-14 04:59:32 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-2014-1428.html


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