dlm_tool: lockdebug using new debugfs file

A new dlm patch adds a new debugfs file that shows more
info about rsb/lvb/lkb structs.  dlm_tool lockdebug <name>
will use this new file, if available, and display the
new info in a format similar to the original format.

Signed-off-by: David Teigland <teigland@redhat.com>
cman: drastically improve startup errors

cman_tool join has a nasty habit of just exiting with
"corosync failed to start" or some such unhelpful error message.

This patch improves on these by trapping the corosync exit code and
attempting to interpret it for the user.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
cman: fix cman_tool join return code

Tha last checkin broke the cman_tool return code. The FORKED and SUCCESS
messages could (and in a normal run often would) be returned as part
of the same pipe read.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
build: restore original behaviour when building groupd

fix small regression introduced when merging pacemaker build patches

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
gfs: improve gfs_fsck rindex repair code

bz 442271 - GFS: gfs_fsck bugs found in rindex repair code

This patch makes improvements and fixes some bugs in gfs_fsck's
rindex repair code.  Basically, if RGs are damaged, especially
in the third section (i.e. RGs added by gfs_grow) it did not
properly locate the RG boundaries.  Also, if the rindex was
completely zeroed out, it did not recover it in cases where
the file system had been extended.
dlm_tool: change to new debugfs scan

The rsb addr was added to the output.

Signed-off-by: David Teigland <teigland@redhat.com>
cman: make 'cman_tool leave -w' wait until cman has shut down

Once we get a sucessful return from cman_try_shutdown there still
might be a delay before cman actually shuts down because
the LEAVE messages need to be sent around the ring.

cman_tool now waits until it can no-longer contact cman if -w is
given on the command-line.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
cman: Return an error if 'cman_tool leave' is attempted during shutdown

There were some occasions when 'cman_tool leave' simply returned success
even though shutdown had already started. This fixes those.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
cman: let 'cman-tool leave -w' wait even if shutdown has already started

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
qdisk: fix mkqdisk output

we killed output to std* by default in logging. we can't use log*print*
anylonger for this operation. Switch back to printf.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
fence: Fix virsh agent and ssh_options in case of ssh private key

Virsh agent should use --noprofile and --norc when invoking bash, because
in other case, all PS1 setting doesn't make any sense.

fencing.py.py library have two branches for invoking ssh command. One
case is without ssh private key and other is with it. Case without
private key process ssh_options agent key, but other branch not.
This patch fixes that and now both branches behave correctly.
dlm_tool: add -s option to summarize lockdebug output

at the end of all the lock state, something like:

dlm_tool -s lockdebug x

...

rsb
  total         43743
  master        28995
  remote master 14748
  lookup master 0
  with lvb      0
  with no locks 0
  nodeid error  0

lkb
  total         53620
  granted       53619
  convert       0
  waiting       1
  local copy    23482
  master copy   15390
  process copy  14748
  rsb lookup    0
  wait message  0

This feature is still evolving, so the summary info and format
is not fixed and will change.  Once it becomes stable, I'll
probably add something like 'dlm_tool locksum <ls>' to print
just the summary without all the standard lockdebug lock state.

Signed-off-by: David Teigland <teigland@redhat.com>
cman: improve init script

based on Marian Marinov submission for gfs2 init script,
simplify the init script distro overrides to make the script
easily readable again and also easier to write.

Set also a secure PATH.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
qdisk: improve init script

based on Marian Marinov submission for gfs2 init script,
simplify the init script distro overrides to make the script
easily readable again and also easier to write.

Set also a secure PATH.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
fence_scsi: improve init script

based on Marian Marinov submission for gfs2 init script,
simplify the init script distro overrides to make the script
easily readable again and also easier to write.

Set also a secure PATH.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
rgmanager: improve init script

based on Marian Marinov submission for gfs2 init script,
simplify the init script distro overrides to make the script
easily readable again and also easier to write.

Set also a secure PATH.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
gfs2: improve init script

based on Marian Marinov submission for gfs2 init script,
simplify the init script distro overrides to make the script
easily readable again and also easier to write.

Set also a secure PATH.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
build: fix rgmanager init script Makefile

include SBINDIR bits for secure PATH

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
build: fix gfs2 init script Makefile

include SBINDIR bits for secure PATH

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
gfs: improve init script

based on Marian Marinov submission for gfs2 init script,
simplify the init script distro overrides to make the script
easily readable again and also easier to write.

Set also a secure PATH.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>