glusterd: log enhancements for volume start

* changed some of the log messages to give as much information as
  available in case of failure

* added logs to identify on which machine lock/stage/commit failed

* added macros to represent error strings to maintain uniformity
  among error messages for a given kind of error

* moved error logs wherever possible, from caller to callee to avoid
  code duplication

Change-Id: I0e98d5d3ba086c99240f2fbd642451f175f51942
BUG: 812356
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4353
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
glusterd: Made dst brick's port info available to all peers

Change-Id: I1f65743a31d95013fdf22cded91c314e9934a3a9
BUG: 816915
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.org/3275
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
cli: Fix task-id xml compilation

Change-Id: I92ada7d5ba1eb46024f47c4f32c517db27ada576
BUG: 857330
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4342
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
glusterd: Set replace-brick id in op ctx only in origin glusterd

Change-Id: I8282f911fb47f4cfb45947b2810d84105c82b5ff
BUG: 889999
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4352
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
glusterd: Add GF_ASSERT check in glusterd volume op handlers

Change-Id: Iea6ac1e612812ba8ffc4b60899a9e574a3b09ea6
BUG: 873549
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4346
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
glusterd: fix memory corruption when probe fails

Change-Id: If161e9bebfd518b355aaf37af7805e804772dc2d
BUG: 893851
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4372
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
tests: make EXPECT_WITHIN also fail on command failure

Change-Id: I051bbe2344f19e647826ee177932ae8b95747ebd
BUG: 764966
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4334
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Changes to support automake-1.13

automake-1.13 obsoletes some macros that were being used. This patch replaces
these macros.

Change-Id: I2a24a923f284e9b54fb57ccc27eb0b5ad8dd6050
BUG: 892882
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4368
Tested-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
extras: Changed the exit status in start function to 0.

Problem:
We were returning "1" when "glusterd start" was being called with service
already running. As per
http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
we should consider it to be a success case and return 0.

Fix:
Just changed the return status from 1 to 0.

Change-Id: I8d6d2014f0c32ba53834503e721e2a71df7330a8
BUG: 845653
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/4348
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>