6868 Commits

Author SHA1 Message Date
Emmanuel Dreyfus
4bbaf4615b Fix glustershd detection on volume restart
On NetBSD and FreeBSD, doing a 'gluster volume start $volume force' causes
NFS server, quotad, snapd and glustershd to be undetected by glusterd once the
volume has restarted. 'gluster volume status' shows the three processes
as 'N' in the online column, while they have been launched successfully.

This happens because glusterd attempts to connect to its child processes
just between the child does a unlink() on the socket in
__socket_server_bind() and the time it calls bind() and listen().
Different scheduling policy may explain why the problem does not happen
on Linux, but it may pop up some day since we make no guaranteed
assumptions here.

This patchet works this around by introducing a boolean
transport.socket.ignore-enoent option, set by nfs and glustershd,
which prevents ENOENT to be fatal and cause glusterd to retry and
suceed later. Behavior of other clients is unaffected.

BUG: 1129939
Change-Id: Ifdc4d45b2513743ed42ee235a5c61a086321644c
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8403
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-25 23:06:34 -07:00
ggarg
c2a0e3f722 cli: Fixing ambiguous message error for rebalance <volname> start command
Previously output message of command 'gluster volume rebalance <volname>
start/start force/fix-layout start' was ambiguous and poorly formatted.
Previously output message was: "volume rebalance: <volname>: success:
Starting rebalance on volume <volname> has been successful."

Now with this fix properly formatted output message is:
"volume rebalance: <volname>: success: Rebalance on <volname> has been
started Successfully. Use rebalance status command to check status of
the rebalance process."

Change-Id: I23268fc13b05d1b39ffe4c702d0e4f73085acd1c
BUG: 1087487
Signed-off-by: ggarg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/7473
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-25 23:04:22 -07:00
Vijaikumar M
ec257d019c glusterd: Parsing key/value pair with value containing '='
Parsing key/value pair in the brickinfo file, where value contains '='
would truncate everything after '=' in value.

For example:
A key/value pair
mnt-opts=rw,noatime,allocsize=1MiB,noattr2

is parsed as:
mnt-opts=rw,noatime,allocsize

BUG: 1132451
Change-Id: I756b2fc4b06875267212b1a5c3e91c5a40c6accb
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/8524
Reviewed-by: Sachin Pandit <spandit@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-08-25 09:02:15 -07:00
Pranith Kumar K
b87f92c0ee mount/fuse: Handle fd resolution failures
Problem:
Even when the fd resolution failed, the fop is continuing on the
new graph which may not have valid inode. This lead to NULL layout
subvols in dht which lead to crash in fsync after graph migration.

Fix:
- Remove resolution error handling in FUSE_FOP as it was only added
  to handle fd migration failures.
- check in fuse_resolve_done for fd resolution failures and fail the
  fop right away.
- loc resolution failures are already handled in the corresponding
  fops.
- Return errno from state->resolve.op_errno in resume functions.
- Send error to fuse on frame allocation failures.
- Removed unused variable state->resolved
- Removed unused macro FUSE_FOP_COOKIE

Change-Id: I479d6e1ff2ca626ad8c8fcb6f293022149474992
BUG: 1126048
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8402
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-25 09:00:56 -07:00
Vijay Bellur
11beb72ef0 features/changelog: barrier all entry creation fops
when a snapshot is taken, there are chances of entry creation fops
not being recorded either in changelog or through the recursive
ancestry xtime updation by marker. This causes consumers of changelog
(primarily geo-replication as of today) to not be aware of these entries
after a snapshot is restored. This can lead to inconsistencies. This patch
is an interim workaround to barrier creates till changelog becomes completely
crash consistent.

BUG: 1128093
Change-Id: Ie0dbfd74beecb88df5c2ddf9fc680af91547c3f3
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/8517
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: ajeet jha <ajha@redhat.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
2014-08-25 08:36:58 -07:00
jonKSA
85afebed24 doc: Update admin_guide for hadoop.
Current version of admin_Hadoop.md contains an 
obsolete set of instructions.Changes are purely 
textual; no code changes.Linking to a community 
site extends the viability of the doc and allows 
instructions to keep pace with future versions.
Instructions have been validated.

Change-Id: Ie330b2a23513ae140d3cd5f19af3045fff3bc9d5
BUG: 1132105
Signed-off-by: jonKSA <cope.jonathan@gmail.com>
Reviewed-on: http://review.gluster.org/8505
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-25 08:27:24 -07:00
Nithya Balachandran
3f019874a4 Cluster/DHT : Additional log messages
Adding log messages in the rename and lookup calls to
help with debugging.

Change-Id: I13b1c6f98fb49ead45362550c46359ab1f9028c0
BUG: 1130888
Signed-off-by: Nithya Balachandran <nbalacha@redhat.com>
Reviewed-on: http://review.gluster.org/8516
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
2014-08-24 21:55:19 -07:00
Pranith Kumar K
75dfbf7091 tests: metadata self-heal tests
Change-Id: Idef49b22018908c0a2ed95852b0670a91a750eba
BUG: 1132913
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8515
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-08-23 20:36:01 -07:00
Pranith Kumar K
bc38d56466 cluster/afr: Perform metadata sync inside metadata locks
Change-Id: Ie55b3d37cacbdad74a3f63c3b0f025b0ffd0104a
BUG: 1132461
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8514
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
2014-08-22 02:33:09 -07:00
Pranith Kumar K
3b70b160a4 cluster/afr: Perform gfid heal inside locks.
Problem:
Allowing lookup with 'gfid-req' will lead to assigning gfid at posix layer.
When two mounts perform lookup in parallel that can lead to both bricks getting
different gfids leading to gfid-mismatch/EIO for the lookup.

Fix:
Perform gfid heal inside lock.

BUG: 1129529
Change-Id: I20c6c5e25ee27eeb906bff2f4c8ad0da18d00090
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8512
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
2014-08-22 02:31:57 -07:00
Harshavardhana
60f12dfbc8 client: client3_3_readdir() - initialize `local` properly
A crash is observed in the following scenario on OSX

~~~
(gdb) p readdir_rsp_size
$1 = 1552
GLUSTERFS_RPC_REPLY_SIZE == 24
GLUSTERFS_RDMA_MAX_HEADER_SIZE == 228

((1552 + 24 + 228)) == 1804

GLUSTERFS_RDMA_INLINE_THRESHOLD == 2048

if ((readdir_rsp_size +
 GLUSTERFS_RPC_REPLY_SIZE +
 GLUSTERFS_RDMA_MAX_HEADER_SIZE) > GLUSTERFS_RDMA_INLINE_THRESHOLD)
  ----> False
~~~

``local`` is never initialized leads to NULL reference later.

This patch makes sure that local is initialized, correctly as its
done in client3_3_readdirp() call.

Change-Id: I46931fc96900b7740ae71536c954bb9deda5c879
BUG: 1132796
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8511
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Raghavendra G <rgowdapp@redhat.com>
2014-08-22 00:28:59 -07:00
Sachin Pandit
aa9b19e4b3 glusterd/snapshot : Fail the snapshot create operation if geo-rep is running.
As one of the recommandations for taking a snapshot is not to have
an active geo-replication session, its better to display an error
saying session is active when snapshot create command is issued.

Change-Id: I94593dbd2659610e033ca316176dda1ac8dc5ce6
BUG: 1129038
Signed-off-by: Sachin Pandit <spandit@redhat.com>
Reviewed-on: http://review.gluster.org/8461
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-08-21 23:57:11 -07:00
Emmanuel Dreyfus
865d156d30 Fix quotad RPC options use-after-free bug in gluster
In cli/src/cli.c:cli_quotad_clnt_rpc_init(), dict_unref (rpc_opts)
causes the options to be freed while code in rpc/rpc-transport/socket
still relies on it. The options are corrupted when memory is reallocated,
which sometimes leads to a crashes on NetBSD when socket_connect()
attempted to read options.

Fix the problem by not doing the dict_unref(). Make sure the rpc_opts
are freed on error, though.

BUG: 1129939
Change-Id: If1d6ea50cc3e1599e9e369863c8db0c0694d3671
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8502
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-08-21 20:30:14 -07:00
Pranith Kumar K
f83067f2a9 cluster/afr: Set pending changelog based on filetype for new entries
Change-Id: Ib6eea2dfe43aacf1f3446cc023adecbcf8645d48
BUG: 1132102
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8506
Reviewed-by: Anuradha Talur <atalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-08-21 07:53:47 -07:00
Kotresh H R
bbb7da5abe geo-rep/glusterd: API to check active geo-rep session for the volume
Requirement:
Snapshot needs an API to fail the CLI if any geo-rep session is active
for that volume.

Solution:
A function "gd_vol_is_geo_rep_active" is provided to check if any
geo-rep session is active for that volume. An in memory dict called
'gsync_running_slaves' is maintained in 'volinfo' structure to keep
track of active geo-rep session for the volume. The key
'slavenode::slavevol' with value 'running' is added whenever geo-rep
is started/resumed into the dict and the same is removed if
stopped/paused. So the 'count' in dict is used to decide whether the
geo-rep is active or not for that volume.

Also added "this->name" in gf_log in routines which this patch is
touched.

Change-Id: I2b5de7dd686541c6b89c0fd0f7a4dbc92eecfac5
BUG: 1129008
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/8459
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-08-21 04:53:14 -07:00
Emmanuel Dreyfus
33be39b42f Regression test portability: mktemp
Linux mktemp accepts to run without a template, NetBSD mandates it. Since
the template option has the same syntax, add it everywhere. While there,
also do this in scripts outside of regression testing.

BUG: 764655
Change-Id: I3ec140afbc9009257c81a56d77afcc21fef74cc4
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8432
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-20 13:46:44 -07:00
Emmanuel Dreyfus
a521fc1d22 Regression test portability: sha1sum
Provide a shell function for sha1sum if missing

BUG: 764655
Change-Id: I8b232af8aab7f95ba7c7ad83e37a111d562201a5
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8450
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-20 13:42:46 -07:00
Emmanuel Dreyfus
011b3fc4af Regression test portability: dd
Use dd msgfmt=quiet also in truncate replacement

BUG: 764655
Change-Id: I5ad022c1dc65ecc98996ccbe8a3d0e9de162aa1a
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8464
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-20 13:42:04 -07:00
Emmanuel Dreyfus
28a2c9ee39 Regression test portability: 127.0.0.0/8
On Linux, the host answers any address in  127.0.0.0/8
On NetBSD, any address must be configured with ifconfig lo0 alias before
it can be used.

BUG: 1129939
Change-Id: Ia628716c104d955817a95e0c5e04ead924bb4847
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8483
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-20 13:41:43 -07:00
Emmanuel Dreyfus
473f115cbf Regression test portability: mount
Address various portability-related problems related to mount
- In order to address the non-portability of NFS mount options,
  use the mount_nfs shell function everywhere, and use it to
  translate options.
- Make sure NFS mounts are unmounted before shutting down the
  daemons in order to avoid deadlock. The change is done in every
  test that did not unmounted NFS mounts at the end of the script,
  and in global cleanup function as well. The force_umount shell
  function from volume.rc was duplicated as umount_nfs in nfs.rc
  so that we do not have to add an include on volume.rc for all
  NFS tests that do not need it.
- The FUSE mount type on NetBSD is puffs|perfuse|fuse.glusterfs
  instead of just fuse.glusterfs, make the regexp configurable
  in include.rc
- Finding wether the mount is RO or RW in mount output needs
  a system-dependent command configurable in include.rc
- mount options in /proc/mounts may be limited to "rw", adjust
  the regexp for this case where there is no comma

And while there change rm into rm -f in tests/basic/mount.t
for removal opearation that should fail, since rm may ask
for confirmation

Change-Id: I1fb708486ec350b2885e2404879561c1020fa8fd
BUG: 1129939
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8494
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-20 13:41:08 -07:00
Krishnan Parthasarathi
22d5361cec client: Add ping-timeout to statedump
The ping timeout value of a client xlator can be seen by,

># cat $META/graphs/active/vol-client-0/private |grep ping_timeout
ping_timeout = 42

where $META is /<fuse-mountpt>/.meta

Change-Id: I4f68f184fc3f30871269a23fc4a82a1378396058
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/8321
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-19 23:53:23 -07:00
Patrick Uiterwijk
c42339ef09 who-wrote-glusterfs: use the set $GITDM_REPO variable
Change-Id: Ic119f83fff3930e164f3c81df1c9b60d5eb2d99f
BUG: 1131272
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Reviewed-on: http://review.gluster.org/8495
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.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>
2014-08-19 23:34:39 -07:00
Aravinda VK
d0a3b4307e geo-rep: Fixing issue with xsync upper limit
While identifying the file/dir to sync, xtime of the file was compared
with xsync_upper_limit as `xtime < xsync_upper_limit` After the sync,
xtime of parent directory is updated as stime. With the upper limit
condition, stime is updated as MIN(xtime_parent, xsync_upper_limit)

With this files will get missed if `xtime_of_file == xsync_upper_limit`

With this patch xtime_of_file is compared as
xtime_of_file <= xsync_upper_limit

BUG: 1128093
Change-Id: I5022ce67ba503ed4621531a649a16fc06b2229d9
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/8439
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-19 23:27:26 -07:00
Niels de Vos
9b5231e5c9 NFS: stripe-xlator should pass EOF at end of READDIR
NFS READDIR replies are made of a header, a sequence of
entries, and a EOF flag. When GlusterFS's NFS server is
used along with stripe xlator, it fails to set the EOF
flag, which violates NFS RFC and confuses some clients.

The bug is caused because nfs xlator sets EOF if it gets
op_errno set to ENOENT. That value is produced in storage
xlator and propagated through server, client, and other
xlators until stripe xlator handles it. stripe only passed
op_errno if op_ret < 0, which is not the case here. This
change set adds a special case for that situation to fix
the problem.

Change-Id: Ie6db94b0515292387cfb04c1e4a9363f34fcd19a
BUG: 1130969
Reported-by: Emmanuel Dreyfus <manu@netbsd.org>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/8493
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
2014-08-19 05:23:09 -07:00
Shyam
6630fff481 cluster/dht: Fix dht_access treating directory like files
When the cluster topology changes due to add-brick, all sub
volumes of DHT will not contain the directories till a rebalance
is completed. Till the rebalance is run, if a caller bypasses
lookup and calls access due to saved/cached inode information
(like NFS server does) then, dht_access misreads the error
(ESTALE/ENOENT) from the new subvolumes and incorrectly tries
to handle the inode as a file. This results in the directories
in memory state in DHT to be corrupted and not heal even post
a rebalance.

This commit fixes the problem in dht_access thereby preventing
DHT from misrepresenting a directory as a file in the case
presented above.

Change-Id: Idcdaa3837db71c8fe0a40ec0084a6c3dbe27e772
BUG: 1125824
Signed-off-by: Shyam <srangana@redhat.com>
Reviewed-on: http://review.gluster.org/8462
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-18 10:28:15 -07:00
Emmanuel Dreyfus
ba0f31b2a5 Regression test portability: stat
Linux uses stat -c, stat --printf= or stat --printf
NetBSD uses stat -f with different format strings. This change set
changes all stat usage to stat -c and introduce a shell stat()
fonction to perform the format string translation.

BUG: 764655
Change-Id: I024fca7c1b736b053f5888cbf21da0a72489ef63
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8424
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-18 01:09:39 -07:00
Emmanuel Dreyfus
c80b5b915a Regression test portability: mkdir
mkdir -v (verbose) is not portable, just remove it.

BUG: 764655
Change-Id: If344792caf977698abe0bf497d9083bc9333df55
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8463
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-18 01:05:28 -07:00
Emmanuel Dreyfus
41a22836fd Enable aux-gfid-mount option on non Linux systems
The aux-gfid-mount works on non Linux systems, and it is required
to pass tests/basic/gfid-access.t

BUG: 764655
Change-Id: Ic6c8ef425e091440a139bbd25fadbf4f82e378cb
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8446
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-18 00:55:38 -07:00
Aravinda VK
2510af1674 geo-rep: Handle RMDIR recursively
If RMDIR is recorded in brick changelog which is due to
self heal traffic then it will not have UNLINK entries for
child files. Geo-rep hangs with ENOTEMPTY error on slave.

Now geo-rep recursively deletes the dir if it gets ENOTEMPTY.

BUG: 1129702
Change-Id: Iacfe6a05d4b3a72b68c3be7fd19f10af0b38bcd1
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/8477
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2014-08-14 19:56:41 -07:00
Venkatesh Somyajulu
718f10e0d6 cluster/dht: Added keys in dht_lookup_everywhere_done
Case where both cached  (C1)  and hashed file are found,
but hash does not point to above cached node (C1), then
dont unlink if either fd-is-open on hashed or
linkto-xattr is not found.

Change-Id: I7ef49b88d2c88bf9d25d3aa7893714e6c0766c67
BUG: 1116150
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>

Change-Id: I86d0a21d4c0501c45d837101ced4f96d6fedc5b9
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/8429
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: susant palai <spalai@redhat.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-14 10:59:08 -07:00
Harshavardhana
8116328a6b porting: FreeBSD related changes to regression scripts
- json_verify do not use '/usr/bin' let bash evaluate the location
- TEST for test code compilation `bug-1051896.t`, `bug-1058663.t`,
  bug-905864.t
- run-tests.sh - better checks for installed packages

Change-Id: Ic7feda36ddfc082c609aabd75da2e9a8f59a92b3
BUG: 1111774
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8435
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
2014-08-13 22:01:27 -07:00
Kaleb S. KEITHLEY
37b31605c6 rdma: glusterfsd SEGV at volume start
glusterfsd NULL ptr deref in proto/server: get_frame_from_request()
with 'transport rdma' volume

no test case, our regression test framework doesn't have Infiniband.
If it did, the test case would be to create a 'transport rdma' volume,
start it, and create/write/read/delete files on the volume.

Change-Id: I91a6956bdf8f61f3853e0c0951744460ba138576
BUG: 1129708
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/8479
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-13 10:31:53 -07:00
Emmanuel Dreyfus
5fe2233a82 NetBSD /dev/fuse detection
NetBSD's FUSE being pure userland implementation, there is no /dev/fuse
to open. Test /dev/puffs (kernel fs-in-userland subsystem supporting FUSE)
insead.

BUG: 764655
Change-Id: Ia65e95c246dc31ea2839cf64d7c851430828542e
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8478
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-08-13 08:30:38 -07:00
Ravishankar N
250210a36b tests: trigger entry heals by lookup
Trigger entry heals explicitly by lookup until heal full is fixed in
afr v2 to do conservative merge.

Change-Id: I474b518045bebcf399bc414caff3b415259381d6
BUG: 1127148
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/8465
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2014-08-13 02:53:01 -07:00
ggarg
c03e07b414 glusterd: Coverity fix for going out of scope leaks of directory pointer
In function volgen_apply_filters() directory stream associated with
"filterdir" should be close after opening directory stream corresponding
to directory name. closedir() also closes the underlying file descriptor
associated with "filterdir".

Coverity CID: 1124723

Change-Id: I78ed04047ded98bf95d201afed01c727aa506882
BUG: 789278
Reviewed-on: http://review.gluster.org/8088
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
2014-08-13 02:51:18 -07:00
Harshavardhana
fd6765b4a3 porting: OSX/Darwin 10.9 porting issues
xdrproc_t() arguments are variadic and non-variadic

On OSX > 10.9
-------------
typedef bool_t (*xdrproc_t)(XDR *, void *, unsigned int);

On OSX < 10.9
------------
typedef bool_t (*xdrproc_t)(XDR *, ...);

FreeBSD all versions
------------
typedef bool_t (*xdrproc_t)(XDR *, ...);

NetBSD 6.1.4
-----------
typedef bool_t (*xdrproc_t)(XDR *, const void *);

Linux all versions
-----------
typedef bool_t (*xdrproc_t)(XDR *, void *,...);

This weird and odd implementations across various platforms
should be handled properly.

Change-Id: Iad8b7da2e5b82526bf3708cff31ab10ce09f59c9
BUG: 1128820
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8458
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-08-12 09:02:10 -07:00
Pranith Kumar K
a66a483be2 cluster/afr: Fix mem-leak
Problem:
local->xattr_req is already reffed with xattr_req that comes
in lookup fop. But when afr_lookup_xattr_req_prepare is called
local->xattr_req is over-written with dict_new() which leads
to ref leak on the dict which came in lookup fop

Fix:
Create local->xattr_req only when it is NULL

Change-Id: Ib1548f2df97688859f2cace44b93b3b733297c36
BUG: 1128801
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/8457
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-08-11 22:22:26 -07:00
Harshavardhana
c77a77ef0f osx: Enable qemu feature build on Darwin
Change-Id: Ie5d437aa6c52c180fd8d54680c5f882e75c0bf7e
BUG: 1089172
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8448
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-08-11 09:02:51 -07:00
Emmanuel Dreyfus
ccb5dc01b8 Always build EC xlator
Now EC xlator does not require MMX anymore, always build it.

BUG: 764655
Change-Id: I50a64e22c080f2759eaa57786e7f69c34f11f89c
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8451
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-10 15:14:09 -07:00
Harshavardhana
a1dff6498a osx: snapview-server fails to build on OSX use 'syscall.h'
Change-Id: I29aeb32a972ed6d19e779b9e79fce9a489848497
BUG: 1089172
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8436
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-08-09 22:53:06 -07:00
Emmanuel Dreyfus
b97ade3b05 Search zlib without pkg-config
NetBSD has zlib installed in base system and no .pc file for it. In
order to discover it, fallback to AC_CHECK_LIB is PKG_CHECK_MODULES
fail to find it.

This enables cdc xlator, and we pass tests/basic/cdc.t

BUG: 764655
Change-Id: Ide84402aa38edc2709d12e2530401c6b8c722529
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8437
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-09 15:29:26 -07:00
Emmanuel Dreyfus
31a0dbb21e Regression test portability: xargs
Linux xarg complains about an empty input, while NetBSD xargs does not.
This breaks tests where xargs is in a pipe after a command that should
be tested. Make sure we test the first command without xargs

BUG: 764655
Change-Id: I754d7d52332221c462ce3594f4e8d8d62ae606d5
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8280
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-08-08 16:21:46 -07:00
Humble Chirammal
76b7268001 mount: Verify mount failure in mount.glusterfs wrapper.
The result of mount command execution is not checked properly, thus
no proper message given for the end user. This patch fix the same.

Bug Id: 1128165
Change-Id: I3882e34e840ed15b5ce48ed5e1ad51208e2be913
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/8438
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2014-08-08 16:17:02 -07:00
Kaleb S. KEITHLEY
84cfd657e5 extras/LinuxRPM: error in Makefile.am
Change-Id: I50de95ca6eff09338ce4a6f9f2b42aeccd10cae2
BUG: 1128192
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/8444
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
2014-08-08 07:23:59 -07:00
Emmanuel Dreyfus
8c837b8e2a Wrong test in self-heal.t
self-heal.t checks for gfid before and after an operation, but fails
to do it on the same file since the prefix is not the same: undefined
$B1 before and $B0 after.

The errorcause the test to fail on NetBSD. I do not know how this test
could pass on Linux before.

BUG: 764655
Change-Id: I6df1175e177855afca1736cf8c847c51fe407576
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8431
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2014-08-07 22:01:56 -07:00
Harshavardhana
2ec6ea43f2 build: make GLUSTERD_WORKDIR rely on localstatedir
- Break-way from '/var/lib/glusterd' hard-coded previously,
  instead rely on 'configure' value from 'localstatedir'
- Provide 's/lib/db' as default working directory for gluster
  management daemon for BSD and Darwin based installations
- loff_t is really off_t on Darwin
- fix-off the warnings generated by clang on FreeBSD/Darwin
- Now 'tests/*' use GLUSTERD_WORKDIR a common variable for all
  platforms.
- Define proper environment for running tests, define correct PATH
  and LD_LIBRARY_PATH when running tests, so that the desired version
  of glusterfs is used, regardless where it is installed.
  (Thanks to manu@netbsd.org for this additional work)

Change-Id: I2339a0d9275de5939ccad3e52b535598064a35e7
BUG: 1111774
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8246
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-08-07 01:17:29 -07:00
Emmanuel Dreyfus
f29da9bcc8 Regression test portability: truncate, md5
Add shell functions to replace truncate and md5, which are Linux specific
Resubmit because of failed regression test with no apparent cause

BUG: 764655
Change-Id: I07200cf886bd52904a5cf63c66f43f0b1cc91540
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8341
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-06 04:49:14 -07:00
Harshavardhana
9978e61dc5 tests: weighted-rebalance.t shouldn't write to '/dev/tty'
On our jenkins instance "/dev/tty" doesn't exist, necessary
output fails as below message

~~~
./tests/features/weighted-rebalance.t: \
         line 72: /dev/tty: No such device or address
~~~

Comment out the debugging code

Change-Id: Iba29b80c8ba2dcaab3d6654d7c54332a915bffb8
BUG: 1114680
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8421
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-06 04:39:20 -07:00
Humble Chirammal
8111756d0f libglusterfs: wrong function definition of synclock_destory().
synclock_destory() has been prototyped in syncop.h,
how-ever synclock_destroy() is the actual function used in syncop.c.
Correcting this function definition along with few typos.


Change-Id: I35a818190c1d37c303279ca7a820f01895751bd9
BUG: 1075417
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/8266
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-06 01:29:28 -07:00
Ravishankar N
ef60640dfa doc: afr-locks and its evolution
History and current state of how AFR uses the inode and entry locks
provided by the locks xlator

Thanks to Pranith for patiently explaining this.

Change-Id: I25d21c6361e95aa0b3edcffe9b3b9e470f488bc6
BUG: 1118309
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/8364
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-05 03:44:53 -07:00