summaryrefslogtreecommitdiffstats
path: root/glusterfsd/src/glusterfsd-mgmt.c
Commit message (Collapse)AuthorAgeFilesLines
* gluster: GlusterFS Volume Snapshot FeatureAvra Sengupta2014-04-111-0/+78
| | | | | | | | | | | | | | | | | | | | | | | | | This is the initial patch for the Snapshot feature. Current patch includes following features: * Snapshot create * Snapshot delete * Snapshot restore * Snapshot list * Snapshot info * Snapshot status * Snapshot config Change-Id: I2f46920c0d61c515f6a60e0f8b46fff886d9f6a9 BUG: 1061685 Signed-off-by: shishir gowda <sgowda@redhat.com> Signed-off-by: Sachin Pandit <spandit@redhat.com> Signed-off-by: Vijaikumar M <vmallika@redhat.com> Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Signed-off-by: Joseph Fernandes <josferna@redhat.com> Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7128 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterfsd: Check for NULL before dereference.Jose A. Rivera2014-02-141-1/+2
| | | | | | | | | | | BUG: 789278 CID: 1124805 Change-Id: I5926a4e59790f142d65f034726c9c369c2ad7808 Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-on: http://review.gluster.org/6909 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* core:Fixing NULL dereference issue.surabhi2014-01-221-1/+3
| | | | | | | | | | | | 1.Checking of frame before calling STACK_DESTROY (frame->root) Signed-off-by: surabhi <sbhaloth@redhat.com> Change-Id: I21d27a8b4e556c00cd123afe8512e010a1a1f80d BUG: 789278 Signed-off-by: surabhi <sbhaloth@redhat.com> Reviewed-on: http://review.gluster.org/6749 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* core: Coverity issue "Use of uninitialized scalar variable"Lalatendu Mohanty2014-01-181-2/+2
| | | | | | | | | | | | | | Issue: 1. In "unlink (export_path)" "export_path" might contain an arbitrary value left from earlier computations. 2. In "(msg[0] != '\0')" msg might contain an arbitrary value Change-Id: Icca8f557fd6b5e046dff1d5a84a72061975868d0 BUG: 789278 Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com> Reviewed-on: http://review.gluster.org/6701 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterfsd: fix small memory leaks in glusterfsd-mgmt.cKaleb S. KEITHLEY2013-11-301-0/+5
| | | | | | | | | | | | | | | | | E.g. In glusterfs_volfile_fetch(), req.xdata.xdata_val is allocated in dict_allocate_and_serialize() but not freed after mgmt_submit_request(). A survey of dict_allocate_and_serialize/_submit_request in glusterfsd-mgmt.c shows no consistent pattern of freeing the xdata_val and also the dict, which is a little disturbing. (Yes, clearly not every place this occurs needs to be freed the same way.) Change-Id: Ic306d60b157e97c822a562bfdf21896e40db632a BUG: 1036102 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6363 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli/glusterd: Changes to quota command Quota featureRaghavendra G2013-11-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | re-work. Following are the cli commands that are new/re-worked: ====================================================== volume quota <VOLNAME> {enable|disable|list [<path> ...]|remove <path>| default-soft-limit <percent>} | volume quota <VOLNAME> {limit-usage <path> <size> [<percent>]} | volume quota <VOLNAME> {alert-time|soft-timeout|hard-timeout} {<time>} volume status [all | <VOLNAME> [nfs|shd|<BRICK>|quotad]] [detail|clients|mem|inode|fd|callpool] volume statedump <VOLNAME> [nfs|quotad] [all|mem|iobuf|callpool|priv|fd|inode|history] glusterd changes: ================= * Quota limits are now set as extended attributes by glusterd from the aux mount created by the cli. * The gfids of the directories on which quota limits are set for a given volume are stored in /var/lib/glusterd/vols/<volname>/quota.conf file in binary format, and whose cksum and version is stored in /var/lib/glusterd/vols/<volname>/quota.cksum. Original-author: Krutika Dhananjay <kdhananj@redhat.com> Original-author: Krishnan Parthasarathi <kparthas@redhat.com> BUG: 969461 Change-Id: If32bba36c67f9c2a30417af9c6389045b2b7c13b Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6003 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* bd_map: Remove bd_map xlatorM. Mohan Kumar2013-11-131-72/+0
| | | | | | | | | | | Remove bd_map xlator and CLI related changes. Change-Id: If7086205df1907127c1a1fa4ba603f1c48421d09 BUG: 1028672 Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewed-on: http://review.gluster.org/5747 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfsd, libgfapi: destroy the temporary graphs constructed for comparisonRaghavendra Bhat2013-10-031-181/+2
| | | | | | | | | | | | | | * The new and the oldgraphs which have been constructed whenever there is a volfile change (either reconfigure of the existing graph or creating a new graph) for comparison should be freed. Otherwise frequent graph changes will lead to huge memory leak Change-Id: I4faddb1aa9393b34cd2de6732e537a60f600026a BUG: 948178 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/5388 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfsd: Round robin DNS should not be relied upon withHarshavardhana2013-09-061-13/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config service availability for clients. Backupvolfile server as it stands is slow and prone to errors with mount script and its combination with RRDNS. Instead in theory it should use all the available nodes in 'trusted pool' by default (Right now we don't have a mechanism in place for this) Nevertheless this patch provides a scenario where a list of volfile-server can be provided on command as shown below ----------------------------------------------------------------- $ glusterfs -s server1 .. -s serverN --volfile-id=<volname> \ <mount_point> ----------------------------------------------------------------- OR ----------------------------------------------------------------- $ mount -t glusterfs -obackup-volfile-servers=<server2>: \ <server3>:...:<serverN> <server1>:/<volname> <mount_point> ----------------------------------------------------------------- Here ':' is used as a separator for mount script parsing Now these will be remembered and recursively attempted for fetching vol-file until exhausted. This would ensure that the clients get 'volume' configs in a consistent manner avoiding the need to poll through RRDNS. Change-Id: If808bb8a52e6034c61574cdae3ac4e7e83513a40 BUG: 986429 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/5400 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfs, gfapi: fix symbol clashAnand Avati2013-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The callback structures in both protocol/client and glusterfsd, gfapi used the same name for the actor table - gluster_cbk_actors. CBKs are required only for the management connection, and the actors of protocol/client are NOP functions. This supposed-to-be NOP function dispatch tabble is actually ending up pointing to the actor table of glusterfsd or gfapi. These functions, even though set wrongly, are not even expected to be called through the protocol/client callback path. Glusterd however sends the FETCHSPEC (and other) notify callbacks to *all* connected clients unconditionally, and there is a small period of time when protocol/client is connected to glusterd for PORTMAP query. If the FETCHSPEC callback notify is issued in this window of time, we end up calling the wrong actor in the client side resulting in a crash. Change-Id: I605ff7df64c7faf4607369bbf275aedec28e1778 BUG: 1004091 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5767 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* glusterfsd: is_mgmt_rpc_reconnect should not be `char` but gf_boolean_tHarshavardhana2013-07-251-2/+2
| | | | | | | | | Change-Id: I35c4dc040ebb5e926c7f54d823d1c81b1228bd4f BUG: 763046 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/5345 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterfsd: Use dynamic volfile bufferKaushal M2013-07-231-1/+20
| | | | | | | | | | | | | Glusterfsd used a fixed buffer to store volfiles fetched via getspec. This caused problems with large volfiles. Changining this to a dynamic buffer allows large volfiles to be loaded in memory. Change-Id: I40236dcb1c37b9a0136dfb5231cafabb3d4f00dc BUG: 986100 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5373 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* rpc: duplicate request cache for nfsRajesh Amaravathi2013-06-211-9/+9
| | | | | | | | | | | | | | | Duplicate request cache provides a mechanism for detecting duplicate rpc requests from clients. DRC caches replies and on duplicate requests, sends the cached reply instead of re-processing the request. Change-Id: I3d62a6c4aa86c92bf61f1038ca62a1a46bf1c303 BUG: 847624 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4049 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfsd: consider xlator type too in topology checkAnand Avati2013-06-211-0/+9
| | | | | | | | | | | | | | When cluster.nufa option is enabled, we only change the translator type, but leave the translator name as-is. This results in the topology change check to conclude that a graph switch is not needed. Change-Id: I4f4d0cec2bd4796c95274f0328584a4e7b8b5cd3 BUG: 975599 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5244 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* glusterfsd: Cleanup temporary files from /tmpVijay Bellur2013-04-081-1/+14
| | | | | | | | | | | | | | | | For each gluster{d,fs,fsd} start, one or more temporary file(s) created in /tmp were not being unlinked. This patch cleans that up. Modified a typo in an unrelated log message as well. Change-Id: I3dec2a2ca40c7d6828eb238ec9cd08b6072cf0dd BUG: 949327 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/4786 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterfsd: Fixed fd leak due to use of tmpfile()Krishnan Parthasarathi2013-03-221-3/+15
| | | | | | | | | Change-Id: I3c2dc070ebe967100170e39f3545acacc6016d61 BUG: 924075 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4703 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* glusterfsd: Remove 'top {read,write}-perf' threadKaushal M2013-02-141-142/+78
| | | | | | | | | | | | | | | | | | 'volume top {read,write}-perf' were performed in a different thread on the brick process, to prevent them from blocking the main polling thread. This was essential earlier when the rpc actor functions were run in the epoll thread. Now rpc actors can be launched on their own threads with the introduction of synctask support for rpcsvc. The brick-op actors are now launched using this feature, which makes the need for '{read,write}-perf' to be performed in a new thread. Change-Id: Idad7ab623f0bfb0c3a5cfae796c06e0fa3cff1b9 BUG: 764890 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4510 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd,glusterfsd,libgfapi: Client op-versionKaushal M2013-02-061-0/+40
| | | | | | | | | | | | | | | This patch introduces op-version support for glusterfs clients. Now, a client sends its supported op-versions during the volfile fetch request and glusterd will return the volfile only if the client can support the current op-version of the cluster. Change-Id: Iab1f1f1706802962bcf27058657c44e8a344d2f6 BUG: 907311 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4247 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Fix xdr_to_generic success checkKaushal M2012-12-091-79/+34
| | | | | | | | | | | | | | | | This patch fixes the success check for xdr_to_generic function across the codebase. Also, cleans up the brick_op actors table in glusterfsd-mgmt.c to make sure that the actors are called directly by rpcsvc. Change-Id: I3086585f30c44f69f1bc83665f89e30025f76d3a BUG: 884452 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4278 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* BD Backend: CLI commands to create/delete imageM. Mohan Kumar2012-11-291-1/+84
| | | | | | | | | | | | | | | | | Cli commands added to create/delete a LV device. The following command creates lv in a given vg. $ gluster bd create <volname>:<vgname>/<lvname> <size> The following command deletes lv in a given vg. $ gluster bd delete <volname>:<vgname>/<lvname> BUG: 805138 Change-Id: Ie4e100eca14e2ee32cf2bb4dd064b17230d673bf Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewed-on: http://review.gluster.org/3718 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterfsd-mgmt: make brick-ops work in synctaskAmar Tumballi2012-11-191-0/+1
| | | | | | | | | | | this way, the main epoll thread is freed up to serve other requests. Change-Id: Iecf68aceb8bd84433d0f9fcd98d96c734a4cc134 BUG: 842955 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/4096 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Fixed some general typing errors.Varun Shastry2012-09-271-1/+1
| | | | | | | | | | | | Eg: changed recieved to received Change-Id: I360fcb99c97c8a0222e373fee20ea2fccfb938db BUG: 860543 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3998 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* core: enable process to return the appropriate error codeAnand Avati2012-09-211-10/+26
| | | | | | | | | | | | Setup a pipe() in glusterfs_ctx_t to communicate with the fork'ed child the exit status and return it to the shell. Change-Id: Ibbaa581d45acb24d5141e43ae848cae29312d95f BUG: 762935 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3836 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* All: License message changeVarun Shastry2012-09-131-7/+6
| | | | | | | | | | | | License message changed for server-side, dual license GPLV2 and LGPLv3+. Change-Id: Ia9e53061b9d2df3b3ef3bc9778dceff77db46a09 BUG: 852318 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3940 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfsd: rpcsvc actors must return success after an attempt to submit replyKrishnan Parthasarathi2012-08-281-8/+12
| | | | | | | | | | | | | | rpcsvc attempts to send "error reply" using the req object. If actor has already performed rpcsvc_submit_generic, then req is destroyed. So if the actor returned -1 (RPCSVC_ACTOR_ERROR) on failing to submit reply, then req would be 'free'd' twice and will result in a crash eventually. Change-Id: I5eae19570202bbe5e154e9cb03390cfeb9b5f223 BUG: 851410 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3863 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* All: License message changeVarun Shastry2012-08-281-14/+5
| | | | | | | | | | | | | | | | | | The license message is changed to Copyright (c) 2008-2012 Red Hat, Inc. <http://www.redhat.com> This file is part of GlusterFS. This file is licensed to you under your choice of the GNU Lesser General Public License, version 3 or any later version (LGPLv3 or later), or the GNU General Public License, version 2 (GPLv2), in all cases as published by the Free Software Foundation. Change-Id: I07d2b63ed5fbbbd1884f1e74f2dd56013d15b0f4 BUG: 852318 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3858 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* rpcsvc: remove .vector_actor and related changesAnand Avati2012-08-201-8/+8
| | | | | | | | | | | | | The .vector_actor method of rpcsvc_actor_desc is defunct now after rpc unification. Remove the field and all related usage of it. Change-Id: I53048cebeae78f50259e8c4a7fec3497691fe388 BUG: 762935 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3832 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* rpc: Reduce frame-timeout for glusterd connectionsKaushal M2012-08-171-3/+2
| | | | | | | | | | | | | | | | Reduce frame-timeout for glusterd connections from 30mins to 10 mins. 30mins is too long when compared to cli timeout of 2mins. Changing to 10mins reduces the disparity between cli and glusterd. Also, fix glusterfs_submit_reply() so that a reply is sent even if serialize failed. Change-Id: Id5f68f2ff28ea7453d9a62429fe12aa0c0a66952 BUG: 843003 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3803 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterfs_ctx_t: un-globalize the filesystem contextAnand Avati2012-07-171-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | So far there has been a global glusterfs_ctx_t object which represents the running instance of the filesystem (client or server). It contains the various graphs, connection to the management daemon over which new graphs are obtained, calls stacks issued on this filesystem, and a bunch of such things. With the introduction of libgfapi, it is no more true that there will be only one filesystem context in a process. Applications can be written to use libgfapi and obtain serveral instances of different filesystems/volumes in the same process. This involves messy untangling of assumptions inside libglusterfs that there would only be one global glusterfs_ctx_t and offload that assumption to glusterfsd/ and cli/ (where it is true). Change-Id: Ifd7d1259428c26076140a5764a2dc7361694139c BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3678 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* remove useless if-before-free (and free-like) functionsJim Meyering2012-07-131-46/+23
| | | | | | | | | | | | See comments in http://bugzilla.redhat.com/839925 for the code to perform this change. Signed-off-by: Jim Meyering <meyering@redhat.com> BUG: 839925 Change-Id: I10e4ecff16c3749fe17c2831c516737e08a3205a Reviewed-on: http://review.gluster.com/3661 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* calls to dict_allocate_and_serialize() are not 64-bit cleanKaleb S. KEITHLEY2012-07-121-7/+7
| | | | | | | | | | | | | | | | | | | | | | | All calls to dict_allocate_and_serialize() pass the address of a 32-bit type, but must cast it to the 64-bit pointer type (size_t *). This happens to work on LE machines, but even if it's apparently benign, it's still a bug. On BE machines it is not benign. GF_PROTOCOL_DICT_SERIALIZE() hacks around it by creating a size_t temp var, but that's, well, a hack, IMO when you consider that all the callers are actually passing &<u_int>; the param should just be a u_int * and eliminate the buggy casts and the temp var in the macro. Nobody apparently uses the Fedora/EPEL PPC RPMs, but they might. People are trying to build gluster.org bits on SPARC and tripping over this. Change-Id: I92ea139f9e3e91ddbbb32a51b96fa582a9515626 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> BUG: 838928 Reviewed-on: http://review.gluster.com/3642 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfsd: don't ignore tmpfile write failure (2x)Jim Meyering2012-07-111-0/+7
| | | | | | | | | | | | | | | | | | | In both glusterfs_volfile_reconfigure and mgmt_getspec_cbk, we fwrite to a temporary file, fflush the stream, and then rewind and read from it. However, if either the fwrite or fflush were to fail, we would have ignored a write failure and would then read and process corrupt or incomplete input. In each case, add a test of ferror so that we don't ignore the write failure. Found by inspection. Change-Id: I8e84deb7d020a907870c9da2dde5c7371ce6ddb7 BUG: 789278 Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-on: http://review.gluster.com/3648 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc: add extra arguments to _callback's actor functionAmar Tumballi2012-07-111-4/+8
| | | | | | | | | | | | | Need to differentiate the callback functions based on which rpc-clnt the callback is received. without it, all callback actor handling will be like global. BUG: 839345 Change-Id: Ide024f5585eab3c5fe6c3b33250772fb6e8ad655 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.com/3656 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/dht: Remove dht dependency on glusterfsd-mgmtshishir gowda2012-06-291-0/+21
| | | | | | | | | | | | | | | glusterfs_ctx->notify can be used by any xlator to talk to glusterfsd-mgmt. Note- This is for any rpc communication initiated by the xlator, and not from glusterd. Change-Id: Ic0e4af106fe1e98d797ca621facda8839b87598a BUG: 835757 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.com/3618 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfsd: further fd leak fixes for graph changeCsaba Henk2012-06-051-0/+6
| | | | | | | | | Change-Id: I8e23d6bb95cddbb3862c524d79d1a956956b7a51 BUG: 789278 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3527 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: coverity fixes (mostly resource leak fixes)Amar Tumballi2012-06-051-0/+3
| | | | | | | | | | | currently working on obvious resource leak reports in coverity Change-Id: I261f4c578987b16da399ab5a504ad0fda0b176b1 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 789278 Reviewed-on: http://review.gluster.com/3265 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfs/rebalance: Register cbk for glusterfs_rebalance_event_notifyshishir gowda2012-05-181-1/+43
| | | | | | | | | | | | | | In case of n/w failures, cbk needs to be passed to mgmt_submit_request. Change-Id: I519720dbdde4c8d46381144403751bf7ed6d3a51 BUG: 822086 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/3359 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfsd: Change a free() to GF_FREE()Kaushal M2012-04-261-1/+1
| | | | | | | | | Change-Id: I19bad33864b67e7ac79d8c5e642efa19dbc5bd80 BUG: 816163 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3231 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* rebalance: handshake_event_notify to make fsd talk to glusterdshishir gowda2012-04-251-0/+80
| | | | | | | | | | | | | | | | | | | Event_notify can be used by others to communicate with glusterd. A cbk event is also added for future use. req has a op, and dict. rsp has op_ret, op_errno, and dict. With this, rebalance process can update the status before exiting. Signed-off-by: shishir gowda <shishirng@gluster.com> Change-Id: If5c0ec00514eb3a109a790b2ea273317611e4562 BUG: 807126 Reviewed-on: http://review.gluster.com/3013 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd,glusterfsd : Perform proper cleanup of connections and socket filesKaushal M2012-04-231-28/+42
| | | | | | | | | | | | | | | | | | Perform proper disconnections and cleanup in glusterd on stopping nfs-server and self-heal daemon processes to prevent glusterd from opening unneded unix domain socket connections. glusterfsd processes will cleanup the socket files properly in cleanup_and_exit() to prevent junk socket files. Also, fix rpcsvc_program_unregister() to preform the unregistering properly. Change-Id: I1c7302c1166cf43feba1c7a813c3dc10169dc53a BUG: 810089 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3168 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
* glusterfsd: print entire path of functions whenever serializing a reply failsRaghavendra Bhat2012-04-231-1/+1
| | | | | | | | | Change-Id: I72c0296e16c90ec09ecb1678b4c78e8ffd834580 BUG: 814926 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/3205 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Fix compiler warnings and typos from Debian build.Jeff Darcy2012-04-101-1/+1
| | | | | | | | | | | | | Mostly to do with "-Werror=format-security" being buggy, but while we're here we might as well fix some typos and such. Credit goes to Patrick Matthäi <pmatthaei@debian.org> for pointing these out. Change-Id: Ia32d1111d7c10b1f213df85d86b17a1326248ffd BUG: 811387 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3117 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: fix all the iobuf related refs and unrefsAmar Tumballi2012-03-291-5/+3
| | | | | | | | | | | | | | reviewed the code against all the possible places where iobuf/iobref ref unref are present, and hopefully fixed most of the issues around memory leaks with respect to iobuf Change-Id: I9aa30326962991f8e23acedd389a0e962e097885 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 797875 Reviewed-on: http://review.gluster.com/2994 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli,glusterd: more volume status improvementsKaushal M2012-03-291-20/+58
| | | | | | | | | | | | | | | | | | | | | | The major changes are, * "volume status" now supports getting details of the self-heal daemon processes for replica volumes. A new cli options "shd", similar to "nfs", has been introduced for this. "detail", "fd" and "clients" status ops are not supported for self-heal daemons. * The default/normal ouput of "volume status" has been enhanced to contain information about nfs-server and self-heal daemon processes as well. Some tweaks have been done to the cli output to show appropriate output. Also, changes have been done to rebalance/remove-brick status, so that hostnames are displayed instead of uuids. Change-Id: I3972396dcf72d45e14837fa5f9c7d62410901df8 BUG: 803676 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3016 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Revert "core: enable process to return the appropriate error code"Amar Tumballi2012-03-221-26/+10
| | | | | | | | | This reverts commit 16717f4df7b0fbd3c255f5faf8a2744444231bb7 Change-Id: I65624db4d31e11e1bec66b07b352ce823ef069b9 Reviewed-on: http://review.gluster.com/3001 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* core: enable process to return the appropriate error codeAmar Tumballi2012-03-211-10/+26
| | | | | | | | | | | | | Credit of this patch goes to Avati <avati@gluster.com> as I just did a rebase to the lastest master. Change-Id: I53b2adf90fd9808433bdc35b57dad0682bc90860 BUG: 762935 Signed-off-by: Amar Tumballi <amar@gluster.com> Reviewed-on: http://review.gluster.com/579 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfsd: Handle errors in response sendPranith Kumar K2012-03-171-17/+20
| | | | | | | | | Change-Id: I2d0a136fdfc4c86fb89cff5565efbf4af80e1edf BUG: 799265 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2961 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli, glusterd, nfs: "volume status|profile|top" for nfs serversKaushal M2012-03-141-3/+244
| | | | | | | | | | | | | | | | | | | | | | Enables usage of volume monitoring operations "volume status", "volume top" and "volume profile" for nfs servers. These operations can be performed on nfs-servers by passing "nfs" as an option in cli. The output is similar to the normal brick outputs for these commands. The new syntaxes for the changed commands are as below, #gluster volume profile <VOLNAME> {start|info|stop} [nfs] #gluster volume top <VOLNAME> {[open|read|write|opendir|readdir [nfs]] |[read-perf|write-perf [nfs|{bs <size> count <count>}]]} [brick <brick>] [list-cnt <count>] #gluster volume status [all | <VOLNAME> [nfs|<BRICK>]] [detail|clients|mem|inode|fd|callpool] Change-Id: Ia6eb50c60aecacf9b413d3ea993f4cdd90ec0e07 BUG: 795267 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2820 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
* glusterfsd: handle a case of NULL dereference during rebalanceAmar Tumballi2012-03-121-0/+5
| | | | | | | | | Change-Id: I9dbe1235f9b5eb7dd43c92bd46830ed9e5734768 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 801787 Reviewed-on: http://review.gluster.com/2924 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* glusterfsd: Unref iobuf after using itPranith Kumar K2012-03-051-0/+2
| | | | | | | | | Change-Id: Ieefc08d9af2125fabc2a86e5ff3a933aec539da0 BUG: 799882 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2866 Reviewed-by: Raghavendra G <raghavendra@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>