6283 Commits

Author SHA1 Message Date
Justin Clift
f7a815a2d0 features/glupy: Rename Glupy python module to avoid namespace conflict
* Rename gluster.py to glupy.py to avoid namespace conflict (#1018619)
* Move the main Glupy files into glusterfs-extra-xlators rpm
* Move the Glupy Translator examples into glusterfs-devel rpm
* Add Glupy entry to the MAINTAINERS file

BUG: 1018619
Change-Id: I48de598ba5ae8eec0e7e276bbcca1abb0e549cef
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/6979
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2014-03-24 10:31:22 -07:00
Ravishankar N
a8b03479af glusterd: op-version check for brickops.
cluster op-version must be atleast 4 for add/remove brick to proceed.
This change is required for the new afr-changelog xattr changes that
will be done for glusterFS 3.6 (http://review.gluster.org/#/c/7155/).

In add-brick, the check is done only when replica count is increased
because only that will affect the AFR xattrs.

In remove-brick, the check is unconditional failing which there will be
inconsistencies in the client xlator names amongst the volfiles of
different peers.

Change-Id: If981da2f33899aed585ab70bb11c09a093c9d8e6
BUG: 1066778
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/7122
Reviewed-by: Kaushal M <kaushal@redhat.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-24 10:23:39 -07:00
Ravishankar N
17454dfea9 glusterd: persistent client xlator/ afr changelog names
-Add a unique brick-id field to glusterd_brickinfo_t
-Persist the id to the brickinfo file
-Use the brick-id as the client xlator name during vol create, add-brick and
 replace-brick operations.
-For older volumes,generate the id in-memory during glusterd restore but defer
 writing it to the brickinfo file until the next volume set operation.
-send and receive the brick-ids during peer probe.

Feature page:
www.gluster.org/community/documentation/index.php/Features/persistent-AFR-changelog-xattributes

Related patch:
http://review.gluster.org/#/c/7122

Change-Id: Ib7f1570004e33f4144476410eec2b84df4e41448
BUG: 1066778
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/7155
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-24 04:36:02 -07:00
Raghavendra Talur
2a77659e9c glusterfsd: Remove dead code.
Previous cleanup of this function had removed some lines
which had left dead code. Just removing that.

Fix for coverity CID: 1167461 .

Change-Id: I2a34fc407ce0eb4c4ba759c8ce6574a00b37020a
BUG: 789278
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/6937
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-22 10:04:19 -07:00
Pranith Kumar K
dc6f7acaed encryption/crypt: Add mem-accounting for crypt xlator
Without these changes crypt.t crashes when compiled with -DDEBUG

Change-Id: I1f7372aa30a09dbe3ae81d1dd598cf36e17fe0b7
BUG: 1030058
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/7319
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-22 10:00:01 -07:00
Susant Palai
53194718bb Glusterd/Remove-brick: Reconfigure the nfs server volfile upon remove-brick start
Problem : For remove-brick start operation  all client volfiles are reconfigured
except nfs server volfile. Hence, even after layout is fixed by the rebalance
process, the nfs clients dont see the change and go on creating directories and
files in the decommissioned brick which leads to data loss after remove-brick
commit.

Solution : Reconfigure the nfs server volfile for remove-brick start

credit: kaushal@redhat.com
        spalai@redhat.com

Change-Id: Ib8cd8b45a9e1f888d5e00dff65cdf77c1613a2af
BUG: 1070734
Signed-off-by: Susant Palai <spalai@redhat.com>
Reviewed-on: http://review.gluster.org/7162
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-22 05:28:35 -07:00
Ravishankar N
1615103286 debug/io-stats:fix compile warning
Compiler Warning:
---------------------------------------------------------
io-stats.c: In function 'io_stats_dump':
io-stats.c:950:24: warning: comparison between 'gf1_cli_stats_op' and
'enum gf1_cli_info_op' [-Wenum-compare]
                 if (op == GF_CLI_INFO_ALL ||
io-stats.c:951:24: warning: comparison between 'gf1_cli_stats_op' and
'enum gf1_cli_info_op' [-Wenum-compare]
                     op == GF_CLI_INFO_CUMULATIVE)
                        ^
---------------------------------------------------------
Fix: Use the appropriate enum in function defintion of io_stats_dump().
Note: Using the same BZ ID as the commit that introduced this argument.

Change-Id: I24e1aaf9ab86b4f337e3daa729d561ec208f2a95
BUG: 1030580
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/7217
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-22 05:27:26 -07:00
Anand Avati
6d3739292b cluster/afr: refactor
- Remove client side self-healing completely (opendir, openfd, lookup)
- Re-work readdir-failover to work reliably in case of NFS
- Remove unused/dead lock recovery code
- Consistently use xdata in both calls and callbacks in all FOPs
- Per-inode event generation, used to force inode ctx refresh
- Implement dirty flag support (in place of pending counts)
- Eliminate inode ctx structure, use read subvol bits + event_generation
- Implement inode ctx refreshing based on event generation
- Provide backward compatibility in transactions
- remove unused variables and functions
- make code more consistent in style and pattern
- regularize and clean up inode-write transaction code
- regularize and clean up dir-write transaction code
- regularize and clean up common FOPs
- reorganize transaction framework code
- skip setting xattrs in pending dict if nothing is pending
- re-write self-healing code using syncops
- re-write simpler self-heal-daemon

Change-Id: I1e4080c9796c8a2815c2dab4be3073f389d614a8
BUG: 1021686
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/6010
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-22 05:25:57 -07:00
Niels de Vos
eb87c96f49 build: do not create versioned <xlator>.so files
There has been a misspelled option in the Makefile.am files. The option
is called -avoid-version, and not -avoidversion.

It is not trivial to provide a test-case for this. One way would be to
check generated RPMs with a command like this (output should be empty):

  $ rpm -qlp *.rpm | grep -E '/xlator/.+.so.0'

Change-Id: I2a6cc557eada4d098b73af5a254f8c75707543da
BUG: 1078365
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7299
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-03-21 17:28:15 -07:00
Kotresh H R
128863af2d geo-rep/glusterd: Fix geo-rep status on introduction of volume lock
Getting op context in 'glusterd_op_gsync_set' is no longer
        valid as it is expected that 'rsp_dict' sent from caller is
        filled. It was fine till now as no one was setting the op
        context. The introduction of volume locks sets it,
        consequently breaking geo-rep status command. Hence the
        code that gets dict from op context if present is removed.

        Also corrected some indentation issues in 'glusterd_op_gsync_set'

Signed-off-by: Kotresh H R <khiremat@redhat.com>

Change-Id: Ieacd6e6c9be3c92159f849caca2acf5aabca1e32
BUG: 1077697
Signed-off-by: Kotresh H R <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/7289
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-03-21 02:37:56 -07:00
Aravinda VK
3aeb95cfd0 geo-rep: Fix ValueError - signal only works in main thread
When a worker process not confirmed within 60 seconds of start
then monitor thread was terminated instead of stopping and restarting
the worker thread.
Before terminate monitor thread tries to add a signal handler for
SIGTERM to cleanup the stuff before terminate. Signal handling will
not work inside thread, so ValueError was raised.

This patch will not terminate monitor thread, instead only kills and
restarts the worker.

Change-Id: I14df26c0cc3097af29293c81536c13b86075e28f
BUG: 1078068
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/7294
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-03-20 23:25:43 -07:00
arvindch
d4343f0d19 fixed a few misspellings. no code changes present
Change-Id: Ia1a771301e9f1becbbffd8afd7eb68bec9696ef8
BUG: 1075417
Signed-off-by: arvindch <achembarpu@gmail.com>
Reviewed-on: http://review.gluster.org/7283
Reviewed-by: Justin Clift <justin@gluster.org>
Tested-by: Anand Avati <avati@redhat.com>
2014-03-17 16:13:31 -07:00
Luis Pabon
6224e878cd build: Remove cmockery2 from repo
While we wait for cmockery2 to be available from Fedora,
we can remove cmockery2 from the repo.

BUG: 1077011

Change-Id: I75d462c607cd376a5d838ea83f4d12eb59757e73
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/7281
Reviewed-by: Justin Clift <justin@gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-03-17 11:12:08 -07:00
AkshataDM
9565ac3328 Made spelling changes to 19 files
Change-Id: If91cf44578fe0b5176ea01ae5c5962e31606f640
BUG: 1075417
Signed-off-by: AkshataDM <oxta28@gmail.com>
Reviewed-on: http://review.gluster.org/7280
Reviewed-by: Varun Shastry <vshastry@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2014-03-16 11:57:21 -07:00
Meghana
79d2a9e5b8 Changing the errno in glfs_h_rename
Change-Id: I006215d910ee854aee488f3880f39ed425f294cc
BUG: 1075488
Reviewed-on: http://review.gluster.org/7226
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-03-12 14:28:21 -07:00
Pranith Kumar K
40b0bf5fc0 storage/bd: Fix allocations/deallocations
Change-Id: I39c9eb083fc1c144fe6f011dd983b877fbbff0f7
BUG: 1075717
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/7230
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2014-03-08 17:02:27 -08:00
Varun Shastry
0ddd69a60e features/quota: fix the dict leak when quota is off
Change-Id: Iafe0c5104e38a1e34de1f2c2a19682178eb60e11
BUG: 1075506
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/7227
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-12 11:06:18 -07:00
Anand Avati
61f071e155 locks: fix unconditional op_ret success of entrylk
Bug introduced in recent refactoring. op_ret of entrylk() was always
getting set to 0 even though second locker wouldn't have gotten a lock.
This was resulting in multiple contenders to get locks granted at the
same time.

Change-Id: I99c187a9285fb80cc500b38f468f2ebda7048cab
Signed-off-by: Anand Avati <avati@redhat.com>
BUG: 849630
Reviewed-on: http://review.gluster.org/7224
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-03-12 10:58:15 -07:00
Harshavardhana
3076f75e57 scripts: CTDB hooks should add _netdev for network mounts
Change-Id: I86ad5e9ed291866a8d478768fb447e269f51c39e
BUG: 1075182
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7221
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-11 23:45:14 -07:00
Raghavendra Talur
ecc475d0a5 hook-scripts: Move smb hooks to right place.
Moved the hook-scripts to dirs corresponding to event.
Also, edited S30samba-set.sh to with changes in
other two hook scripts to bring uniformity.

Change-Id: Ib98c0a18d4bb5d0ba4b881b2e19b40d72580b1c2
BUG: 1073468
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/7201
Reviewed-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Bala FA <barumuga@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-03-10 06:38:21 -07:00
Justin Clift
bed3fcd3a4 tests: Add initial sanity checks to the GlusterFS Test Framework
BUG: 1073168
Change-Id: I0b995d94fe83053d3294df1b5fad2eef3b4355d3
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/7193
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-03-09 23:34:37 -07:00
Ravishankar N
dec7950d4b glusterd: send/receive volinfo->caps during peer probe.
Problem: volinfo->caps was not sent over to newly probed peers, resulting in a
'Peer Rejected' state due to volinfo checksum mismatch.

Fix: send/receive volinfo capability when peer probing.

Change-Id: I2508d3fc7a6e4aeac9c22dd7fb2d3b362f4c21ff
BUG: 1072720
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/7186
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-08 23:24:08 -08:00
Satheesaran
f1c4c9e6d4 glusterd: Fixed typo in console message during volume create
While creating a volume, if the brick is created on the root
partition, then the error statement is thrown.

This error statements was containing two "is" in it.
Removed one of the "is"

Change-Id: I0d83f0feccda34989f7e2b97041d1f15ec9e2f00
BUG: 1065551
Signed-off-by: Satheesaran <satheesaran@gmail.com>
Reviewed-on: http://review.gluster.org/7198
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-08 23:22:48 -08:00
Justin Clift
e9ab4bc851 build: Don't build geo-replication rpms when on EL5
Also fixes a typo bug where geo-replication isn't
being disabled correctly

BUG: 1074045
Change-Id: I28d42637bedcc28d65b6a34ab0183559202c4aed
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/7210
Reviewed-by: Joe Julian <joe@julianfamily.org>
Tested-by: Joe Julian <joe@julianfamily.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2014-03-08 09:41:16 -08:00
Kotresh H R
82f20483f7 geo-rep: quick-fix for remote xtime set failed
Remote xtime is required for failover/failback,
this patch is quick fix to avoid the OSError.

Code is masked out, this need to be resolved when
failover/failback is worked on.

Change-Id: If339d88a2ccd8ef18a3b3c015df765c93dcb020c
BUG: 1073844
Signed-off-by: Kotresh H R <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/7206
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-07 20:14:04 -08:00
Luis Pabon
c817c21403 build: GlusterFS Unit Test Framework
This patch will allow for developers to create unit tests for
their code.  Documentation has been added to the patch and
is available here:

doc/hacker-guide/en-US/markdown/unittest.md

Also, unit tests are run when RPM is created.

BUG: 1067059
Change-Id: I95cf8bb0354d4ca4ed4476a0f2385436a17d2369
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Signed-off-by: Luis Pabon <lpabon@redhat.com>
Reviewed-on: http://review.gluster.org/7145
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Justin Clift <justin@gluster.org>
Tested-by: Justin Clift <justin@gluster.org>
2014-03-06 04:10:46 -08:00
Raghavendra Talur
a193f2262b cli: Changed log rotate command format to common format.
Problem:
The syntax of log rotate was
volume log rotate <volname> [<brick>]
All other commands are of the form:
volume <verb|noun> <volname> [<actions>|options]

Solution:
Changed log rotate command usage to common format.
Old syntax is also supported, it will be deprecated
in next release.

Change-Id: Ia6f6665185a1549c6f79ca763599b446f29e2c78
BUG: 844187
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/4594
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-03-05 21:30:51 -08:00
Jeff Darcy
1fbffa0aa4 api: add glfs_get_volfile
From the API-header description:

> Sometimes it's useful e.g. for scripts to see the volfile, so that
> they can parse it and find subvolumes to do things like split-brain
> resolution or custom layouts.  The API here was specifically intended
> to make access e.g. from Python as simple as possible.
>
> Note that the volume must be started (not necessarily mounted) for
> this to work.

Change-Id: If3f55ee9611cdf4b77aa53659f0af0d21957817d
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/7183
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-03-05 21:29:42 -08:00
Krishnan Parthasarathi
d6c1468b27 rpc: transport may be destroyed while rpc isn't
rpc_clnt object is destroyed after the corresponding transport object is
destroyed. But rpc_clnt_reconnect, a timer driven function, refers to
the transport object beyond its 'life'. Instead, using the embedded
connection object prevents use after free problem wrt transport object.

Also, access transport object under conn->lock.

Change-Id: Iae28e8a657d02689963c510114ad7cb7e6764e62
BUG: 962619
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/6751
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-03-05 21:26:59 -08:00
Poornima G
9f45d0f621 libglusterfs/inode: Fix NULL dereferences.
There could be scenarios where the inode_ctx_get() can
be called to only check if the context exists, in such
cases the buffer for the context might not have been passed.
Hence fix inode_ctx_get() to not crash, when the buffer
is not passed.

Change-Id: I607d86eb401ccab0e5cd75f6f977c454994ec063
BUG: 789278
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/7167
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-03-01 19:04:00 -08:00
Niels de Vos
7b3399cd46 Reduce logging caused by non-existing extended attributes
This changes the following log messages from INFO (default value) to
DEBUG. We do not really care if someone tries to read extended
attributes that do not exist.

    [2013-12-09 12:19:05.924497] E [posix.c:3539:posix_fgetxattr] 0-dis-rep-posix: fgetxattr failed on key system.posix_acl_access (No data available)
    [2013-12-09 12:19:05.924545] I [server-rpc-fops.c:863:server_fgetxattr_cbk] 0-dis-rep-server: 13074: FGETXATTR 1 (b8381953-ffa5-40fa-90dd-ae122335cc4b) (system.posix_acl_access) ==> (No data available)

Change-Id: Idbbeb026f81e67025a2b36d7bfeb125ad2a1f61b
BUG: 1027174
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7171
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-03-01 19:03:31 -08:00
Susant Palai
ee150bd45e cli: Rectify grammar in the "Usage" of "rebalance" command
Problem: Currently Usage of rebalance command is : " Usage: volume rebalance
<VOLNAME> [fix-layout] {start|stop|status} [force] "

1) "force" option can be only used with "start" .

2) "fix-layout" option can be only used with "start"

But the current usage says "fix-layout" operation can be stopped and can get the
status of "fix-layout" operation and also "stop" ,"status" operation can be used
with "force" option which is not correct.

Change-Id: I48e6c64c124f5803c8f09c78df0e14dc2b6a348a
BUG: 1071411
Signed-off-by: Susant Palai <spalai@redhat.com>
Reviewed-on: http://review.gluster.org/7172
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2014-03-01 19:01:32 -08:00
Justin Clift
d11d3f877d build: Add missing rpmbuild/BUILD dir for CentOS 5.x
The rpmbuild/BUILD directory isn't created automatically
by the build system on CentOS 5.x. This 1-line patch
adds its creation to the build process.

BUG: 1071504
Change-Id: I90ad70608776cb491f2ba92fb7d6044cff4defcc
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/7175
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-03-01 19:00:08 -08:00
Edward Shishkin
2010fb2bc6 Added test case for crypt translator
Change-Id: I7a28a1285c19c3279c2f71e9d9914cf14c761858
BUG: 1030058
Signed-off-by: Edward Shishkin <edward@redhat.com>
Reviewed-on: http://review.gluster.org/6504
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-02-27 22:33:32 -08:00
Niels de Vos
b0515e2a4a write-behind: track filesize when doing extending writes
A program that calls mmap() on a newly created sparse file, may receive
a SIGBUS signal. If SIGBUS is not handled, a segmentation fault will
occur and the program will exit.

A bug in the write-behind translator can cause the creation of a sparse
file created with open(), seek(), write() to be cached. The last write()
may not be sent to the server, until write-behind deems this necessary.

* open(.., O_TRUNC, ...)/creat() the file, it is 0 bytes big
* seek() into the file, use offset 31
* write() 1 byte to the file
* the range from byte 0-30 are unwritten so called 'sparse'

The following illustration tries to capture this:

    Legend:
    [ = start of file
    _ = unallocated/unwritten bytes
    # = allocated bytes in the file
    ] = end of file

    [_______________#]
     |              |
     '- byte 0      '- byte 31

Without this change, reading from byte 0-30 will return an error, and
reading the same area through an mmap()'d pointer will trigger a SIGBUS.
Reading from this range did not trigger the outstanding write() to be
flushed. The brick that receives the read() (translated over the network
from mmap()) does not know that the file has been extended, and returns
-EINVAL. This error gets transported back from the brick to the
glusterfs-fuse client, and translated by the Linux kernel/VFS into
SIGBUS triggered by mmap().

In order to solve this, a new attribute to the wb_inode structure is
introduced; the current size of the file. All FOPs that can modify the
size, are expected to update wb_inode->size. This makes it possible for
extending writes with an offset bigger than EOF to mark the unwritten
area as modified/pending.

Change-Id: If5ba6646732e6be26568541ea9b12852a5d0b988
BUG: 1058663
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/6835
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-02-27 21:56:48 -08:00
Kotresh H R
6535bafe58 geo-rep/gfid-access: Fix errno for non-existent GFID.
Because of http://review.gluster.org/#/c/6318/ patch,
ESTALE is returned for a lookukp on non-existent GFID.
But ENOENT is more appropriate when lookup happens
through virtual .gfid directory on aux-gfid-mount
point. This is avoids confusion for the consumers
of gfid-access-translator like geo-rep which expects
ENOENT.

Change-Id: I4add2edf5958bb59ce55d02726e6b3e801b101bb
BUG: 1069191
Signed-off-by: Kotresh H R <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/7154
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-02-27 21:45:31 -08:00
Krishnan Parthasarathi
a1bd3d295d socket: don't send notification 'up' on socket_writev failure
Change-Id: If4e4b95fe025a412f25313d83c780046dfec5116
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/6716
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
2014-02-27 21:28:32 -08:00
Niels de Vos
7098d6adb0 rpm: drop the glusterfs-devel dependency from glusterfs-api
This dependency was introduced when the Fedora packaging change for Bug
1016938 was (incorrectly) merged back into the upstream community
version.

Change-Id: I74a52c96533fa381e86b47f719480f00b12722ac
BUG: 1065750
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7022
Reviewed-by: Justin Clift <jclift@redhat.com>
Tested-by: Justin Clift <jclift@redhat.com>
2014-02-26 11:33:53 -08:00
Prashanth Pai
f69e855116 feature/compress: Validate option and enable doc
* Validate network.compression option
* Enable descriptions of xlator configurable options
* Improve indentation in code
* Make network.compression.mode not configurable by user.
  This is similar to "iam-self-heal-daemon" option in AFR xlator.

Fixes BUGs: 1065658, 1065640, 1065655

Change-Id: I99d82b574ee0e5c8c2baf5f5d52dbf8d015d330a
BUG: 1065640
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Reviewed-on: http://review.gluster.org/7024
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-02-26 09:18:35 -08:00
Vijaykumar Koppad
64079f8352 build: fail configure if the libxml2 devel package is missing.
Problem:
Geo-replication uses volume info xml output.
While installing glusterfs through build+install from source,
and if the libxml2-devel package is not present in the system,
build will succeed with just warning and XML output : no.
If user fails to observe this and doesn't know that
geo-rep is dependent on xml output, user won't be able use
geo-rep.

Solution:
If libxml2-devel is unavailable, and if geo-rep is enabled error out in configure,
otherwise just warn with XML_OUTPUT = no.
If the xml-output is disabled while configuring, error out if
geo-rep is enabled, otherwise just warn.

Change-Id: Icde5d0c1e5f3b869e7db6ed6a046bdc49b450fcb
BUG: 1066997
Signed-off-by: Vijaykumar Koppad <vkoppad@redhat.com>
Reviewed-on: http://review.gluster.org/7131
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-02-25 20:28:19 -08:00
Harshavardhana
fc01b0293b extras/hookscripts: Add %P as default relative root
ctdb in its monitoring script looks for the "path" variable
values at the system level not at share level.

This relative root path, if any should be default for all
volumes, to avoid issues with ctdb when doing subdirectory shares.

Error:
2014/02/21 12:50:34.355754 [41083]: ERROR: samba directory "/foodir" not available

Fix: Add %P in your smb.conf

[gluster-foodir]
...
...
    path = %P/foodir
...
...

Change-Id: If3c110d844ba8301c901dbce40b23cac99d6d55b
BUG: 1068776
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7147
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-02-24 19:56:31 -08:00
Pranith Kumar K
868287aa5f performance/io-threads: Remove code duplication
Change-Id: Ic905cc6074c796efce2972857b79ab53700a2de4
BUG: 1065657
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/7010
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-02-24 18:56:06 -08:00
Raghavendra Talur
3a5914e421 glusterd: Check for ctx before dereferencing it.
Fix for coverity CID: 1175010 & 1175011

Change-Id: Ib894fadf94c36704166ac0e2a3b6febf9b3fe446
BUG: 789278
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/7025
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-02-20 22:23:30 -08:00
Vijay Bellur
47e6c202fe rpc/socket: Avoid excessive INFO logs when SSL is not configured.
Change-Id: I7f4dd2ae4225c8d3783417d0c3d415178f04c0da
BUG: 1067011
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/7031
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-02-20 22:10:43 -08:00
Kaushal M
f1f91f8016 build: Don't discard CFLAGS in configure
The configure script was discarding the passed CFLAGS inadvertently.
This caused failures while building rpms on epel7 and fedora-{19,20}, as
the hardened CFLAGS passed by rpmbuild on these distros were discarded
which lead to the failure of rpmbuild.

Thanks to Neils de Vos for helping track this down.

Change-Id: I5b2aa5d449d13bf67df6c19cda178bddfe6c3652
BUG: 1066385
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/7029
Reviewed-by: Justin Clift <jclift@redhat.com>
Tested-by: Justin Clift <jclift@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-02-20 08:37:55 -08:00
Justin Clift
66e2e76ada Changed Amar's email address to his gmail one
Change-Id: Ia4a3d4f3e1be6dfcf0c23e8d481475927e3605da
Reviewed-on: http://review.gluster.org/7133
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2014-02-19 19:27:55 -08:00
Raghavendra Talur
9e0ec22414 protocol/auth: Fix a possible double free.
Assign NULL to addr_cpy to avoid double free.

Fix for coverity CID: 1124891

Change-Id: I0cd6721f066170190d8b5441ecdbc1704ed5e75b
BUG: 789278
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/6993
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-02-19 19:25:34 -08:00
Poornima G
ff0cd7c4e3 libgfapi: In glfs_resolve_at(), do not override the previous return value.
Overriding ret to contain glfs_loc_touchup()s' return value implies that
if glfs_loc_touchup() is successful, glfs_resolve_at() is also successful
which is not necessarily true. This was causing glfs_resolve_at() to
succeed even if it couldn't resolve, thus create and other fops would
fail. Hence overriding ret only if glfs_loc_touchup() fails.

Change-Id: I0804afbd120b3798abe07e870bfc40bf162bc289
BUG: 1066837
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/7125
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-02-19 17:09:30 -08:00
Poornima
da7972c10c mount/fuse: Fix the NULL dereference errors reported by coverity.
Change-Id: I9df57e11b115d7323931735c86b586c0b65fa414
BUG: 789278
Signed-off-by: Poornima <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/6990
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-02-17 20:50:56 -08:00
Soumya
9854ceaf9a Docs: Fixed few broken link issues in the doc admin_settingup_clients.md
Signed-off-by: Soumya <skoduri@redhat.com>

Change-Id: If01c1a34aaf6a84b3c95d56a9536b38cd9773cbe
Reviewed-on: http://review.gluster.org/7009
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-02-17 08:11:24 -08:00