Low: anything: do not remove the pidfile before testing the status
Merge pull request #343 from davidvossel/netfs_fixes

Low: fs-lib.sh: Optimize fs-lib.sh based filesystem monitor code
Low: fs-lib.sh: Optimize fs-lib.sh based filesystem monitor code

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.

Resolves: rhbz#1023099
High: fix netfs unmount/self_fence integration

a nfs mount, where the nfs server goes away, can hang literally
forever.

even with soft nfs mount option, some operations such as sync and
umount can hang (depending on an endless matrix of kernel versions).

we recently exposed self_fence for netfs, but that's just too late
in the process. In some cases, with many nfs umount operation
in progress (generally 5 are enough to reproduce), it's possible
that we will never hit self_fence.

we address the problem by checking if the RPC/NFS/MOUNTD (mountd
only for nfs < version 4, that doesn't use mountd) are alive via
rpcinfo calls. In case there are no responses from them, we will
proceed to just self_fence as there is no point to keep
trying.

rpcinfo calls do attempt to contact the server 4 times, once
every 15 seconds, so this code path could theoretically,
if the network or server are only loosing packets, add an
extra 3 minutes to a stop operation.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
build: replace mkinstalldirs with INSTALL -d for consistency

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
build: remove old BSD cruft.

Checked on FBSD9, no init scripts are shipped with .sh extension

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
build: use AM_CPPFLAGS vs INCLUDE

INCLUDE has been obsolted and spits out a lot of warnings

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
build: fix lack of AC_LANG_SOURCE warnings at autogen time

configure.ac:112: the top level
configure.ac:693: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...

solution is to check compiler features via CPP (faster than compiling code)
and define AC_LANG_SOURCE for libnet build test.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
High: IPv6addr: Split send_ua utility out of IPv6addr.c source so it can be re-used in IPaddr2 without requiring cluster-glue.
Merge pull request #344 from davidvossel/netfs_fixes

High: fix netfs unmount/self_fence integration
Low: apache: Allow basic server request monitoring without requiring server-status to be enabled

By default, the apache agent attempts to detect the location
of the server-status url and retrieve the contents of that URL.
If no regex is set, all this agent does is verify some sort
of html file exists at the server-status url.  Essentially in
the default use-case, the agent is just verifying that the agent
can successfully request something from the webserver.

Requiring the user to enable the server-status feature
just to verify a request/response from the server shouldn't be
necessary.  This patch allows the agent to fall back to
doing a basic http header request of the website's index
if the server-status check fails during a monitor... This will
only occur in the very basic use-case where a user has
not defined any statusurls, regex patterns, or custom test cases.
Low: mysql pgsql: Using crm_node -n for instance attributes instead of uname -n

There are use cases where it is possible to have cluster node
names that are not the same as what is returned by uname -n. We
need to be using whatever crm_node -n returns as our local cluster
node name when setting node attributes rather than uname -n.

Switching to 'crm_node -n' from 'uname -n' only needs to happen
for pacemaker versions greater than 1.1.8.
Low: SAPInstance: Use ocf_local_nodename when determining node to set pcmk attribute on
Merge pull request #345 from fabbione/build_fixes

Build fixes
Merge pull request #338 from dmuhamedagic/anything-pidtest

Low: anything: do not remove the pidfile before testing the status
[low] use_findmnt should accept 0 to disable findmnt

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
[high] workaround broken mount helpers that add / to device in /proc/mounts

otherwise findmnt can't find the mount point... joy!

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
[low] be consistent across fs agents and available options

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Merge pull request #352 from fabbione/mountfixes

Mountfixes
Med: pgsql: Support for non-standard port and library locations

pgsql Resource Agent does not account for custom lib locations and
custom ports, making it impossible to use with some Postgres
installations.

Both of these customizable Postgres installation options are typically
controlled by simple environment variables, making them easy to
parametrize as
part of the Resource Agent (LD_LIBRARY_PATH and PG_PORT, respectively).