7737 Commits

Author SHA1 Message Date
Nandaja Varma
b828932c14 bd: coverity fixes, removing logically dead code and correcting checks
Coverity CIDs:
    1128910
    1128911
    1128913
    1128912
    1134020

Change-Id: I2d871723fbfe43f9ff6b3beba7a99b0d81d4aff5
BUG: 789278
Signed-off-by: Nandaja Varma <nvarma@redhat.com>
Reviewed-on: http://review.gluster.org/9588
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-30 00:42:49 -07:00
arao
f2c1261123 protocol-client: Removal of Dead Code
CID: 1124448
CID: 1124449
Removal of the dead code in the 'out' label.

Change-Id: Ibdd05cbb6e2204f6aefdf442698225883c2d7734
BUG: 789278
Signed-off-by: arao <arao@redhat.com>
Reviewed-on: http://review.gluster.org/9676
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-30 00:40:04 -07:00
arao
dcff68eb2e symlink-cache: Fixing coverity issues
CID: 1124389
Misspelt variable leading to dead code
and memory leak, corrected.

Change-Id: I1278f07f81e2db33640e0f289558d919343cb6ce
BUG: 789278
Signed-off-by: arao <arao@redhat.com>
Reviewed-on: http://review.gluster.org/9694
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-30 00:36:29 -07:00
arao
9272b1cf56 bd: Fixing dereference after null check(FORWARD_NULL)
CID: 1128907
The pointer variable 'bdatt' redirected to a goto label
when the value was NULL and in the other condition when it is not NULL
, hence the bdatt is again checked for NULL at 'reverse xattr' label.

Change-Id: I2289cbf30fde9faf97e6eebd4902953a44049f9e
BUG: 789278
Signed-off-by: arao <arao@redhat.com>
Reviewed-on: http://review.gluster.org/9619
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-30 00:33:49 -07:00
arao
059e085752 protocol-client: Removal of Logically dead code.
CID: 1124447
The values of the pointer varibale checked,
before going to out label was always NULL,
hence dead code related to that is removed.

Change-Id: I0f9b84c7feb34072814557ddd023f2ae1c64ef7e
BUG: 789278
Signed-off-by: arao <arao@redhat.com>
Reviewed-on: http://review.gluster.org/9646
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-30 00:28:51 -07:00
Manikandan Selvaganesh
2355012f38 cli : logically dead code removed
CID : 1124396
      1124398

Change-Id: I708703529bbfe78c295523d2f4b85a55566a6249
BUG: 789278
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/9606
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-30 00:09:35 -07:00
Manikandan Selvaganesh
49d68945c0 io-stats : null dereference coverity fix.
CID      :1124502

Change-Id: I2911be340e8e48a52e951d0f04f6a96f3c219fab
BUG: 789278
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/9659
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-30 00:08:28 -07:00
Manikandan Selvaganesh
d680cbb47a protocol-client : dead code removed.
CID             : 1124415,1124416,
                  1124417,1124418,
                  1124419,1124420,
                  1124425,1124426,
                  1124427,1124428,
                  1124445,1124446.

Change-Id: Ib140b8907f4548f41fccb8044772397760fff835
BUG: 789278
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/9643
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-29 23:57:16 -07:00
Manikandan Selvaganesh
298e94f804 protocol/client : logical dead code removed
CID :112438{2,3,4,5}
         11244{03,04,05,06,07,08,09,10,11,12,13,14,30,31,32,33}
         11244{34,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60}
         11244{61,62,63,64,65,66,67,68,69,70}
         1128902

Change-Id: I1b53aeee83209728d5711540210d19314f4165bc
BUG: 789278
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/9601
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-29 23:55:48 -07:00
Manikandan Selvaganesh
b7d8567145 posix : unchecked return value coverity fix.
CID   : 1124364

Change-Id: I1e16e3ff46b191ba2ea527e628c77a99a56f6c31
BUG: 789278
Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com>
Reviewed-on: http://review.gluster.org/9667
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-29 23:54:24 -07:00
shravantc
683145ae2a doc : editing admin_ACLs.md
Updating control entries

Change-Id: Iad5c9dcdf03fe987d1048078db6158f0e7c737a8
BUG: 1206539
Signed-off-by: shravantc <shravantc@ymail.com>
Reviewed-on: http://review.gluster.org/10027
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anjana Sriram <asriram@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
2015-03-29 22:56:04 -07:00
Atin Mukherjee
3b647e1012 glusterd: Use txn_opinfo instead of global op_info in glusterd_volume_heal_use_rsp_dict
Due to http://review.gluster.org/#/c/9908/ global opinfo is no more a valid
place holder for keeping transaction information for syncop task.
glusterd_volume_heal_use_rsp_dict () was referring to global op_info due to
which the function was always asserting on the op code.

Change-Id: I1d416fe4edb40962fe7a0f6ecf541602debac56e
BUG: 1206655
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/10034
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-by: Venky Shankar <vshankar@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>
2015-03-29 19:46:00 -07:00
Atin Mukherjee
d5a9607598 glusterd : fix memory overrun for opinfo.local_xaction_peers
Due to incorrect sizeof local_xaction_peers was not allocated as intended which
lead a memory overrun in gf_free while freeing local_xaction_peers.

Change-Id: Ie4d63289aae51727eea091bce0e6cb0a496ce7cf
BUG: 1204727
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/10032
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org>
Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-03-29 19:40:28 -07:00
Jeff Darcy
0934432c51 socket: use TLS 1.2 instead of 1.0
Change-Id: I96e9b37e4855f5e12b2dbecf1f0b0887b21ad5ad
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/9949
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-27 11:29:33 -07:00
Krutika Dhananjay
651514dd66 features/shard: Bug fixes
* Return number of bytes written in writev cbk on success
* Eliminate separate inode table for sharding xlator.
* Fix appearance of "shard" as an option within the
  volfile for subvolume of type features/shard.
* Fix values of min and max allowed shard block size
* Return @new as opposed to NULL in shard_create_gfid_dict() on success

Change-Id: I6319d377a196d1c5ceed1f65d337ff8eabcb21f8
BUG: 1205661
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/10003
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-27 11:27:24 -07:00
Niels de Vos
eeef9bf8c9 md-cache: cache virtual POSIX ACL xattrs
http://review.gluster.org/9627 introduces two new virtual extended
attributes that are used similar to the existing POSIX ACL xattrs. These
new xattrs should get cached in the same way.

BUG: 1185654
Change-Id: I6294b4f9ade887e29f8bd8ae5a3642891df8a631
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9947
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-27 10:45:12 -07:00
Anoop C S
bc71cc3988 features/trash: Removing dead callbacks
Since ftruncate create, mkdir, writev, readv and
unlink calls are being re-directed to corresponding
truncate calls, we no longer need their cbks. So
removing those cbks for now.

Change-Id: I41ecde7093a555b3bf69b66afaa8eca835b4982a
BUG: 1132465 
Signed-off-by: Anoop C S <achiraya@redhat.com>
Reviewed-on: http://review.gluster.org/10002
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-27 10:43:23 -07:00
Kaleb S. KEITHLEY
ff6accece4 build: attr package dependency
Already fixed in the Fedora dist-git glusterfs.spec

Change-Id: Icad7c4527d4b83417cbb81957e7b5da8b4d36368
BUG: 1184627
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/10016
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-03-27 09:52:19 -07:00
Pranith Kumar K
28c446a4ea features/snapview-client: Don't free un-allocated memory
Change-Id: I8636ced27448dde4f2c11370fe2026067d4a7e74
BUG: 1203637
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/10004
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-27 05:19:42 -07:00
Pranith Kumar K
1f655aed1e cluster/ec: Use fd when appropriate for updating size/version
Change-Id: I5d3aca101c8cdda406d31d06c40404fa6a2b7170
BUG: 1192378
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/9995
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
2015-03-27 05:19:17 -07:00
Jeff Darcy
764ce1e2f6 tests: fix spurious failures in bug-1190734.t (remove-brick)
This is the second leading cause of spurious failures, including those
in tests for other spurious-regression-failure fixes (creating a bit of
a "catch 22" situation).  While these failures have been hard to
reproduce except during full regression-test runs, two changes have been
made that might make this test more resilient to certain types of
failures.

 * Use a specific "ls" instead of a general "find" to list/count only
   the files we're interested in, without (possibly) including transient
   artifacts from the "remove-brick" command.

 * Retry the file count up to five times, just in case there are other
   transient conditions causing it to yield the wrong result.

Also, "inlining" some of the functions for removing the brick might help
to highlight exactly which command within those functions was failing.

Change-Id: I5a462b91fb4e04d9e9a53cc60f9db11b89101107
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/10013
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-27 04:09:05 -07:00
Venky Shankar
d331c31963 geo-rep: Use gfchangelog context init API
With the RPC based changes to {libgf}changelog, changelog_init
is required before changelog_register.

Change-Id: Id125b2bd2e51aaaffa22ecab463dfb739c50d83c
Signed-off-by: Venky Shankar <vshankar@redhat.com>
BUG: 1170075
Reviewed-on: http://review.gluster.org/9993
Reviewed-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Tested-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-03-27 02:04:09 -07:00
Pranith Kumar K
d15dedd8c9 xlators/lib: Handle NULL 'name' for marker xattrs
Change-Id: I18f00b7e92f483673250821c457d1e8be2eef081
BUG: 1200372
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/10015
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-27 00:21:33 -07:00
anand
c8a723ac7c glusterd: clean up global xaction_peer occurances
Remove xaction_peers from glusterd_conf_t which was left out by
http://review.gluster.org/#/c/9980/ patch

Change-Id: I8494ec181ec11922861d7bad12c46d45e036637b
BUG: 1204727
Signed-off-by: anand <anekkunt@redhat.com>
Reviewed-on: http://review.gluster.org/10006
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>
2015-03-26 21:00:11 -07:00
Soumya Koduri
bf8a5c9f21 tests: Added a script to test the glfs_fini hang fix
The script has been added as '.sh' instead of '.t' to avoid regression 
tests failure which may happen due to instability of glfs_fini.

In addition, there is still some support needed to compile libgfapi* 
tests in our current regression test framework.

BUG: 1093594
Change-Id: If66817f330320e8c092340008b36616e1d954127
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/8092
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-03-26 12:26:38 -07:00
Jeff Darcy
02c0457901 tests: fix rebalance_completed
This was causing spurious faiures in bug-884455.t and possibly
elsewhere.

Change-Id: Iad6b7515ca0c7c485300f79dcd2477efc76877f8
BUG: 1163543
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/9994
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
2015-03-26 11:44:52 -07:00
Pranith Kumar K
c54e546040 glfsheal: Do not print pending heals for non-afr xls
Change-Id: Ib9a1998b964af1435e86de2c861ecb1c0e9026c9
BUG: 1203637
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/10005
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Anuradha Talur <atalur@redhat.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-03-26 04:12:20 -07:00
Niels de Vos
01d96d97f1 nfs: do not fail to start when optional RPC-programs fail to register
Some RPC-programs are not strictly required for the NFS-server. When
these optional protocols fail to get registered at the portmapper, there
is no need to fail the starting of the NFS-server.

Required RPC-programs:
 - NFS
 - MNT

Optional RPC-programs:
 - NLM
 - ACL

Change-Id: Ife8ad871cff47554e3f42eb457c76431d0181964
BUG: 1205579
Tested-by: Brad Hubbard <bhubbard@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9988
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
2015-03-26 03:05:56 -07:00
Atin Mukherjee
c8e095765c cli: log gluster version in cli init
Change-Id: I4994043d303212da795c76867a7ee4355d318a8c
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/9951
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-03-26 00:17:36 -07:00
Atin Mukherjee
7cd5899426 glusterd: clean up global xaction_peer occurances
With http://review.gluster.org/#/c/9972/ there is no more need to maintain
xaction_peers in glusterd_conf_t. This patch cleans up code for all the
occurances of xaction_peers.

Change-Id: I4fbf2df0fa9b8a8751029be36be7f76f6464cc76
BUG: 1204727
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/9980
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-03-26 00:12:32 -07:00
Atin Mukherjee
087ad8a001 glusterd: Maintain local xaction_peer list for op-sm
http://review.gluster.org/9269 addresses maintaining local xaction_peers in
syncop and mgmt_v3 framework. This patch is to maintain local xaction_peers list
for op-sm framework as well.

Change-Id: Idd8484463fed196b3b18c2df7f550a3302c6e138
BUG: 1204727
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/9972
Reviewed-by: Anand Nekkunti <anekkunt@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>
2015-03-26 00:10:45 -07:00
Anoop C S
f64666f113 features/ctr: Removing rpc-lib, rpc-xdr and api from CPPFLAGS
Changetimerecorder doesn't seem to use rpc-lib, rpc-xdr
and gfapi in the source. So removing those from Makefile.am

Change-Id: I21c71db6212c10ba3821c6c456958a45c5312d41
BUG: 1198849
Signed-off-by: Anoop C S <achiraya@redhat.com>
Reviewed-on: http://review.gluster.org/9997
Reviewed-by: Joseph Fernandes <josferna@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-03-25 12:02:27 -07:00
Pranith Kumar K
21cd43cfd6 libxlator: Change marker xattr handling interface
- Changed the implementation of marker xattr handling to take just a
  function which populates important data that is different from
  default 'gauge' values and subvolumes where the call needs to be
  wound.
- Removed duplicate code I found while reading the code and moved it to
  cluster_marker_unwind. Removed unused structure members.
- Changed dht/afr/stripe implementations to follow the new implementation
- Implemented marker xattr handling for ec.

Change-Id: Ib0c3626fe31eb7c8aae841eabb694945bf23abd4
BUG: 1200372
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: http://review.gluster.org/9892
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-25 11:10:40 -07:00
vmallika
18dd162e00 posix: handle failure from posix_resolve
When building ancestory, posix_resolve gets the inode
from the gfid. We need to handle the failure case from
this function

Change-Id: I19f0f0c739686b1b0ef96309212aa1c7911b3589
BUG: 1203629
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/9941
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
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>
2015-03-25 09:11:34 -07:00
Joseph Fernandes
00863dde39 Fixing build of xlator/cluster/dht/src/dht-rebalance.c when tiering is disabled
1) Removed unnecessary include tier.h in dht-rebalance.c
2) tier xlator will only compile when tiering is enabled in configure.ac

Change-Id: Ia21aa9ff403506dc898a83236e9e2d382a0594da
BUG: 1204604
Signed-off-by: Joseph Fernandes <josferna@redhat.com>
Reviewed-on: http://review.gluster.org/9973
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Sachin Pandit <spandit@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-03-25 06:23:10 -07:00
Gaurav Kumar Garg
1579d633db glusterd: bitrot scrub-throttle/scrub-frequency/scrub option handling
CLI commands for bitrot features:
volume bitrot <volname> {scrub-throttle frozen|lazy|normal|aggressive}
volume bitrot <volname> {scrub-frequency daily|weekly|biweekly|monthly}
volume bitrot <volname> {scrub pause|resume}

These commands will handle their options and set respective value in
dictionary.

Change-Id: I1e8aa1b1c7d91a7f0faec9a2968b3072f42f8ba8
BUG: 1170075
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/9985
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-25 04:58:59 -07:00
Kaushal M
91708968d0 glusterd: Prevent possible dealock in glusterd_friend_remove
This change was developed on the git branch at [1]. This commit is a
combination of the following commits on the development branch.
  b02290e Prevent possible dealock in glusterd_friend_remove

[1]: https://github.com/kshlm/glusterfs/tree/urcu

Change-Id: I1efeaf18f2054f4252ee95244908613542d209d9
BUG: 1205186
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/9979
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Gaurav Kumar Garg <ggarg@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>
2015-03-25 04:36:57 -07:00
Kaushal M
891c7d0fad glusterd: Prevent possible deadlock due to glusterd_quorum_count
Also rename the macro glusterd_quorum_count to GLUSTERD_QUORUM_COUNT so
that it stands out as a macro.

This change was developed on the git branch at [1]. This commit is a
combination of the following commits on the development branch.
  0fbd7ba Prevent possible deadlock due to glusterd_quorum_count
  5da3062 Rename glusterd_quorum_count to GLUSTERD_QUORUM_COUNT
  b3aa3c4 Enclose GLUSTERD_QUORUM_COUNT definition in a do-while block

[1]: https://github.com/kshlm/glusterfs/tree/urcu

Change-Id: Ic4b3949f303d72ce53e0139f62b83b8d13fb4e47
BUG: 1205186
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/9978
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Gaurav Kumar Garg <ggarg@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>
2015-03-25 04:36:06 -07:00
Kaleb S. KEITHLEY
fb81ee0196 ganesha-ha: ganesha-ha.sh --status (one-liner) implementation
Change-Id: I17b7f6864dd8c1f89500a4bb89f1c249835e68da
BUG: 1188184
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/9974
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-03-24 13:13:47 -07:00
Niels de Vos
6372bea958 rpm: move libgfdb to the glusterfs-server package
libgfdb is only used by processes that run on Gluster servers. There is
no need to have this library (and its sqlite dependency) on any system
that installs a glusterfs package.

BUG: 1194753
Change-Id: I6b7fdc70210ef2a847efd596a0c995f0a4cf5d9b
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9983
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-03-24 11:39:28 -07:00
Nandaja Varma
d71418ac4e glusterd: Fixing wrong array comparison (Coverity fix)
Coverity CID: 1256175

Change-Id: Ib29fc2eaa54a7ce8369918e68bf117d0f04ca94d
BUG: 789278
Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com>
Reviewed-on: http://review.gluster.org/9679
Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-24 11:24:29 -07:00
Venky Shankar
cd3d34289c doc: document bit-rot feature
Change-Id: Ibad640d01975906b7642c76a1649e3e272f3a8bc
BUG: 1170075
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/9712
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-24 10:57:24 -07:00
Venky Shankar
866c64ba5e features/bit-rot: filesystem scrubber
Scrubber performs signature verification for objects that were
signed by signer. This is done by recalculating the signature
(using the hash algorithm the object was signed with) and
verifying it aginst the objects persisted signature. Since the
object could be undergoing IO opretaion at the time of hash
calculation, the signature may not match objects persisted
signature. Bitrot stub provides additional information about
the stalesness of an objects signature (determinted by it's
versioning mechanism). This additional bit of information is
used by scrubber to determine the staleness of the signature,
and in such cases the object is skipped verification (although
signature staleness is performed twice: once before initiation
of hash calculation and another after it (an object could be
modified after staleness checks).

The implmentation is a part of the bitrot xlator (signer) which
acts as a signer or scrubber based on a translator option. As
of now the scrub process is ever running (but has some form of
weak throttling mechanism during filesystem scan). Going forward,
there needs to be some form of scrub scheduling and IO throttling
(during hash calculation) tunables (via CLI).

Change-Id: I665ce90208f6074b98c5a1dd841ce776627cc6f9
BUG: 1170075
Original-Author: Raghavendra Bhat <rabhat@redhat.com>
Original-Author: Venky Shankar <vshankar@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/9914
Tested-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-24 10:55:51 -07:00
Venky Shankar
7927e8747c features/bit-rot: Implementation of bit-rot xlator
This is the "Signer" -- responsible for signing files with their
checksums upon last file descriptor close (last release()).
The event notification facility provided by the changelog xlator
is made use of.

Moreover, checksums are as of now SHA256 hash of the object data
and is the only available hash at this point of time. Therefore,
there is no special "what hash to use" type check, although it's
does not take much to add various hashing algorithms to sign
objects with. Signatures are stored in extended attributes of the
objects along with the the type of hashing used to calculate the
signature. This makes thing future proof when other hash types
are added. The signature  infrastructure is provided by bitrot
stub: a little piece of code that sits over the POSIX xlator
providing interfaces to "get or set" objects signature and it's
staleness.

Since objects are signed upon receiving release() notification,
pre-existing data which are "never" modified would never be
signed. To counter this, an initial crawler thread is spawned
The crawler scans the entire brick for objects that are unsigned
or "missed" signing due to the server going offline (node reboots,
crashes, etc..) and triggers an explicit sign. This would also
sign objects when bit-rot is enabled for a volume and/or after
upgrade.

Change-Id: I1d9a98bee6cad1c39c35c53c8fb0fc4bad2bf67b
BUG: 1170075
Original-Author: Raghavendra Bhat <raghavendra@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/9711
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-24 10:55:32 -07:00
Venky Shankar
31f841d6b3 cli/glusterd: CLI interface for BitRot detection
* BitRot enable/disable CLI per volume
* Volfile generation for Scrubber
* Relevant glusterd infrastructure

Change-Id: I1212af63f93ecc52b22ee6da920e1664f66a1e39
BUG: 1170075
Original-Author: Raghavendra Bhat <raghavendra@redhat.com>
Original-Author: Venky Shankar <vshankar@redhat.com>
Original-Author: Gaurav Kumar Garg <ggarg@redhat.com>
Original-Author: Anand Nekkunti <anekkunt@redhat.com>
Reviewed-on: http://review.gluster.org/9986
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-24 10:26:15 -07:00
Venky Shankar
84db9f8271 mgmt/glusterd: generate volfile for BitD
* Implement the skeleton of bit-rot xlator.

Original-Author: Raghavendra Bhat <raghavendra@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Signed-off-by: Anand Nekkunti <anekkunt@redhat.com>
Change-Id: If33218bdc694f5f09cb7b8097c4fdb74d7a23b2d
BUG: 1170075
Reviewed-on: http://review.gluster.org/9710
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2015-03-24 07:56:32 -07:00
Humble Devassy Chirammal
a37f3ca2b2 libglusterfs: check and act based on gf_malloc result.
Change-Id: If54f4be7db8b6f98e65570b09c07251e21ebae15
BUG: 1194640
Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com>
Reviewed-on: http://review.gluster.org/9837
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-03-24 07:04:03 -07:00
Venky Shankar
33a32b8efa Update MAINTAINERS file
- Added maintainers for BitRot detection

Change-Id: Ib5dae02176372e33c7b616f161d909815edbb53f
BUG: 1170075
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/9916
Tested-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-03-24 06:59:33 -07:00
Atin Mukherjee
ef158c75d1 read-only: read-only/worm translator should be in brick graph by default
Problem:
read-only/worm translator is not loaded by default in brick graph because of which
when read-only option is set through volume set volume still remains writable
untill the bricks are restarted as the translator does not have an inmemory flag
to decide whether the read-only/worm option is turned or not.

Solution:
read-only/worm should be loaded by default in brick graph and the read-only/worm
option can be toggled through volume set command. read-only/worm translator now'
has an in-memory flag to decide whether the volume is read-only or not and based
on that either reject the fop or proceed.

Change-Id: Ic79328698f6a72c50433cff15ecadb1a92acc643
BUG: 1134822
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/8571
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-24 06:53:11 -07:00
Venky Shankar
a20101e2e4 Bitrot Stub
Bitrot stub implements object versioning required for identifying
signature freshness. More details about versioning is explained
as a part of the "bitrot feature documentation" patch.

Change-Id: I2ad70d9eb109ba4a12148ab8d81336afda529ad9
BUG: 1170075
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/9709
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-24 06:37:19 -07:00