summaryrefslogtreecommitdiffstats
path: root/cli
Commit message (Collapse)AuthorAgeFilesLines
* localtime and ctime are not MT-SAFEKaleb S. KEITHLEY2013-02-083-54/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a number of nit-level issues throughout the source with the use of localtime and ctime. While they apparently aren't causing too many problems, apart from the one in bz 828058, they ought to be fixed. Among the "real" problems that are fixed in this patch: 1) general localtime and ctime not MT-SAFE. There's a non-zero chance that another thread calling localtime (or ctime) will over-write the static data about to be used in another thread 2) localtime(& <64-bit-type>) or ctime(& <64-bit-type>) generally not a problem on 64-bit or little-endian 32-bit. But even though we probably have zero users on big-ending 32-bit platforms, it's still incorrect. 3) multiple nested calls passed as params. Last one wins, i.e. over- writes result of prior calls. 4) Inconsistent error handling. Most of these calls are for logging, tracing, or dumping. I submit that if an error somehow occurs in the call to localtime or ctime, the log/trace/dump still should still occur. 5) Appliances should all have their clocks set to UTC, and all log entries, traces, and dumps should use GMT. 6) fix strtok(), change to strtok_r() Other things this patch fixes/changes (that aren't bugs per se): 1) Change "%Y-%m-%d %H:%M:%S" and similar to their equivalent shorthand, e.g. "%F %T" 2) change sizeof(timestr) to sizeof timestr. sizeof is an operator, not a function. You don't use i +(32), why use sizeof(<var>). (And yes, you do use parens with sizeof(<type>).) 3) change 'char timestr[256]' to 'char timestr[32]' where appropriate. Per-thread stack is limited. Time strings are never longer than ~20 characters, so why waste 220+ bytes on the stack? Things this patch doesn't fix: 1) hodgepodge of %Y-%m-%d %H:%M:%S versus %Y/%m/%d-%H%M%S and other variations. It's not clear to me whether this ever matters, not to mention 3rd party log filtering tools may already rely on a particular format. Still it would be nice to have a single manifest constant and have every call to localtime/strftime consistently use the same format. BUG: 832173 Change-Id: Iee9719db4576eacc6c75694d9107954d0912cba8 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/3613 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* cli: Fix double free in cli_add_key_groupKrishnan Parthasarathi2012-09-141-0/+2
| | | | | | | | | Change-Id: I3c2f030ac7c53913612a3fbac5e582c47b005621 BUG: 851237 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3944 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: Added special key "group" for bulk volume set.Krishnan Parthasarathi2012-09-121-4/+109
| | | | | | | | | | | | | | | | | | gluster volume set VOLNAME group group_name - where group_name is a file under /var/lib/glusterd/groups containing one key, value pair per line as below, key1=value1 key2=value2 [...] - the command sets key1 to value1 and so on. Change-Id: Ic4c8dedb98d013b29a74e57f8ee7c1d3573137d2 BUG: 851237 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3896 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: Proper xml output for "gluster peer status"v3.3.1qa2Kaushal M2012-08-303-5/+160
| | | | | | | | | Change-Id: I90952ba2ea606552cf4ad67dd296a440f90592d6 BUG: 847760 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3870 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli/: Displaying the size in human readable formatVarun Shastry2012-08-201-4/+14
| | | | | | | | | | | | rebalance status displaying the size in bytes. Converted to human readable Change-Id: Id73b6e792c39b85480ddf1dc9c0c22fcaca29530 BUG: 825193 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3810 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* calls to dict_allocate_and_serialize() are not 64-bit cleanKaleb S. KEITHLEY2012-08-031-70/+47
| | | | | | | | | | | | | | | | | | | | | | | 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/3643 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: Change cli output for heal commandsPranith Kumar K2012-08-011-5/+22
| | | | | | | | | BUG: 826406 Change-Id: Ic32c89b92314ee201ec67afc4617e412d4b4c21d Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3636 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Use inet as default listeneEmmanuel Dreyfus2012-07-131-1/+1
| | | | | | | | | | | This is backport of Change-Id: I172570aa58ea08c4c74cfd28f121d3d4e02a55e0 BUG: 764655 Change-Id: I60232b73c303d296e34871ed317925c9af0d322e Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3575 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* NetBSD build fixes.Emmanuel Dreyfus2012-07-051-0/+2
| | | | | | | | | | | This is a backport of Change-Id: Ib8183d4b585465d05a7adf3a4ceae93ae1bded15 BUG: 764655 Change-Id: I552b87b72c234b3a11af6ffd4a03975879602363 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3574 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: Fix time_t conversionsPranith Kumar K2012-06-131-5/+12
| | | | | | | | | | | | | Change-Id: I98eb76e5971ea800a249d21557d5dd4f093fdaaf BUG: 828058 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3534 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Joe Julian <me@joejulian.name> Reviewed-by: Joe Julian <me@joejulian.name> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Self-heald: Print the time stamp of the event-historyPranith Kumar K2012-05-171-1/+18
| | | | | | | | | BUG: 796579 Change-Id: I4c738d9073b53fc3c4d4797b5f01e841dae1b4e9 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3352 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli: fix remove-brick output behavior in failure casesAmar Tumballi2012-05-031-12/+28
| | | | | | | | | | | | | earlier it was dependant on server sending the dict for knowing the command. Now it preserves the dictionary in frame->local, which is used to understand the command. Change-Id: Ica675b497e466f77878f67792ae96b71f0704d6b Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 815745 Reviewed-on: http://review.gluster.com/3235 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com>
* cli: Make use of cli_err()Kaushal M2012-04-262-87/+126
| | | | | | | | | | | Use cli_err() in case of errors instead of cli_out(). Change-Id: Ib0766e59516a1ccd56a2133f33fac3877c4384d6 BUG: 815194 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3229 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* cli: Show proper remove-brick usageshylesh2012-04-251-1/+1
| | | | | | | | | | Change-Id: I669736b34f50caa146eea47dcd8c081f6436a585 BUG: 816051 Signed-off-by: shylesh <shmohan@redhat.com> Reviewed-on: http://review.gluster.com/3224 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com>
* cli: implement a fn 'cli_err()' to send error messages to 'stderr'Amar Tumballi2012-04-254-10/+73
| | | | | | | | | | | | | | we were using 'cli_out()' to send all the possible msgs, which is not very friendly with scripts, because if one want to get only valid output with "<command> 2>/error.log 1>/proper-info.log" Change-Id: I008ebcbd90935c41dbfc1bd2adeb094ed21116cb Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 815194 Reviewed-on: http://review.gluster.com/3208 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli: Return -1 if fix-layout stop is issuedshylesh2012-04-241-0/+1
| | | | | | | | | Change-Id: If2e4b842029a1a720403cbec0c076f3dbf1fc6df BUG: 803971 Signed-off-by: shylesh <shmohan@redhat.com> Reviewed-on: http://review.gluster.com/3216 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com>
* NetBSD build fixesEmmanuel Dreyfus2012-04-231-0/+2
| | | | | | | | | | | Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Change-Id: I8f9aabeadd2f842521a82e59594115bd80155d68 BUG: 2923 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3053 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: fix the output of 'gluster volume list'Amar Tumballi2012-04-231-4/+1
| | | | | | | | | | | | make it script friendly Change-Id: I5b196cf5cf1744090a1360eef95c9a842d7be996 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 815190 Reviewed-on: http://review.gluster.com/3207 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: coverity issues fixedAmar Tumballi2012-04-231-1/+1
| | | | | | | | | | | | this is not a complete set of issues getting fixed. Will address other issues in another patch. Change-Id: Ib01c7b11b205078cc4d0b3f11610751e32d14b69 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 789278 Reviewed-on: http://review.gluster.com/3145 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* cli: Strip whitespace from "volume set" option valuesKaushal M2012-04-201-0/+4
| | | | | | | | | | | | | | Strips the whitespace from options values before sending to glusterd. This prevents options containing whitespace to be written to the volfiles which would cause the volfile parser to fail. Change-Id: I46faee7b0853141fa102d06bb067c7ab499a2f6e BUG: 813937 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3192 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli: do not put the frame->local to mempool since its a calloced structureRaghavendra Bhat2012-04-184-53/+46
| | | | | | | | | | | | | | In cli, frame->local is not allocated from the internal mempool, rather its calloced. So while destroying the stack, we have to set frame->local to NULL. Otherwise if frame->local is not NULL, STACK_DESTROY will try to put it back to the mempool and thus segfault. Change-Id: I5bd17d099e16fb8e73f3250cc022008e26e28f50 BUG: 812735 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/3167 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* cli: Fix for "volume status all"Kaushal M2012-04-172-9/+50
| | | | | | | | | | | | | Fixes output of "volume status all" when some volumes are stopped and some changes to xml output. Change-Id: I77938422c0258bb69e32b54c23df1225474532bc BUG: 811539 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3130 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* dht/rebalance: Display migration failure countshishir gowda2012-04-131-12/+29
| | | | | | | | | | Change-Id: Ib2f8be2c98eae1b4df5d2090c1f1eec8ab264a35 BUG: 811923 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/3135 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd/remove-brick: Replace ABORT with STOPshishir gowda2012-04-132-8/+9
| | | | | | | | | | | | | | Remove-brick stop now invokes rebalance stop. This leads to a graceful stop of decommissioning. The volfile is also updated (removal of decommission) Change-Id: I5a8f725c0f54439b810ce32d988c21c02229c703 BUG: 811513 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/3126 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd/remove-brick: Remove support for pause optionshishir gowda2012-04-132-6/+1
| | | | | | | | | | | Decommissioning through rebalance has no pause option. Change-Id: I90f165cdb2eccfaefc99365ae4b48d81320fb753 BUG: 811459 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/3123 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* Fix compiler warnings and typos from Debian build.Jeff Darcy2012-04-101-3/+3
| | | | | | | | | | | | | 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>
* remove-brick: Abort should revert volume changesshishir gowda2012-04-061-1/+42
| | | | | | | | | | | Also, enhanced gluster cli output. Signed-off-by: shishir gowda <shishirng@gluster.com> Change-Id: I520ccfb63b3568a2e6654d8a5fbf265b9b903af1 BUG: 788524 Reviewed-on: http://review.gluster.com/3082 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli: Limit value of bs * count in "volume top"Kaushal M2012-04-021-0/+8
| | | | | | | | | | | | | The maximum value of bs * count is limited to 10GB. This prevents gluster from returning 0 throughput with large values of bs * count. If throughput for values larger than 10GB is required, use dd. Change-Id: Ia4ea70cb20f3f32b6cb81fd451ad56933f438452 BUG: 803322 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3059 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli/rebalance: Fix parse error for volume rebalance cmdshishir gowda2012-04-021-10/+6
| | | | | | | | | | | gluster volume rebalance <vol> force was handled as a success. Signed-off-by: shishir gowda <shishirng@gluster.com> Change-Id: I4f73aa5935c7e62673d457b52a6dfea6c7197dcc BUG: 808991 Reviewed-on: http://review.gluster.com/3064 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli: do the proper STACK_DESTORY of created framesAmar Tumballi2012-04-023-5/+94
| | | | | | | | | | | | | | * fixes memory leaks * fixes some random local mem-pool empty messages Change-Id: Ic79f279f2acfe4722fa54d52397d0267b3918928 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 803638 Reviewed-on: http://review.gluster.com/3018 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli, glusterd : "volume status detail" fixesKaushal M2012-03-291-31/+17
| | | | | | | | | | | | | | | | Use _PATH_MOUNTED, which refers to /etc/mtab, in glusterd_add_brick_mount_details(), instead of _PATH_MNTTAB, which refers to /etc/fstab. More changes to cli to show available information. Change-Id: I9da97c0fec14b3372f281efc0be37b2799bc2d0d BUG: 808044 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3037 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli: give warning to user in add-brick if stripe count givenAmar Tumballi2012-03-291-0/+18
| | | | | | | | | | | | | | | * as it is currently not so well tested, user should get notification about possibility of problems with the volume type changes. * added warning instead of removing the feature because with keeping an option we can enhance what is there already. Change-Id: I6cf3491870ac2e50e85c5dbe15c61622a47c18cb Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 787967 Reviewed-on: http://review.gluster.com/3034 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-294-76/+187
| | | | | | | | | | | | | | | | | | | | | | 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>
* cli: Display available information in "volume status detail"Kaushal M2012-03-212-23/+46
| | | | | | | | | | | | | Display the available information in "volume status detail", without failing and erroring out if some information is missing. Change-Id: If8edc268fe91ca9c681f25135738a75eec43b8c3 BUG: 765464 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2989 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* mgmt/glusterd : volume set validation fixesKaushal M2012-03-182-77/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | This is the new version of the patch by Kaushik at review.gluster.com/699 The following new option types have been introduced: * GF_OPTION_TYPE_INTERNET_ADDRESS_LIST * GF_OPTION_TYPE_PRIORITY_LIST * GF_OPTION_TYPE_SIZE_LIST and option types of several options in translators have been updated to use the new types. valid_internet_address(), valid_ipv4_address() & valid_ipv6_address() functions has been updated for * wildcard matching. Previously used standalone wildcard address checking functions have been removed. Changes have been done to stripe translator to correctly set, update and use stripe-blocksize. Also minimum value for block-size has been set to 16KB. Change-Id: I2aa484ff695f6a915a8fc9a9f965cf0344f41d59 BUG: 765248 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2899 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Self-heald: Handle errors gracefully and show errors to usersPranith Kumar K2012-03-182-12/+14
| | | | | | | | | Change-Id: I5424ebfadb5b2773ee6f7370cc2867a555aa48dd BUG: 800352 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2962 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli/remove-brick: Enhance remove-brick status to displayshishir gowda2012-03-171-46/+76
| | | | | | | | | | | | | Rebalance status now contains info from all nodes. Signed-off-by: shishir gowda <shishirng@gluster.com> Change-Id: I6208c9879927fb6ddc0713c1480feadcf4f3fd75 BUG: 797887 Reviewed-on: http://review.gluster.com/2949 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Enable eager-lockPranith Kumar K2012-03-171-1/+1
| | | | | | | | | | | | | | | | | | Eager-lock is disabled by default. Use cluster.eager-lock on/off to change the config. write-behind on and eager-lock off is not supported configuration. In afr, when eager-lock is enabled the inode lock on fd is taken using the fd address as the lk-owner. So the lock is interchangableale between the inode-locks on the same fd. Change-Id: I7eef1ecd510f8028f5395dee882782da53c0de3f BUG: 802515 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/2925 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: dict allocations through mem-poolAmar Tumballi2012-03-141-0/+12
| | | | | | | | | Change-Id: I7401639060957d437808779745a1e46c3f9f4585 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 798503 Reviewed-on: http://review.gluster.com/2851 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* dht: Rebalance status should display status from each processshishir gowda2012-03-141-42/+63
| | | | | | | | | Change-Id: Id128417219bdb7146253618a5f8f31ef35013894 BUG: 801322 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/2942 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* glusterd: Fix brick op to prevent glusterd crashingKaushal M2012-03-141-2/+2
| | | | | | | | | | | | | | | Was building payload only for node types GD_NODE_BRICK & GD_NODE_NFS. Payload wasn't being built for nodes GD_NODE_SHD & GD_NODE_REBALANCE, which made glusterd crash when those operations were performed. Also fix a compile warning. Change-Id: Id33e21c84901d4d112c54514b7f16add31aeb950 BUG: 803313 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2946 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com>
* core, cli : Changes to statedumpKaushal M2012-03-141-1/+2
| | | | | | | | | | | | | | | | This patch, * Enables missing inodectx, fdctx dumpops for cli statedump command. * Reintroduce changes introduced in statedump.c by 489a7a10 which were overwritten by db20a0f8. * Change strncasecmp() in gf_proc_dump_parse_set_option() to strcasecmp() to properly parse similar options like fd-fdctx, inode-inodectx Change-Id: I85ad854dce73048617b933d29cf360af9d0ed90a BUG: 797788 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2914 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* cli, glusterd, nfs: "volume status|profile|top" for nfs serversKaushal M2012-03-143-35/+114
| | | | | | | | | | | | | | | | | | | | | | 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>
* cli: More xml output changesKaushal M2012-03-133-62/+388
| | | | | | | | | | | | | | | | * Added xml output for "volume quota" which was missing. * Fixed xml output for "volume info all" so that it contains only one xml document * Fixed no xml output for normal "volume status" * Fixed normal output for "volume set" Change-Id: I3d85b6800e428226f2970d669e38e4331c99a218 BUG: 799957 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2868 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd/rebalance: Bring in support for parallel rebalanceshishirng2012-03-071-2/+8
| | | | | | | | | | | | | | | | | This patch, enables rebalance processes to be started on all nodes where the volume is spread across (1 process per node) node-uuid xattr identifies which node takes ownership of the task to migrate the file. The model employed is push (src pushes to dst) Change-Id: Ieacd46a6216cf6ded841bbaebd10cfaea51c16d6 BUG: 763844 Signed-off-by: shishirng <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/2873 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli: Fix volume statedump cli output typoRahul C S2012-03-051-1/+1
| | | | | | | | | Change-Id: I1363123d13fa4364e917344fdd928ac48b85326c BUG: 796617 Signed-off-by: Rahul C S <rahulcs@redhat.com> Reviewed-on: http://review.gluster.com/2807 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* fops/removexattr: prevent users from removing glusterfs xattrsRajesh Amaravathi2012-03-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * Each xlator prevents the user from removing xlator-specific xattrs like trusted.gfid by handling it in respective removexattr functions. * For xlators which did not define remove and fremovexattr, the functions have been implemented with appropriate checks. xlator | fops-added _______________|__________________________ | 1. stripe | removexattr and fremovexattr 2. quota | removexattr and fremovexattr Change-Id: I98e22109717978134378bc75b2eca83fefb2abba BUG: 783525 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/2836 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.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>
* mempool: add more counters to understand the usage scenarios properlyAmar Tumballi2012-02-272-7/+44
| | | | | | | | | | | | | | current design of mempool is to fallback to standard calloc/free if all the buffers in pool are exhausted. Understanding more about those numbers will help us to tune mempool parameters properly over time. Change-Id: I2c94373186f7c6a486caff2611c2d9df2c37db3c Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 797730 Reviewed-on: http://review.gluster.com/2804 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli: Fix broken "volume set help/help-xml"Kaushal M2012-02-271-4/+3
| | | | | | | | | Change-Id: I4e71e67f32ff37cfe23bc77c0e27645ac495a247 BUG: 796040 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2822 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>