348 Commits

Author SHA1 Message Date
Jeff Darcy
1dbe9a05fe glusterd: allow multiple instances of glusterd on one machine
This is needed to support automated testing of cluster-communication
features such as probing and quorum.  In order to use this, you need to
do the following preparatory steps.

* Copy /var/lib/glusterd to another directory for each virtual host

* Ensure that each virtual host has a different UUID in its glusterd.info

Now you can start each copy of glusterd with the following xlator-options.

* management.transport.socket.bind-address=$ip_address

* management.working-directory=$unique_working_directory

You can use 127.x.y.z addresses for binding without needing to assign
them to interfaces explicitly.  Note that you must use addresses, not
names, because of some stuff in the socket code that's not worth fixing
just for this usage, but after that you can use names in /etc/hosts
instead.

At this point you can issue CLI commands to a specific glusterd using
the --remote-host option.  So far probe, volume create/start/stop,
mount, and basic I/O all seem to work as expected with multiple
instances.

Change-Id: I1beabb44cff8763d2774bc208b2ffcda27c1a550
BUG: 913555
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4556
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-21 17:27:56 -08:00
Krutika Dhananjay
673287ae4d glusterd: use gf_strdup() in place of strdup()
Change-Id: Idee71019dbc6eeaa0a808d671b29d6f3038a1a89
BUG: 913487
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4562
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-02-21 06:26:42 -08:00
Pranith Kumar K
96c61c5512 call-stub: remove fall-through in ftruncate
Change-Id: I58bf6b881ff63d627051bef1ab30bd0337ab65e2
BUG: 913544
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4564
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2013-02-21 06:18:52 -08:00
Raghavendra Bhat
e4b504d624 testcase for the open-behind xlator when open fails
Test if the fops which are put into a stub and are waiting for
the open to complete should be unwound with the error if open
call itself fails.

Change-Id: I8c363d98303a7df1a0ca9ea6ef207c7123fdd388
BUG: 846240
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4553
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2013-02-20 13:04:52 -08:00
Avra Sengupta
bcb423555a glusterd: Added validation function for performance cache max and min size.
Change-Id: I0b8dbc4b65412b8aff24873f030c03e3dcfcb988
BUG: 782095
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4541
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-19 18:58:30 -08:00
Pranith Kumar K
2c8e3bcb4f Tests: Disable open-behind
Test assumes that open on the mount point opens the files on bricks
right away.
Change-Id: I94aae857515792e9b694723d30bb085f9e703745
BUG: 821056
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4540
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-19 16:09:07 -08:00
Raghavendra Bhat
f1ce56daf8 performance/open-behind: use anonymous fd for doing fstat and readv
Change-Id: I61a3c221e0a15736ab6315e2538c03dac27480a5
BUG: 846240
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4483
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-19 16:07:21 -08:00
Kaleb S. KEITHLEY
fd407a4f5c glusterfs.spec.in: resync with Fedora glusterfs.spec
remove extraneous pwd and ls, left-overs from debugging regression
failures

BUG: 819130
Change-Id: I9bc058bbbfd78218153737751481171f21001e6e
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/4547
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-19 10:21:10 -08:00
Kaushal M
81dceec250 tests: Add spaces around '=' in a string comparision in TEST primitive
Change-Id: I0402949c8cd88cc93e073a7c8ae60b5ff4497ad2
BUG: 764966
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4538
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-02-18 22:01:45 -08:00
Jeff Darcy
59ac567c8b distribute: add hash-name-regex option
This is to support the common "write to temp file then rename" idiom. In our
case this causes us to create a linkfile during the rename in (N-1)/N cases,
with a significant impact on performance e.g. for UFO which uses this idiom.
This patch allows the user to specify up to two regular expressions that
separate the permanent and transient parts of a temp-file name:

    rsync-hash-regex reimplements the existing RSYNC_FRIENDLY_NAME
    pattern where the temporary name for EXAMPLE is .EXAMPLE.suffix

    extra-hash-regex can be used for a second pattern, active concurrently,
    and can include alternatives via the POSIX extended-regex syntax

Change-Id: Ic1a6ed19324bc31fefe91ee34b8478877a9c5d2c
BUG: 912564
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4116
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-18 20:50:48 -08:00
Kaleb S. KEITHLEY
84f5e4b354 glusterfs.spec.in: resync with Fedora glusterfs.spec
Resync with Fedora's glusterfs.spec, being careful to preserve recent
additions to the glusterfs.spec.in such as the package-config for -devel
and the OCF sub-package

To build a set of RPMs:
 % ./autogen.sh
 % ./configure --enable-fusermount
 % make dist
 % cd extras/LinuxRPM && make glusterrpms

Updated rpm.t, hopefully build system has all the dependencies to build UFO

BUG: 819130
Change-Id: I1b1c161337ad780cf7d3ab401fa1b10648f38cbd
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/4454
Reviewed-by: Peter Portante <pportant@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-17 19:32:02 -08:00
Vijay Bellur
6c848529cb libglusterfs: Fix memory leaks in fd_lk_insert_and_merge
Change-Id: I666664895fdd7c7199797796819e652557a7ac99
BUG: 834465
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/4525
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-17 17:03:40 -08:00
Raghavendra Bhat
614529c591 rpc: bring in root-squashing behavior in rpc
* requests coming in as root are converted to nfsnobody

* with open-behind some acl checks wont happen and nfsnobody
  can read the file "whose owner is root and other users do not
  have permission to read the file". This is becasue open-behind
  does not send the open to the brick and sends success to the
  application, thus the acl related tests on the file wont happen
  which would have prevented the file from being opened.

Change-Id: I73afbfd904f0beb3a2ebe807b938ac2fecd4976b
BUG: 887145
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4516
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-17 12:01:55 -08:00
Avra Sengupta
7f2ebe378b glusterd: Made log-rotate use synctask framework.
Change-Id: Ib305168759db6730dfa0045da99de252eb5e9469
BUG: 852147
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4478
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-13 17:46:59 -08:00
shishir gowda
a42490385d cluster/dht: Create linkfile with file uid/gid
Currently, linkfile creation happens as root.

use uid/gid returned from _cbk (link/rename) to set the correct ownership of
the link files.

Also added test/dht.rc to implement common dht functions

Change-Id: Iecdcf52d89fed8286670ce430b9d19deebd27b8c
BUG: 884597
Signed-off-by: shishir gowda <sgowda@redhat.com>
Reviewed-on: http://review.gluster.org/4304
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-13 16:17:44 -08:00
Pranith Kumar K
30dd16a44c Tests: Remove 'sleep' from the test case
Change-Id: Iaff2076b0ef7f69a6ba6efd4123271bde490977a
BUG: 873962
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4498
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-08 21:59:05 -08:00
Pranith Kumar K
4e05a9c64b Tests: Explicitly set eager-lock on
Change-Id: I834fd5adab6e328ed106e413fc06e4280d1d24b2
BUG: 888174
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4497
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-08 19:20:09 -08:00
Krutika Dhananjay
7c0d35b2e7 glusterd: harden 'volume start' staging to check for brick dirs' presence
PROBLEM:

When the brick directory of a volume is absent on any of the servers,
AND an attempt is made to start the volume, commit fails ONLY on the
node where the brick dir is absent, leading to a split-brain like
situation.

FIX:

Harden 'volume start' to check for the presence of brick directories
at the time of staging, thereby preventing commit failure.

Change-Id: I67faeb9afbd3aa76f08645924462db126bf7a977
BUG: 889996
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4365
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-08 19:13:36 -08:00
Venky Shankar
19de18219b cluster/dht: pathinfo xattr changes for directories
Since directories have presence on all subvolumes there is
no definite meaning of ->hashed_subvol or ->cached_subvol.
getxattr() code path chooses ->cached_subvol for pathinfo
extended attribute. While this makes sense of files, it makes
less sense for directories. Further if a hashed or a cached
subvolume is down, and there's a getxattr request for a
directory, we return with an errno.

This patch changes pathinfo extended attribute contents by
aggregating information from all subvolumes that are up.

Change-Id: I58adb741d63ccfd1d0239af75eb65f26f0fb384d
Signed-off-by: Venky Shankar <vshankar@redhat.com>
BUG: 856455
Reviewed-on: http://review.gluster.org/4047
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-08 19:09:46 -08:00
Avra Sengupta
bbd6fb6e98 glusterd: Making volume-reset use synctask framework
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Change-Id: Ib25c8fa69d84b8132505ae3f1e67cf88d3f6f9ec
BUG: 852147
Reviewed-on: http://review.gluster.org/4474
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-08 19:05:50 -08:00
Raghavendra Bhat
fcf004a16c tests/bugs/bug-762989.t: do not check the listening ports
Change-Id: Ifbcf28bb476ee95343beaf42fb84a1b834c9ffcb
BUG: 762989
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4486
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-08 17:39:02 -08:00
Pranith Kumar K
bbf7345adc Tests: Fixes to state-dump gen function
Change-Id: I426e04a4e3d402639a052c6b3616157c36fefc56
BUG: 908146
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4484
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-08 11:40:03 -08:00
Jeff Darcy
da9d54cac6 dht: better layout-optimization algorithm
This method deals with the case where swapping might gain a bigger overlap
for the xlator currently under consideration, but sacrifices even more from
the xlator we're swapping with. For example:

A = 0x00000000 - 0x44444443 (new 0x00000000 - 0x55555554)
B = 0x44444444 - 0x77777776 (new 0x55555555 - 0xaaaaaaa9)
C = 0x77777777 - 0xffffffff (new 0xaaaaaaaa - 0xffffffff)

Here, the new range for B has a bigger overlap with the old C than with the
old B (0x33333333 vs. 0x22222222 to be precise) so looking only at that
might lead us to swap. However, such a swap turns the new C's overlap from
0x55555556 (vs. old C) to *zero* (vs. old B).  In other words, we've gained
0x11111111 for B but lost 0x55555556 for C, so it's a bad idea.

The new algorithm accounts for all effects of the swap, so it not only avoids
bad swaps but can make some good ones that would have been missed previously.
For example, if swapping a range X with a later range Y would not increase the
overlap for X we would previously have skipped it even if the swap would
increase Y's overlap without affecting X's.  This is the normal case when we're
adding a new brick (which initially has zero overlap with any old range) so
finding more good swaps is probably even more important than avoiding bad ones.

Also, the logic in dht_overlap_calc was completely broken before, causing
integer overflows instead of providing correct values, so no matter what
higher-level algorithm was in place the GIGO effect would have resulted in
bad decisions.

Change-Id: If61ed513cfcb931916c6b51da293e3efbaaf385f
BUG: 853258
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/3908
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-07 08:27:40 -08:00
Krutika Dhananjay
7a9e270737 glusterd: synctaskize 'volume create' operation
.. and also move brickpath validation to volume create stage

Change-Id: Ia028677932ca5f6aa05dcf624f47033b62e7b212
BUG: 862834
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4213
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-06 23:39:52 -08:00
Anand Avati
45c04e107c open-behind: translator to perform open calls in background
This is functionality peeled out of quick-read into a separate
translator.

Fops which modify the file (where it is required to perform the
operation on the true fd) will trigger and wait for the backend
open to succeed and use that fd.

Fops like fstat() readv() etc. will use anonymous FD (configurable)
when original fd is unopened at the backend.

Change-Id: Id9847fdbfdc82c1c8e956339156b6572539c1876
BUG: 846240
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4406
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2013-02-06 13:16:08 -08:00
Raghavendra Bhat
6b292ff33f libglusterfs/core: dump frame and callstack creation times in statedump
Change-Id: I3772602ac264cbca490d77a0343038297faee7df
BUG: 844688
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4087
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-06 12:18:49 -08:00
Pranith Kumar K
242c12bf60 tests: Test the open-fd count for a file on brick
Change-Id: I59bc4974eff93e92c4f7041d3722ac60e88b0734
BUG: 908146
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4471
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-06 09:50:51 -08:00
Pranith Kumar K
2dbc9a53a1 tests: Added function to generate brick statedump
Change-Id: I5f394a028a3251ec673c8787b2c67691a8b57449
BUG: 908146
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4470
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-06 09:50:10 -08:00
Venkatesh Somyajulu
1c430d2747 glusterd: "volume heal info" doesn't report output properly
Problem: "volume heal info" doesn't reports files to be healed when gluster*
         processes on one of the storage node is not running

Change-Id: Iff7d41407014624e4da9b70d710039ac14b48291
BUG: 880898
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/4371
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-04 17:41:16 -08:00
Krishnan Parthasarathi
99c86cc5ae tests: Made changes to verify if any of the bricks crashed
Change-Id: I9da3b8a490159b1090a803b74d0058be0d884c94
BUG: 905864
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4461
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-04 08:45:09 -08:00
Raghavendra Talur
2a46c8769b cluster/dht: Correct min_free_disk behaviour
Problem:
Files were being created in subvol which had less than
min_free_disk available even in the cases where other
subvols with more space were available.

Solution:
Changed the logic to look for subvol which has more
space available.
In cases where all the subvols have lesser than
Min_free_disk available , the one with max space and
atleast one inode is available.

Known Issue: Cannot ensure that first file that is
created right after min-free-value is crossed on a
brick will get created in other brick because disk
usage stat takes some time to update in glusterprocess.
Will fix that as part of another bug.

Change-Id: If3ae0bf5a44f8739ce35b3ee3f191009ddd44455
BUG: 858488
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/4420
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-04 08:43:50 -08:00
Krishnan Parthasarathi
6b262d2094 locks: Protected racy (read) access of ext_list
Change-Id: Ibf639695ebd99c11c6960c9be82c0cee71b50744
BUG: 905864
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4458
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-03 12:16:07 -08:00
Venkatesh Somyajulu
06a411edbe test: Removed "for" loop of check_xattr function.
Change-Id: I902a5f86d72df3efb45dba09eaa2e8be8b65edf6
BUG: 802417
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/4435
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-03 11:46:38 -08:00
Pranith Kumar K
e4811fd339 Tests: util to check if replace brick completed
Change-Id: I7748395395454765a35e34611d11f58dd4ef3efb
BUG: 857549
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4450
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2013-02-03 11:44:13 -08:00
Pranith Kumar K
f0724402d1 Tests: Basic pump test case
Change-Id: I94666debd5ec271ce5404a77efc421c12928e134
BUG: 857549
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4451
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-03 11:37:44 -08:00
Pranith Kumar K
5fa1ebe636 test: test re-opens of open-fds
Change-Id: Ic99c7f3cf1f6a381b0fc1b2ca1acc19f5fe75523
BUG: 821056
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4387
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-03 11:35:49 -08:00
Pranith Kumar K
5c01280de7 tests: Added util functions
Added functions to extract gfid, gfid-str
function to check if a file is open
deleting gfid-link of a file

Change-Id: If2f39f43a6631cddb68b4ba7febcd3cf66f399ee
BUG: 821056
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4386
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-03 11:34:55 -08:00
Varun Shastry
315ee9c4e0 cluster/dht: stack wind with cookie
Default_fops uses stack_wind_tail. It winds without creating the frame leading
into wrong subvol return in the cookie. To avoid the problem caused by the
same, we're getting the subvol by passing the cookie.

Change-Id: I51ee79b22c89e4fb0b89e9a0bc3ac96c5b469f8f
BUG: 893338
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/4388
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2013-01-31 17:18:03 -08:00
Anand Avati
b5a6d4bd97 fuse-bridge: fix some breakages from lock migration patch
- do not attempt lock migration if no locks were ever acquired on
  an fd.

- fix fd_lk_ctx_t ref leak during fd migration

- remove spurious fd_unref() (probably added to compensate for
  the fd_ref leak in syncop_open_cbk)

- remove @newfdptr out-param which makes fd ref management really
  tricky (and currently refs were unmanaged for the out-param).
  Instead acquire ref and unref within lock migration function.

Change-Id: I4cc9c451f0df4c051612bd1fa7bef11e801570e4
BUG: 808400
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4453
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
2013-01-30 23:43:49 -08:00
Raghavendra Bhat
5592194924 762989.t: fix a typo by grepping only the blocked port number from netstat o/p
Change-Id: I14c3daa799f0936014bf8aa9fd798ecbaec6e912
BUG: 762989
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4426
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-30 10:40:41 -08:00
Avra Sengupta
b8d5fd2b88 glusterfs : Moved option files, and statedumps from /tmp
Change-Id: Ibdede396c4d6859225937316b7a59a661bcaf9f5
BUG: 764890
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4422
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-29 15:27:29 -08:00
Raghavendra Bhat
326a47939d cluster/afr: if a subvolume is down wind the lock request to next
When one of the subvolume is down, then lock request is not attempted
on that subvolume and move on to the next subvolume.

/* skip over children that are down */
                while ((child_index < priv->child_count)
                       && !local->child_up[child_index])
                        child_index++;

In the above case if there are 2 subvolumes and 2nd subvolume is down (subvolume
1 from afr's view), then after attempting lock on 1st child (i.e subvolume 0)
child index is calculated to be 1. But since the 2nd child is down child_index
is incremented to 2 as per the above logic and lock request is STACK_WINDed to
the child with child_index 2. Since there are only 2 children for afr the child
(i.e the xlator_t pointer) for child_index will be NULL. The process crashes
when it dereference the NULL xlator object.

Change-Id: Icd9b5ad28bac1b805e6e80d53c12d296526bedf5
BUG: 765564
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4438
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-29 12:50:55 -08:00
Pranith Kumar K
7cc5edb3dc Tests: Test functionality of flush/fsync with afr
Change-Id: I307a77e90e1852f5e43d50e347f7b52468105389
BUG: 888174
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4447
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-29 12:34:16 -08:00
Anand Avati
4cbb14cf6f quick-read: various fixes
- initialize xdata in qr_lookup even if it was NULL from top. This
  allows qr to do its job even if lookup originated from fuse-resolve.c

- extend test cases to include 1 second delay and retry

- fix bug while checking condition for cached unwind

  qr_readv_cached() unwinds if op_ret > 0. Therefore qr_readv()
  must wind to subvol only if !(op_ret > 0) (i.e, op_ret <= 0).

- qr_readv_cached() is using uninitialized @conf pointer. Thanks
  to Raghavendra Bhat for catching this!

Change-Id: Ifaf2ea2685e452210ef9ba3c2d1f2ab51900650c
BUG: 846240
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4452
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-01-29 11:56:42 -08:00
Raghavendra G
088050b257 performance/io-cache: propagate errors while unwinding frame in
read path.

Change-Id: Ieb5d592a987e8681d5ec019da309f75e3b207580
BUG: 858242
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Reviewed-on: http://review.gluster.org/4204
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-29 11:01:34 -08:00
Niels de Vos
f811441e25 tests: skip time consuming mock builds for code-only changes
tests/basic/rpm.t takes a bulk of the time for the regression tests.
Often the building of the rpm is not affected at all and therefor the
tests does not add any value.

With this change the rpmbuild/mock test will only be run when some
changes affect the build system. Changes affecting 'tests/', 'doc/',
'*.py', *.c' and '*.h' do not trigger the test anymore.

Change-Id: Ic188b9e26cde3113b2bdf9cd1fab56d9fd85a4b7
BUG: 904005
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4429
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-29 10:29:03 -08:00
Pranith Kumar K
c3f1c0c18a mgmt/glusterd: Expose post-op-delay through cli
Change-Id: I13e3699bd58d53896ae54e1bfafb3cd1c9580c7c
BUG: 905307
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4443
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-01-28 23:25:34 -08:00
Pranith Kumar K
15716cfe7a Tests: Fix latency calculation
Idea is to make sure that the FINODELK max latency is not
in the order of seconds.

Change-Id: Ic47dc46c3b2d24d223fe7e2212c4c035de37c9ae
BUG: 895235
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4434
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-01-28 18:45:11 -08:00
Anand Avati
54c68942b4 bug-765564.t: fix path for file to rename
The script assumed it was chdir'ed into the mount point while it
was not. There also happened to be (conincidentally) a directory
of name 'a' in the workspace. The first the script was run, the
rename succeeded. All future tests are failing as the directory
already exists.

Change-Id: I92ad62e7893c03bb3f2af75c51d35bc35866dafe
Signed-off-by: Anand Avati <avati@redhat.com>
BUG: 765564
Reviewed-on: http://review.gluster.org/4442
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-01-28 13:50:07 -08:00
Anand Avati
cc96adbe46 quick-read: refactor
- peel out 'open behind' functionality into a separate translator
- issue where, if file size had grown by revalidate, data was not flushed
- removed unnecessary acquistion of table->lock (e.g in qr_lookup())
- keep inode ctx persistent, prune only data (effectively changing the
  order of lock acquisition from INODE -> TABLE)
- validation with readdirplus
- use variable size iobufs to simply cached reads

Change-Id: If1586d0298fd1697ddff9fd7008efb3d286d436a
BUG: 846240
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4403
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2013-01-28 12:35:57 -08:00