22 Commits

Author SHA1 Message Date
Pranith Kumar K
419e5835ec tests: Add volume set tests for quorum
Change-Id: I83e0408d8fd01afe990ebf634a8a09ea0b8ea54d
BUG: 839595
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4229
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-23 23:27:55 -08:00
Pranith Kumar K
016480eb82 tests: Add volume utils in a new file
Change-Id: Ie78d24ca466d4bddc5c0727ed8ed51707e1f2a34
BUG: 839595
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4228
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-23 23:27:33 -08:00
Kaushal M
d5999c107a cli: XML output for "geo-replication <VOL> {start|stop}"
Change-Id: I8d2213cc00deb458fb765b848d0e3452574cc98f
BUG: 864499
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4217
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-23 02:08:16 -08:00
Brian Foster
d8fbd9ec2a perf/io-threads: least-rate-limit least priority throttling
The 'least-rate-limit' io-threads translator option enables
throttling of least priority operations. This is initially intended
as a debug/diagnostic tool for users who might experience
overloaded servers via background activity (i.e., self-heal).

least-rate-limit defines the maximum number of least priority
operations the io-threads translator will dequeue in one second.
If the specified rate limit is met, the worker threads sleep for
the minimal amount of time before the next least priority operation
becomes available (or until a new request arrives).

The requests/second metric is generic and relative to a variety of
factors involved with a background operation (server, storage,
etc.). The most recent measured rate ("cached least rate") is added
to the io-threads state dump content (kill -USR1) to serve as a
reference point to throttle background activity under particular
conditions.

Change-Id: I80f2282992137d57b1becaa5c6ae3858c066862a
BUG: 853680
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.org/4119
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-11-21 13:49:47 -08:00
Venkatesh Somyajulu
bc3253b070 Put _check_key_is_zero_filled outside _xattrop_index_action
Change-Id: Ifb89a3a911213b2816a540a104558e7c3c13e23a
BUG: 874498
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/4182
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-20 22:35:49 -08:00
Venkatesh Somyajulu
961bc80c7a posix: Fix volume will not start if brick has no volume-id attribute
Problem:
If the extended attribute (trusted.glusterfs.volume-id) of a brick  is
absent and <gluster volume start volume-name> command is executed then
curretly volume-id from the volume file will be set as an extended attribute of
the brick and volume will get started.
But if setup is such that brick is used as a mount point and before
executing the <gluster volume start volume-name> command, nothing is mounted on
the brick then all the file operations will take place at the brick but actual
intention of the brick is to be used as mount point only.

FIX:
Do not start the volume if extended attribute (trusted.glusterfs.volume-id)
is set absent.

Change-Id: Id2462d87d6087e97e0b8831512fdbc3595f7078b
BUG: 860297
Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com>
Reviewed-on: http://review.gluster.org/4202
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-20 00:45:59 -08:00
Pranith Kumar K
65cc8cb531 storage/posix: Make rchecksum O_DIRECT friendly
Problem:
When posix-aio is enabled to perform aio fd is set with O_DIRECT
whenever possible in read, writev fops. Rchecksum does not take
this into account. If either offset/size/memory-buf passed to
pread in rchecksum fop is not aligned, pread fails with EINVAL.

Fix:
Before doing pread necessary O_DIRECT manipulation is done when
aio is enabled. Memory buffer passed to pread is now page-aligned.

Test:
1) Create replica volume with aio enabled.
2) dd if=/dev/urandom of=a bs=1M count=1
3) kill one of the bricks in the replica pair
4) dd if=/dev/urandom of=a bs=1M count=1
5) bring back the brick. Self-heal succeeds after the change.

The test above checks both rchecksum, writev fops that were
changed in this patch.

Change-Id: I186099a2854d4864c5b48086ab7bc5f1a7b27313
BUG: 866459
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/4134
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-20 00:30:25 -08:00
Jeff Darcy
c0885f7dbb tests: make _EXPECT handle more cases
First issue is that _EXPECT wasn't handling args with spaces correctly. This
was fixed by enclosing the entire expected-value expression in double quotes
with a simple backslash escape for the end-of-line dollar sign.

Second issue is that we were throwing away potentially useful debug
information. Fixed by using egrep's -q option to suppress output, and
eliminating redirections so that we can see any stderr output related to a
script error.

Change-Id: Ide3f49558dcece55bd90cad50b1ffc572592f11c
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4126
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2012-11-19 22:38:44 -08:00
Raghavendra Bhat
2100ebd982 nfs: after resolving the entry use the linked inode instead of old inode
Change-Id: I56add0c3c852d096ec70a0e35610f46c2d12980a
BUG: 877885
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/4205
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-19 02:50:55 -08:00
Anand Avati
28994167a7 fuse-bridge: fix posix-only configuration
Recent changes in fuse-resolver had broken the use case of having
a trivial configuration with only storage/posix translator. Fix
it and include a regression test to avoid breakage in the future.

Change-Id: I85cbcac4b5c2d3517dd03fd3dc6d07610697981b
BUG: 868478
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4114
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-19 01:17:47 -08:00
Niels de Vos
702b291297 fuse: handle mountflags properly
The internal mount API had no access to the generic
mountflags used by mount(2).

Thus the "ro" mount option that needs to be passed down to mount(2) as
as a mountflag was incorrectly mangled into the fuse-specific mount
parameter string (cf. http://review.gluster.com/655).

This commit fixes the internal API and the "ro" issue. It also adds a
check for the "rw" and "ro" mount options in tests/basic/mount.t.

Thanks to Csaba Henk (csaba@) for suggestions and proposing an updated
patch.

Change-Id: I7f7bf49ae44d148f5c16f10736a0e412fb8f5e67
BUG: 853895
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4163
Reviewed-by: Csaba Henk <csaba@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-11-19 00:49:36 -08:00
Krishnan Parthasarathi
cfe51eb7ff features/locks: fcntl(3) on F_GETLK must return first conflicting lock
- Added test program, getlk_owner.c to capture the bug when regressed.

Change-Id: Ic2a0f6fa8d094c0f2e9f4a6febd278d4a2948223
BUG: 869724
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4164
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-18 22:43:59 -08:00
Rajesh Amaravathi
cb884f7eac nfs: do not change root inode if enable-ino32 is set
When a user sets nfs.enable-ino32 on,
the root inode, which must be 1, is jumbled during
hashing of the gfid into 32 bits.
This patch avoids doing that, and returns inode of 1
for the root inode.

Change-Id: Ib65f2660998a95e1059be32bc298485c5cbe52df
BUG: 864222
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/4154
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-18 09:43:04 -08:00
Kaleb S. KEITHLEY
4e1c921636 NFS is picking up geo-rep's already open (read-only) file descriptor
Add anonymous member to fd_t and use it instead of over-loading pid for
geo-rep and self heal

Change-Id: I4d6b29a044a8ed4b8f69ff6e3f35ee227739b2af
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
BUG: 874272
Reviewed-on: http://review.gluster.org/4185
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-14 05:37:02 -08:00
Krishna Srinivas
1c4cb52377 ACLv3 - Access Control Lists V3
Change-Id: I43e544d6cdeac5e3880141477461e7c22cbf6e91
BUG: 847622
Signed-off-by: Krishna Srinivas <ksriniva@redhat.com>
Reviewed-on: http://review.gluster.org/4045
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-11-13 23:24:46 -08:00
Rajesh Amaravathi
d55acadd85 nfs: resolve parent inode during inode_loc_fill
This commit resolves the parent inode in nfs_inode_loc_fill
if the inode has a resolved path.

Change-Id: If407c91c246b0b9f3349cedae0baec8bd6831d10
BUG: 872923
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.org/4157
Reviewed-by: Krishna Srinivas <krishna.zresearch@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-11-12 23:59:59 -08:00
Jeff Darcy
128514fcb7 socket: fix SSL breakage from re/connect handling changes
Change-Id: Ia1f5aeec5628b61cad8a10a9cdc6d9f1c67ec653
BUG: 873367
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4158
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-12 07:17:13 -08:00
Raghavendra Bhat
7997d36ce3 xlator/fuse: integrate fuse with event-history
use event-history framework for saving and dumping (on necessity)
important xlator specific information.

Tests:
Included the regression testcase.

Change-Id: I6c0532e9ffe0b624286cdc4d2637b1bd2c0579e0
BUG: 858215
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Signed-off-by: root <root@thinkpad.(none)>
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-on: http://review.gluster.org/3925
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-12 02:24:23 -08:00
Varun Shastry
0d9a38bb57 features/quota: Failure of quota commands if the dir-name contains ':' in it
PROBLEM:
The first colon in the limit string is used to separate the path and the
limit-value. The ':' in the path was the source of problem.

FIX:
Search for the last colon and separate based on the same.

Added regression test.
TEST:
Create and set quota on directories with names containing ':' in start, middle
and end.

Change-Id: I363c8ad4cbfd02c23fc73974bef9aa8bc362d29c
BUG: 848251
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/4137
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-11-09 02:44:04 -08:00
Krutika Dhananjay
0608244512 cli: Mark port as N/A in volume status when process is not online
Change-Id: Ie11c7331e3bc58c0f934f424dde4341cdffb9e2c
BUG: 861542
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/4048
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-10-30 23:07:47 -07:00
Amar Tumballi
0d868525d2 glusterd: fix for remove-brick on just created/stopped volumes
in a fix to avoid race between stopping the brick and deleting
it in remove-brick (15396f490d23c665d51a64a049679cb40472ab05)
we moved delete of the brick inside stop volume, which was
totally inside the 'if (volinfo->status == STARTED)' section.
thus it made remove-brick of stopped/created volume as a failure.

Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 867252
Change-Id: Ie251e59a0b7ddb6965d8d48fb2a3bdb3bd11653d
Reviewed-on: http://review.gluster.org/4127
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Jeff Darcy <jdarcy@redhat.com>
2012-10-24 09:49:30 -07:00
Anand Avati
bb41c8ab88 tests: pre-commit regression tests
Framework for writing test cases to be submitted with patches.

This framework and the test cases get exercised by Jenkins in
the pre-commit regression test. Jenkins is configured to give
a +1 verified vote only if the regression test passes without
failures (which includes test cases added/changed by the patch
being tested)

Every patch should include a test case (either extensions/changes
to existing test cases or add new ones, as appropriate). The test
case should be part of the same commit so that both code and
test case get reviewed together.

Test cases added are cumulative. Every new patch gets
tested against its own test case and every test case previously
added.

A lot of new commits in the near future will be pure test cases
(with no code change) which will get added in "catch up" mode.

The tool used for implementing test cases is 'prove', and the
framework itself is modeled similar to the POSIX compliance
filesystem test suite.

Under the top level directory, a new directory named 'tests/'
is added. This contains top level classifier directories and
framework files/scripts.

Functionality tests should be created under a classifier directory
below 'tests/'. For e.g:

  tests/basic/mount.t
  tests/performance/write-behind.t

Bugs which get fixed should include a test case script named
by the bug id, so that we are guaranteed any new change will
not bring the issue back. For e.g:

  tests/bugs/bug-123456.t

Triggering of regression tests in Jenkins is manual at this point
as we do not want the entire test suite to run against every
revision of a patch while it is still in the review/resubmit cycle.

Signed-off-by: Anand Avati <avati@redhat.com>

Change-Id: I8078244619135ccaba38e068925f8ca85141055a
BUG: 764966
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4101
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-10-18 14:17:25 -07:00