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>
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>
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
Low: IPaddr2: ocft script updated before changes

IPaddr2v4 is added to make it clear what is going to be changed
by replacing the findif binary with findif.sh.
High: IPaddr2: replace the findif binary by findif.sh

Acknowledgement
  Thanks to Tomo Nozawa-san for his hard work for writing and testing the series of patches for IPv6 support.
  Thanks to Lars Ellenberg for the first findif.sh implementation.
High: add send_ua binary for IPv6 support in IPaddr2
High: IPaddr2: add IPv6 support
Low: IPaddr2: ocft test cases updated for IPv4/IPv6
Merge pull request #150 from ryan-mccabe/master

Forward port of RHEL6 bug fixes
Med: Strip trailing slashes from device names in /proc/mounts

Entries for CIFS mounts can sometimes contain trailing slashes
in the device field in /proc/mounts.

For example:
$ mount
//192.168.122.1/test on /mnt type cifs (rw)
$ grep test /proc/mounts
//192.168.122.1/test/ /mnt cifs ...

This patch strips trailing slashes from device names when
reading the contents of /proc/mounts.

Resolves: rhbz#848642
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
Merge pull request #152 from kskmori/IPaddr2-dualstack-pullreq

IPaddr2: Proposal patch to support the dual stack of IPv4 and IPv6.
Merge pull request #153 from ryan-mccabe/master

Fix for cifs mounts
Low: pgsql: fix string processing of crm_mon's output on Pacemaker 1.1.8

Replication mode dosen't work on Pacemaker 1.1.8
because the output of "crm_mon -n" is different from one
on Pacemaker 1.0.x.

So I fix string processing to work on 1.1.8 and 1.0.12.