summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* features/bit-rot-stub: handle REOPEN_WAIT on forgotten inodesRaghavendra Bhat2015-07-282-1/+98
| | | | | | | | | | Change-Id: Ia8706ec9b66d78c4e33e7b7faf69f0d113ba68a4 BUG: 1245981 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/11729 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* cli : changing the gluster peer probe messageMohamed Ashiq Liyazudeen2015-07-281-2/+2
| | | | | | | | | | | | | | The gluster peer probe command with invalid ips dont report that IP's can also be a valid in usage. Change-Id: I8f58341a2b76369ccf62f88ca0ecd8a9a9529af6 BUG: 1242742 Signed-off-by: Mohamed Ashiq Liyazudeen <mliyazud@redhat.com> Reviewed-on: http://review.gluster.org/11657 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* glusterd: getting txn_id from frame->cookie in op_sm call backanand2015-07-272-16/+89
| | | | | | | | | | | | | | | | | RCA: If rebalance start is triggered from one node and one of other nodes in the cluster goes down simultaneously we might end up in a case where callback will use the txn_id from priv->global_txn_id which is always zeros and this means injecting an event with an incorrect txn_id will result into op-sm getting stuck. fix: set txn_id in frame->cookie during sumbit_and_request, so that we can get txn_id in call back functions. Change-Id: I519176c259ea9d37897791a77a7c92eb96d10052 BUG: 1245142 Signed-off-by: anand <anekkunt@redhat.com> Reviewed-on: http://review.gluster.org/11728 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Revert "core: avoid crashes in gf_msg dup-detection code"Soumya Koduri2015-07-271-13/+0
| | | | | | | | | | | | | | | | This reverts commit 765849ee00f6661c9059122ff2346b03b224745f. With http://review.gluster.org/#/c/10417/, struct mem_accnt is no longer embedded in a xlator_t object, but instead is allocated separately. Hence this workaround provided to avoid crashes in logging infrastructure is no longer needed. Change-Id: I460b62780f570cd9873bad17d9327eefc17a1355 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11746 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Poornima G <pgurusid@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* changelog: test case for verifying empty changelogs avoidedSaravanakumar Arumugam2015-07-272-0/+45
| | | | | | | | | | | | | Test case added to check NO EMPTY changelogs gets created over changelog rollover period. Change-Id: I83323644e1a0c4b920a472e1179606a0fd54d1d9 BUG: 1237000 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/11460 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* features/shard: Handle unlink of files with holes appropriately in unlink() ↵Krutika Dhananjay2015-07-272-2/+65
| | | | | | | | | | | | and rename(). Change-Id: I25a02386dc95580c2e76a13fdd8e11a0df234d56 BUG: 1245547 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/11737 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* glusterd: initialize the daemon services on demandAtin Mukherjee2015-07-2723-150/+214
| | | | | | | | | | | | | | | | | | | | | | As of now all the daemon services are initialized at glusterD init path. Since socket file path of per node daemon demands the uuid of the node, MY_UUID macro is invoked as part of the initialization. The above flow breaks the usecases where a gluster image is built following a template could be Dockerfile, Vagrantfile or any kind of virtualization environment. This means bringing instances of this image would have same UUIDs for the node resulting in peer probe failure. Solution is to lazily initialize the services on demand. Change-Id: If7caa533026c83e98c7c7678bded67085d0bbc1e BUG: 1238135 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11488 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* posix,shard: Fill in ia_size and ia_blocks before unwinding (f)setattrKrutika Dhananjay2015-07-262-19/+155
| | | | | | | | | | | | | | The shard xlator will request for size xattrs in its request and posix will perform xattr_fill of requested keys before unwinding (f)setattr. Change-Id: I4ec4779568be6f805724b875b1b4215787112e7f BUG: 1246082 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/11754 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* cluster/afr: Fix incorrect logging in read transactionsKrutika Dhananjay2015-07-261-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | afr_read_txn_refresh_done() at its entry point can fail for reasons like ENOENT/ESTALE but seldom due to EIO, which is something _AFR_ would internally generate and not receive in response from a child translator. AFR is reporting "split-brain" for _any_ kind of failure in read txn, of the following kind: [2015-07-07 18:04:34.787612] E [MSGID: 108008] [afr-read-txn.c:76:afr_read_txn_refresh_done] 0-vol3-replicate-3: Failing STAT on gfid 18a973c4-73d3-48b8-942c-33a6f1a8e6b4: split-brain observed. [Input/output error] This patch fixes such misleading errors. To-Do: Avoid logging EIO if/when split-brain choice is set. Will do that as part of a separate commit. Change-Id: Ib513c75168f7026118ad5b3f0b35e9dd498cfe1e BUG: 1246052 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/11756 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@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>
* rpc: fix binding brick issue while bind-insecure is enabledPrasanna Kumar Kalever2015-07-267-65/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | problem: When bind-insecure is turned on (which is the default now), it may happen that brick is not able to bind to port assigned by Glusterd for example 49192-49195... It seems to occur because the rpc_clnt connections are binding to ports in the same range. so brick fails to bind to a port which is already used by someone else solution: fix for now is to make rpc_clnt to get port numbers from 65535 in a descending order, as a result port clash is minimized other fixes: previously rdma binds to port >= 1024 if it cannot find a free port < 1024, even when bind insecure was turned off(ref to commit '0e3fd04e'), this patch add's a check for bind-insecure in gf_rdma_client_bind function This patch also re-enable bind-insecure and allow insecure by default which was reverted (ref: commit cef1720) previously Change-Id: Ia1cfa93c5454e2ae0ff57813689b75de282ebd07 BUG: 1238661 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/11512 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* Adding README for gluster documentation projectHumble Devassy Chirammal2015-07-261-0/+18
| | | | | | | | | | Change-Id: I1bcfc14ee3eabeb26a5cea42533c8df5b040f549 BUG: 1206539 Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com> Reviewed-on: http://review.gluster.org/11753 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* logging: client3_3_removexattr_cbk should not log expected ENODATANiels de Vos2015-07-261-1/+1
| | | | | | | | | | | | | | | | Commit 379dbbfd changed the log level of an expected error message from GF_LOG_DEBUG to '0'. This causes the message to always get logged. It is intended to log the warning when the xattr could not be removed (but exists), removing a non-existing xattr is sufficient as debug. BUG: 1246736 Change-Id: If11d15d699e8152cc32e0c0c1d65b587c5c48892 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11759 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joe Julian <me@joejulian.name> Tested-by: Joe Julian <me@joejulian.name> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* dict: dict_set_bin() should never free the pointer on errorNiels de Vos2015-07-2415-38/+74
| | | | | | | | | | | | | | | | | | | | | | dict_set_bin() is handling the pointer that it passed inconsistently. Depending on the errors that can occur, the pointer passed to the dict can be free'd, but there is no guarantee. It is cleaner to have the caller free the pointer that allocated it and dict_set_bin() returned an error. When dict_set_bin() returned success, the given pointer will be free'd when dict_unref() calls data_destroy(). Many callers of dict_set_bin() already take care of free'ing the pointer on error. The ones that did not, are corrected with this change too. Change-Id: I39a4f7ebc0cae6d403baba99307d7ce408f25966 BUG: 1242280 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11638 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* dict: merge static/non-static dict_set_* variationsNiels de Vos2015-07-242-160/+64
| | | | | | | | | | | | | | | | | | | | | | | Copy/pasting complete functions for setting one boolean is rather ugly, this can easily be solved with a helper function that gets the boolean as an extra parameter. Also removing dict_set_dynmstr() because there are no callers, and using GF_MALLOC() or GF_CALLOC() to allocate memory for strings is much more preferred. And, as Kaleb pointed out, prefixing functions with an underscore '_' is reserved for libc internals. Renaming the _dict_*() functions for that reason. Change-Id: I8e681954502f17e59c8f5e8a294d3db238d3e5f3 BUG: 1232304 Reported-by: Kaleb KEITHLEY <kkeithle@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11716 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* gfapi: remove unused variables in priv_glfs_process_upcall_event()Niels de Vos2015-07-241-2/+0
| | | | | | | | | | | | | | | | | Compiling on NetBSD shows these trivial warnings: api/src/glfs-fops.c: In function 'priv_glfs_process_upcall_event': api/src/glfs-fops.c:3873:29: warning: unused variable 'object' api/src/glfs-fops.c:3869:28: warning: unused variable 'gfid' BUG: 1202274 Change-Id: If0101c64da2333b05958838f58761534ef341d62 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11717 Reviewed-by: soumya k <skoduri@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* rpc,server,glusterd: Init transport list for accepted transportKaushal M2015-07-243-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | GlusterD or a brick would crash when encrypted transport was enabled and an unencrypted client tried to connect to them. The crash occured when GlusterD/server tried to remove the transport from their xprt_list due to a DISCONNECT event. But as the client transport's list head wasn't inited, the process would crash when list_del was performed. Initing the client transports list head during acceptence, prevents this crash. Also, an extra check has been added to the GlusterD and Server notification handlers for client DISCONNECT events. The handlers will now first check if the client transport is a member of any list. GlusterD and Server DISCONNECT event handlers could be called without the ACCEPT handler, which adds the transport to the list, being called. This situation also occurs when an unencrypted client tries to establish a connection with an encrypted server. Change-Id: Icc24a08d60e978aaa1d3322e0cbed680dcbda2b4 BUG: 1243774 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/11692 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/ec: Handle race between unlock-timer, new lockPranith Kumar K2015-07-233-50/+17
| | | | | | | | | | | | | | | | | | | | | | | | Problem: New lock could come at the time timer is on the way to unlock. This was leading to crash in timer thread because thread executing new lock can free up the timer_link->fop and then timer thread will try to access structures already freed. Fix: If the timer event is fired, set lock->release to true and wait for unlock to complete. Thanks to Xavi and Bhaskar for helping in confirming that this race is the RC. Thanks to Kritika for pointing out and explaining how Avati's patch can be used to fix this bug. Change-Id: I45fa5470bbc1f03b5f3d133e26d1e0ab24303378 BUG: 1243187 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11670 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* dht: send lookup even for fd based operations during rebalanceRavishankar N2015-07-221-23/+30
| | | | | | | | | | | | | | | | | | | | | Problem: dht_rebalance_inprogress_task() was not sending lookups to the destination subvolume for a file undergoing writes during rebalance. Due to this, afr was not able to populate the read_subvol and failed the write with EIO. Fix: Send lookup for fd based operations as well. Thanks to Raghavendra G for helping with the RCA. Change-Id: I638c203abfaa45b29aa5902ffd76e692a8212a19 BUG: 1244165 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/11713 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* libglusterfs: Even anonymous fds must have fd->flags setRaghavendra Talur2015-07-203-8/+19
| | | | | | | | | | | | | | | | | | | | | | We do not set the same flags to anonymous fd that posix uses to open an anonymous fd in the backend. If there are any xlators which rely on these flags for their operation they may not work well. Add proper flags to anonymous fds at the time of their creation and refer to them for subsequent operations. Change-Id: Ia99b7ea7d38839f099c7b4aae3c7ead123bc8c67 BUG: 1211221 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/10219 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Poornima G <pgurusid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* quota : validating soft limit percentage.Manikandan Selvaganesh2015-07-201-2/+4
| | | | | | | | | | | Change-Id: I14c049c84c468b6415a1de45441b2fed94e8ed4b BUG: 1240654 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/11566 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* quota/marker: contribution with list_del can cause mem corruptionvmallika2015-07-192-9/+9
| | | | | | | | | | | | | | | | There is a possibility that contribution is removed twice from list during unlink operation (with hard links) or during rename operation Use list_del_init for a thread safe deltion of member from list Change-Id: Iff5e0c03cc8f0ed85da0db1739b84b695abf9ea6 BUG: 1244109 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11706 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* nfs: log disabled export/netgroups feature as INFOJiffin Tony Thottan2015-07-191-1/+1
| | | | | | | | | | | | | If export/netgroups feature is disabled for gluster/nfs, then the "nfs.log" contains a Warning message which is deceiving for the users. Logging the message as Info is sufficient. Change-Id: I3d07e8bc4f09f3eb32014f5a10390d0484b838cf BUG: 1243805 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/11695 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* storage/posix: Check xdata for NULL before dict_getRaghavendra Talur2015-07-181-4/+4
| | | | | | | | | | | | | | Performing a dict_get on xdata can lead to frequent logging if xdata is NULL. Change-Id: I1666f0cc958c639ccd816e3738dd4a1efebbff82 BUG: 1235921 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/11390 Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* glusterd: Porting the left out gf_log_callingfns to new frameworkNandaja Varma2015-07-185-15/+52
| | | | | | | | | | Change-Id: I1b0ad54238895475ddbacc4fffacac8dc6e887fe BUG: 1235538 Signed-off-by: Nandaja Varma <nandaja.varma@gmail.com> Reviewed-on: http://review.gluster.org/11590 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* doc: Add documentation for new logging frameworkShyam2015-07-171-0/+132
| | | | | | | | | | | | | | This commit adds a guideline document for using the new message logging infrastructure. Change-Id: Iddc6a2b6f244cc5b51dab4c99d963e89b1a9f478 Signed-off-by: Shyam <srangana@redhat.com> Reviewed-on: http://review.gluster.org/10896 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anusha B.Rao <anusha91rao@gmail.com> Tested-by: Anusha B.Rao <anusha91rao@gmail.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* features/marker: Fixing dereference after null checkarao2015-07-171-1/+1
| | | | | | | | | | | | | | CID: 1124494 The variable was sent as a parameter to the function without the null check, hence added a check on null and error log accordingly. Change-Id: I11a649fc9a1bedad17422aeddb8dd8fa225d404e BUG: 789278 Signed-off-by: arao <arao@redhat.com> Reviewed-on: http://review.gluster.org/9641 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* glusterd: rebalance support for cluster.rc frameworkanand2015-07-163-1/+67
| | | | | | | | | | | | | | | | | | | Issue:Rebalance is failing in cluster framework (any simulated cluster environment in same node ). RCA: 1. we are passing always "localhost" as volfile server for rebalance xlator . 2. Rebalance daemons are overwriting unix socket and log files each other. (All rebalance processes are creating socket with same name) . Fix: set vol_file_server, unix socket and log files properly. Change-Id: I6654461e00c2a164b2f1f1db24a316c4180dd8d5 BUG: 1231437 Signed-off-by: anand <anekkunt@redhat.com> Reviewed-on: http://review.gluster.org/11210 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* cli: Create missing logbuf_poolAnoop C S2015-07-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Since logbuf_pool was not created via glusterfs_ctx_defaults_init(), the following error was present in cli logs repeateadly for each and every execution of a gluster command. E [mem-pool.c:417:mem_get0] (-->/usr/local/lib/libglusterfs.so.0(+0x7e262) [0x7fdbc0b1f262] -->/usr/local/lib/libglusterfs.so.0(_gf_msg+0x804) [0x7fdbc0ac7844] -->/usr/local/lib/libglusterfs.so.0(mem_get0+0x78) [0x7fdbc0af5b48] ) 0-mem-pool: invalid argument [Invalid argument] This change creates ctx->logbuf_pool via glusterfs_ctx_defaults_init() in cli.c so that the above error is no longer logged in cli logs. Change-Id: I3fcd9cfefa06ddd52e1989b039ff5637372c3235 BUG: 1243753 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: http://review.gluster.org/11691 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* posix: fix mem-leak in posix xattropvmallika2015-07-161-2/+4
| | | | | | | | | | Change-Id: I1dd70f74a98c5875eb316f3c3e560047f128685b BUG: 1243890 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11700 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* glusterd: use 2 epoll worker threads by defaultKrishnan Parthasarathi2015-07-162-0/+22
| | | | | | | | | | | | | | | The no. of epoll worker threads can be configured by adding the following option into glusterd.vol. option event-threads <NUM-OF-EPOLL_WORKERS> BUG: 1242421 Change-Id: I2a9e2d81c64beaf54872081f9ce45355cf4dfca7 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/11630 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* quota: fix quota test casevmallika2015-07-152-12/+12
| | | | | | | | | | | | | | | | | | | | Below command is wrong way of executing mutilple command with | (pipe) local cmd="$CLI volume quota $V0 list $QUOTA_PATH | grep $QUOTA_PATH | awk '{print \$$FIELD}'" $cmd This patch fixes the issue This patch also fixes testcase inode-quota.t, which checking quota values in wrongs fields Change-Id: If28732e6a76ea4bf75560f6496c8f56670915cf9 BUG: 1229297 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11673 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* protocol/server: use different dict for resolvingRaghavendra Bhat2015-07-151-2/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | protocol/server has to resolve the inode before continuing with any fop coming from the clients. For resolving it, server xlator was using the same dict associated with the fop. It causes problems in some situations. If a directory's inode was forgotten because of lru limit being exceeded, then when a create fop comes for an entry within that directory, server tries to resolve it. But since the parent directory's inode is not found in the inode table, it tries to do a hard resolve by doing a lookup on the parent gfid. If any xlator below server wants to get some extended attributes whenever lookup comes, then they set the new keys in the same dict that came along with the create fop. Now, the lookup of the parent succeeds and the create fop proceeds with the same dict (with extra keys present). posix xlaror creates those xattrs that are present in the dict. Thus the xattrs which were not to be present by default are also set as part of create. (Ex: bit-rot related xattrs such as bad-file, version and sign xattrs) Change-Id: I4bdad175a1d7a04a3aa36073667c556d6c260263 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/11661 Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* features/shard: Use xattrop (as opposed to setxattr) for updates to size xattrKrutika Dhananjay2015-07-154-22/+51
| | | | | | | | | | Change-Id: Icd8984976812bb47ae7129426f6c1aa9393b3ab9 BUG: 1232391 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/11467 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* doc: remove deprecated replace-brick commands from gluster man pageAnuradha Talur2015-07-151-2/+2
| | | | | | | | | | | | Change-Id: Ibdd42bf4b59fe8a9df5bad68fbc498b4496c5e53 BUG: 1206539 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/11567 Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Tested-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
* features/changelog: fix buffer overrun in changelog-helpersPrasanna Kumar Kalever2015-07-141-5/+3
| | | | | | | | | | | | | | | | | changelog-helpers.c:1911:17: warning: Size argument is greater than the free space in the destination buffer strncat (result, pre_dir_name, PATH_MAX); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ changelog-helpers.c:1919:17: warning: Size argument is greater than the free space in the destination buffer strncat (result, bname, PATH_MAX); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I60ca7fe762f07cb72fe7b69f0253835becaff7b9 BUG: 1222238 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/10802 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* cluster/ec: Propogate correct errno in case of failuresPranith Kumar K2015-07-142-1/+7
| | | | | | | | | | | | | | | | | | - Also remove internal-fop setting in create/mknod etc xattrs. Rebalance was failing because ec was giving EIO when lock acquiring fails as the file/dir doesn't exist. Posix_create/mknod are not setting config xattr because internal-fop key is present in dict and setxattr for this fails leading to failure in setting rest of xattrs. Change-Id: Ifb429c8db9df7cd51e4f8ce53fdf1e1b975c9993 BUG: 1242254 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11639 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* glusterd: Pass NULL in glusterd_svc_manager in glusterd_restart_bricksGaurav Kumar Garg2015-07-143-1/+42
| | | | | | | | | | | | | | | | | | | | | On restarting glusterd quota daemon is not started when more than one volumes are configured and quota is enabled only on 2nd volume. This is because of while restarting glusterd it will restart all the bricks. During brick restart it will start respective daemon by passing volinfo of first volume. Passing volinfo to glusterd_svc_manager will imply daemon managers will take action based on the same volume's configuration which is incorrect for per node daemons. Fix is to pass volinfo NULL while restarting bricks. Change-Id: I2602002a8ba7762fc1eb08123e79fbcf568ecab4 BUG: 1242875 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/11658 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd: daemons start/stop should be logged in INFOAtin Mukherjee2015-07-143-3/+22
| | | | | | | | | | Change-Id: I81ceba4b7110140aec790659fcac90403c8e3869 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11538 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* geo-replication: fix memory leak in gsyncdPrasanna Kumar Kalever2015-07-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. leak in str2argv() function: char *strdup(const char *s); The strdup() function returns a pointer to a new string which is a duplicate of the string s. Memory for the new string is obtained with malloc(3), and can be freed with free(3). so when using strdup, user has to take care of freeing the memory allocated by strdup library function. 2. leak in main() function: str2argv() function calls calloc and allocates memory pointed to argv, after return from str2argv() memory pointed to argv has to be cleaned in main(). This patch is to fix 2 memory leaks mentioned above. Change-Id: I6bf26101e0460a7324ac7bdb69905839688d4987 BUG: 1222898 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/10831 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Milind Changire <mchangir@redhat.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* cluster/ec: wind readlink on good subvol(s)Pranith Kumar K2015-07-146-48/+90
| | | | | | | | | | BUG: 1232172 Change-Id: I3a56e487840d86147dd85bf5fbe79b165eae289f Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11589 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* quota: Fix crash in quota enforcervmallika2015-07-143-123/+296
| | | | | | | | | | | | | | | | With multiple hardlinks check_quota_limit is invoked for each parent each of this check_limit can invoke validation this can cause frame->local to get corrupted during validation. Testcase tests/bugs/quota/bug-1235182.t fails spuriously with this problem Change-Id: I53adc54b431fb5f43e67a94248102ddaf0d7978f BUG: 1238747 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11510 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* quota/marker: fix mem-leak in markervmallika2015-07-142-49/+44
| | | | | | | | | | | | Free local in error paths Change-Id: I76f69e7d746af8eedea34354ff5a6bf50234e50e BUG: 1207735 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11617 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* features/bitrot: throttle signerVenky Shankar2015-07-141-1/+1
| | | | | | | | | | | | | | | | | Pass -DDBR_RATE_LIMIT_SIGNER CFLAGS to enable fixed value throttling based on TBF to rate limit signer. The following messags is dumped in bitd log file that this change introduces. [ [Rate Limit Info] "tokens/sec (rate): 131072, maxlimit: 524288" ] Bug: 1242809 Change-Id: I063e41d4c7bcddd7a940cc175e89536cd4fe2804 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/11641 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* cluster/ec: Prevent data corruptionsPranith Kumar K2015-07-143-14/+32
| | | | | | | | | | | | | | - On lock reuse preserve 'healing' bits - Don't set ctx->size outside locks in healing code - Allow xattrop internal fops also on the fop->mask. Change-Id: I6b76da5d7ebe367d8f3552cbf9fd18e556f2a171 BUG: 1232678 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/11640 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
* ec : Implement check for the cluster.heal-timeout valuesAshish Pandey2015-07-142-0/+16
| | | | | | | | | | | | | | | | | | | for disperse volume. Problem : User can set wrong values for cluster.heal-timeout using cli. Any value like string, negative numbers or 0 could be set. Solution : Check the value given by user. It should be numerical, non negative and within the range. Change-Id: I5184ef1a11bb2c225f42ac9ccb1ba680a86cfe09 BUG: 1239037 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/11573 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
* rpc-transport: socket_poller fixes for proper working of mgmt encryptionKaushal M2015-07-131-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | socket_poller, the polling function used by ssl own_thread, had two issues which lead to GlusterD crashes when using management encryption Issue 1 ------- socket_poller calls functions which require THIS to be set. But, THIS was being set conditionally. Because of this, functions could sometimes be called without THIS being set. For example, rpc_transport_notify could be called for an accepted client socket without THIS being set, as THIS was only set it the transport wasn't yet connected. This would cause the process to crash when THIS was accessed by the called functions. To fix this, THIS is being set at the start of socket_poller unconditionally. Issue 2 ------- DISCONNECT notify was being sent on the listener transport instead of the client transport. The DISCONNECT event was converted to a LISTENER_DEAD event in rpcsvc_handle_disconnect, as it could not find the listener socket of the listener socket. GlusterD was notified of a LISTENER_DEAD event instead of a DISCONNECT and failed to remove the client transport from its xprt_list. The transport would subsequently be freed, leaving the xprt_list with a corrupted/invalid entry. Later, when GlusterD would iterate over the xprt_list to send notifications, it would crash when the invalid entry was accessed. To fix this, DISCONNECT notification in socket_poller is sent on the client socket, as it is done in the epoll handler. Change-Id: I0370b7c6d7eb13de10ebf08d91a4a39dc7d64c7a BUG: 1242570 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/11650 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* glusterd: Fix failure in replace-brick when src-brick is offlineAnuradha Talur2015-07-132-75/+25
| | | | | | | | | | Change-Id: I0fdb58e15da15c40c3fc9767f2fe4df0ea9d2350 BUG: 1242609 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/11651 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* cluster/tier : fix for logical bugs/timing errors in tier.tPamela Ousley2015-07-131-41/+96
| | | | | | | | | | | | | | | | | | The md5sum fingerprints were not correctly compared after moving files between the hot and cold tiers. This version of tier.t uses a new function, "check_counters", to ensure that the number of promotions/demotions is as expected. This is intended to avoid spurious timing-related errors that were seen with the old script. Change-Id: I4a0ae7315493bfd307a0f68f21fa3ea33c88b08f BUG: 1231268 Signed-off-by: Pamela Ousley <pousley@redhat.com> Reviewed-on: http://review.gluster.org/11285 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* rpcsvc: add request's address in logKrishnan Parthasarathi2015-07-131-1/+2
| | | | | | | | | | | | | This helps in identifying the remote endpoint whose request arrived at an non-privileged port. Change-Id: Ie58155e00229cfcbd0ca5221d79e2e90efb3e2b3 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/11631 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/tier: fixes for migration over ec as cold tierDan Lambright2015-07-132-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | An opendir is done in rebalance. The graph constructed when EC is used in tiering may have no local volumes (if all the hot volumes are on one node and all the others on another node). Previously the opendir only sent fops down the local subvolumes for migration. They must be sent down both the hot and cold subvolumes for tiering. When setxattr2() received a NULL subvolume; this dereferenced an uninitialized variable. When a lookup is done during creation of the destination file, the xattr dict is "polluted" with virtual xattrs. These cause subsequent xattrs in the new file to not be written by posix. They are required by EC. The inode gfid for "entry_loc" in gf_defrag_migrate_single_file() was not initialized. This made underlying translators think the gfid was 0, and failed migration. Change-Id: I6ccda8ca8e43485b9b354341bbfcb302496f632c BUG: 1236212 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/11433 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>