Low: pgsql: change pgsql-status into UNKNOWN when validation is failed on stop

Change pgsql-status into UNKNOWN when validation is failed on stop.
Because pgsql-status remains in HS even though validation failure
means stop succeeded in pgsql RA.
resource-agents: Fix return code in fslib.sh

Patch from John Ruemker <jruemker@redhat.com>:

When you have an fs resource that depends on an lvm resource in a service,
and that lvm resource fails to start, the subsequent attempt to stop the fs
resource will fail because the device doesn't exist (since the logical
volume was never activated).

Because we're stopping a resource that is not actually running
(the fs isn't mounted), the operation should succeed here. Instead it
fails, preventing recovery.

Resolves: rhbz#853249
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
resource-agents: Fix for reading /proc/mounts in fs-lib.sh

This patch fixes a problem with the fs resource agent
that caused status checks to mistakenly fail as a result
of /proc/mounts changing while it was being read.

Original patch from John Ruemker <jruemker@redhat.com>

Resolves rhbz#853249

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
resource-agents: Add debugging output to fs-lib.sh

Add debugging output to the status/monitor operation in
fs-lib.sh analagous to what other agents do.

Resolves: rhbz#714156

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
resource-agents: Set restart retries to 0 for oracledb.sh

Per the suggestion of Chris Phillips <cphillip@redhat.com> change
the setting of RESTART_RETRIES to 0 from 3 to prevent rgmanager from
attempting to restart the database during the status operation so that
failures are properly counted.

Resolves: rhbz#817550

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
LVM agents:  Deactivate remotely active LVs before attempting EX activation

These changes address rhbz729812.  When a clustered volume group is part of
an HA LVM setup (an active/passive installation), the LVs that are activated
as part of the 'clvmd' startup may cause problems with the initialization of
HA LVM.  This is because HA LVM requires that logical volumes be active
exclusively.  If a remote machine activates the LVs via the 'clvmd' init
script before the local machine runs the service manager, it will be
impossible to activate the LVs exclusively.

Should the exclusive activation fail, the solution is to first attempt to
deactivate the LVs cluster-wide (unless the LVs are open - in which case
a deactivation would obviously fail).  If the deactivation is successful,
then another attempt can be made to activate exclusively.

This isn't a perfect solution.  It is still possible for yet another machine
to attempt a 'clvmd' activation between the time we deactivate and try again
for the exclusive activation.  This does substantially close the gap for
problems though.  If this solution proves to be insufficient, then 'lvs' or
some other command will need to be given the capabilities to report whether
an LV is active remotely or not.  This would give us the ability to distiguish
between a activation that fails because '--partial' was not used and an
exclusive activation that failed because another machine has the LV open
remotely.
resource-agents: Fix tomcat-6 startup

The /usr/sbin/tomcat6 script no longer parses the configuration file
and sets shell variables before trying to start tomcat6. Do that manually
so that we can actually run.

Resolves: rhbz#757632
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
Doc: mysql-proxy: update inline documentation and long description
Med: mysql-proxy: split in-depth monitoring into separate function
Low: mysql-proxy: check MySQL client binary for in-depth monitoring only
Low: mysql-proxy: cleanup
Low: mysql-proxy: Update configuration per feedback of Dejan Muhamedagic
Merge pull request #136 from t-matsuo/change-status-into-unknown

Low: pgsql: change pgsql-status into UNKNOWN when validation is failed on stop
LVM agents:  Handle RAID logical volumes.

This commit addresses rhbz824153.  Specifically, it enables the use
of RAID logical volumes in HA-LVM when using the "tagging" (i.e.
not "clvm") method.

One of the advantages of using RAID LVs is that they can handle
transient failures.  If a device goes down in the RAID LV and comes
back later, it can be reintegrated into the array by simply restarting
(or relocating) the service.  Only those portions of the disk that
have changed will be resync'ed - allowing for faster recovery times.
Merge pull request #148 from jbrassow/master

LVM agents:  Deactivate remotely active LVs before attempting EX activation
Med: Allow LVM return codes to work with Pacemaker

rgmanager treated any non-zero code as an error.  Unfortunately,
Pacemaker relies on correct OCF_NOT_RUNNING return codes in the
case that a resource is cleanly stopped.

Acked-by: Ryan McCabe <rmccabe@redhat.com>
Acked-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Lon Hohberger <lhh@redhat.com>
Med: Update member_util to use corosync and pacemaker

The LVM agent was using rgmanager tools to determine
ownership of LVs; this is fine except when rgmanager
doest not exist on the system.

Acked-by: Ryan McCabe <rmccabe@redhat.com>
Signed-off-by: Lon Hohberger <lhh@redhat.com>
Med: Strip whitespace before checking for empty string in HA LVM

Using vgs to check for a tag with 'vgs -o tags --noheadings' will
produce 9 space characters when no tags are found. This patch strips
that space before checking whether the output is empty.

Patch originally from Frank Danapfel <fdanapfe@redhat.com>

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
Med: More cleanups for whitespace in output in HA LVM

Clean up a few more places where we call lvs or vgs -o tags
to strip whitespace before we check for blank output.

Reviewed-by: Lon Hohberger <lhh@redhat.com>
Reviewed-by: Frank Danapfel <fdanapfe@redhat.com>
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
Dev: remove symlinks on make uninstall