extras: Added hook script to help in CTDB setup

Change-Id: Ib43cd3583e791aabc8cc25fe4eea43a620f73d01
BUG: 806996
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3188
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
log cleanup: in setxattr() path

* in posix we log occassionally if errno is ENOTSUP, added a
  suggestion to mount with 'user_xattr' option.

* changed server's *etxattr_cbk to log ENOTSUP in debug level.

* changed client's *etxattr_cbk to log ENOTSUP in debug level.

Change-Id: Icd604050aaa68546011f2c950ecd7883ac6ee820
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 811957
Reviewed-on: http://review.gluster.com/3140
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
libgluster: Fix counting, synctask state errors

When a synctask is executed in synctask_switchto, if by the time
it goes to check the woken/sleep part a reply already comes and
__wake is called, already running task is going to be put in runq
this generates a false warning "re-running already running task".

If the reply does not come before the woken/sleep check, then the
running task is put in waitq which decrements env->runcount even
when the task is not in runq, this leads to -ve runcount everytime
a task goes from runq->switchto->waitq.

This patch fixes both of them by introducing a new state for the
task called SYNCTASK_SUSPEND just when the task is suspended before
yeild in SYNCOP.

Change-Id: Ib82182cf950f9d85b5656f6243541489a104ca3d
BUG: 816551
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3249
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
cluster/afr: Fix race in nonblocking entrylk

Change-Id: I6d96c1aed4bf08b90b6918e3694c688eccdc2445
BUG: 818578
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3270
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
glusterd: Disallow (re)-using bricks that were part of any volume

Change-Id: I001a67bed1cc3118174a5ddc2f2011e8e48d8ae8
BUG: 812214
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3147
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
protocol: fix memory leak of lk-owner buffer in *lk() calls

Change-Id: I7fb0e1757c5e04b1a2609c9822ac79301808f671
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 768330
Reviewed-on: http://review.gluster.com/3244
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
RPC: change the AUTH_GLUSTERFS_v2 value to private range

As per RFC5531, the value we were using with AUTH_GLUSTERFS_v2 (6)
is already a standard number for RPCSEC_GSS. Hence having a number
from the free pool for now, till IANA approves a standard number
for GlusterFS RPC itself.

Change-Id: I10ef6f349bccf3cf42fadfa3861c374adae2a808
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 816148
Reviewed-on: http://review.gluster.com/3230
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
cluster/pump: Fixed fd leaks in pump directory traversal logic

Change-Id: Ie54c8c9b19be6824445ada6bbcd4983e90a7c5c4
BUG: 818593
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Reviewed-on: http://review.gluster.com/3267
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
glusterd: Added glusterd command specific optional args for hooks scripts.

start volume: --first=yes if the volume is the first to be started
              and --first=no otherwise

stop volume: --last=yes if the volume is the last to be stopped
              and --last=no otherwise

set volume: -o key=value ... for every key, value supplied in
            volume set command

Change-Id: Ia8530771f8b9d7424fd1c736cb4c3622b5cabec2
BUG: 806996
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3260
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
cli: fix remove-brick output behavior in failure cases

earlier it was dependant on server sending the dict for knowing
the command. Now it preserves the dictionary in frame->local,
which is used to understand the command.

Change-Id: Ica675b497e466f77878f67792ae96b71f0704d6b
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 815745
Reviewed-on: http://review.gluster.com/3235
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <shishirng@gluster.com>
glusterd/rebalance: Switch off afr self heal in rebalance process.

Self heal if any will be taken care of the self heal daemon.

Change-Id: I4f3c270b6fce250cbdf6f986066f64e7c4b2f29f
BUG: 808977
Signed-off-by: shishir gowda <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/3263
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
iobuf: option to provide larger size of buffers

provide an option to failover to standard allocation if iobuf of
required size doesn't exists. this can be achieved by keeping an
arena dedicated for all the out of boundary allocations.

Change-Id: I41a2bd7d353dc7bcb2e1a6e4b41735afe9865975
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 812784
Reviewed-on: http://review.gluster.com/3136
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
stripe: don't send parent pointer in stripe_readdirp_lookup()

Change-Id: I53e28f4046c13ad13c9300990a95480a5c62f180
BUG: 808353
Signed-off-by: shishir gowda <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/3232
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
extras/hook-scripts: Fixed EXTRA_DIST to explicitly list *.sh files

Change-Id: I48785317b42e37a6e7768c89bdb7ca8ac41220fa
BUG: 806996
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3271
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
self-heald: Don't trigger self-heal always.

- If self-heal is disabled, the crawl is always spawned but immediately
  terminated upon realizing that the self-heal-daemon is disabled. Fixed it.
- If for some reason finding child position fails, it should still spawn timer
  and should keep the timer alive until the position is found to be REMOTE.

Change-Id: I20cc6af93a1ff26f2b837bbf063bbe508b5fdc78
BUG: 810144
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3100
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
self-heald: loc should have gfid path for better logging

Change-Id: I31e51c8bd68a72ea2216df306a2f5c738c5d155c
BUG: 810144
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3099
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
mount.glusterfs: Fix log-level

Change-Id: Ia5ad073ba384e1569970ada8763a8bf9bccbc9c4
BUG: 818835
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/3272
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
swift: Gluster object storage plugin for Openstack Swift.

Change-Id: I5e07339064b1f3bb2aa5b04740ed870e114db4f9
BUG: 811430
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.com/3118
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
mgmt/glusterd: allow volume start force

Change-Id: If920bf0bf96b61b39bccbb10e66f5f39a55967f5
BUG: 812214
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/3279
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
glusterd/store: Move remove-brick/rebalance status to node_state.info

Hence forth, all node related info, which does not need chksum or
versioning can be stored in this file. This data might not be in
sync across nodes, as it contains only information related to
local node.

Change-Id: I88a48c1b7bb7b4c29625550a9ff349442bcc5d09
BUG: 812234
Signed-off-by: shishir gowda <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/3141
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>