summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gfapi: backport handles to 3.4 for nfs-ganeshav3.4.2qa2Kaleb S. KEITHLEY2013-12-0415-44/+3229
| | | | | | | | | | | | nfs-ganesha-2.0 will ship shortly. It depends on the gfapi handle support, which won't otherwise be released until 3.5 sometime in 2014. Change-Id: I104d6fb275bb2c710790340fdc7d998446403026 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6394 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: handle NULL check before strlen/strcmp in fgetxattrAnand Avati2013-12-041-1/+1
| | | | | | | | | | | xattr name can legally be NULL. Handle that case without crashing. Change-Id: Ie214cb05ccd52565dc247a9234ad83ae799d3866 BUG: 1036879 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6420 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: submit RPC requests without holding big lockAnand Avati2013-12-041-4/+27
| | | | | | | | | | | | | If the endpoint of an RPC is not connected, the callback is called synchronously within rpc_clnt_submit(). Since callbacks typically hold the big lock, give up the big lock before calling rpc_clnt_submit and acquire it freshly after the call. Change-Id: Id89d8dd86c1a4012739ef4af7ea0935492b1a02b BUG: 1037849 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6414 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* protocol/client: handle network disconnect/reconnect properlyAnand Avati2013-12-031-0/+1
| | | | | | | | | | | | | if client/server state versions match, we still need to notify parent xlators of reconnection (CHILD_UP) because they were notified of CHILD_DOWN at the time of disconnection. Change-Id: I36c4bde6d8c3db9cb0c48eeb10663b56897c932e BUG: 1037267 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6397 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* cluster/dht: handle NULL check before strlen/strcmp in fgetxattrAnand Avati2013-12-031-0/+1
| | | | | | | | | | | @key can legally be NULL. Handle that case without crashing. Change-Id: Iaae293caa7eeb24afc9cd2580799173e2ce00911 BUG: 1036879 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6402 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-12-011-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: I8f31179ae12c05c9b5406d8e9e28110fcbfac1c7 BUG: 1036102 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6381 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: Change 'volume create' to 'volume create force'v3.4.2qa1Krutika Dhananjay2013-11-261-4/+6
| | | | | | | | | | | | | | | Using 'force' when creating volumes prevents errors when creating bricks in the root partition. This fixes test bug-823081.t for bug-962226 Change-Id: I210ffda6bdc2cced4bd54755a2b44fdfd05b813b Original-author: John Smith <lbalbalba@gmail.com> BUG: 962226 Signed-off-by: John Smith <lbalbalba@gmail.com> Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/6356 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: changes in 'volume create' behaviourKrutika Dhananjay2013-11-2610-27/+445
| | | | | | | | | | | | | Backport of http://review.gluster.org/4740 Note: This patch is needed by oVirt's Gluster Integration Project BUG: 948729 Change-Id: I7a9d7c36b7e15269f95637cd9061abac6f8a97de Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/6355 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: write 'volume rebalance' error message in xml format whenDawit Alemu2013-11-261-4/+12
| | | | | | | | | | | | | | | | | | | | | | --xml is specified When 'volume rebalance' encounters an error the cli prints the error message in plain text independent of whether --xml is specified. This throws off client application that expect xml output (as mentioned in bz1026143). Now, if the --xml flag is supplied, the cli print 'volume rebalance' error messages in xml format. (cherry picked from commit cbb47056ab09ae09eed2550584f190fd5a42fb12) Change-Id: Iec266d56cb2ac34be0ac05a473ae3a08988cca38 BUG: 1026143 Signed-off-by: Dawit Alemu <dalemu@redhat.com> Reviewed-on: http://review.gluster.org/6250 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/dht: set layout in inode ctx even if linkfile failsAnand Avati2013-11-261-1/+1
| | | | | | | | | | | | | Creating linkfile could have failed, but we dont care about linkfile for setting layout in the inode ctx (could be EEXIST etc.) So ignore @inode in cbk and pick it up from local->loc.inode Change-Id: I2952799d7ae0d3441b84b2ca2981afd75d7576e2 BUG: 1032859 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6358 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cli: add peerid to volume status xml outputBala.FA2013-11-263-0/+57
| | | | | | | | | | | | This patch adds <peerid> tag to bricks and nfs/shd like services to volume status xml output. BUG: 955548 Change-Id: I0e58e323534a19d485c9523466bce215bd466160 Signed-off-by: Bala.FA <barumuga@redhat.com> Reviewed-on: http://review.gluster.org/6267 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: use proper copy to set node-nameBala.FA2013-11-261-2/+13
| | | | | | | | | | | | Previously node-name is set to point to node-uuid which could cause memory leak. This is fixed by having memory copy of node-uuid. BUG: 1012296 Change-Id: I4a7123771e2d8c31c5db4f78d022a9f4fbfc2667 Signed-off-by: Bala.FA <barumuga@redhat.com> Reviewed-on: http://review.gluster.org/6331 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: fix errno for non-existent GFIDAnand Avati2013-11-269-12/+23
| | | | | | | | | | | | | | | | When clients refer to a GFID which does not exist, the errno to be returned in ESTALE (and not ENOENT). Even though ENOENT might look "proper" most of the time, as the application eventually expects ENOENT even if a parent directory does not exist, not returning ESTALE results in resolvers (FUSE and GFAPI) to not retry resolution in uncached mode. This can result in spurious ENOENTs during concurrent path modification operations. Change-Id: I7a06ea6d6a191739f2e9c6e333a1969615e05936 BUG: 1032894 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6322 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: remove unnecessary call to glfs_resolve_base()Anand Avati2013-11-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling glfs_resolve_base() on the root inode for every resolver invocation is unnecessary and wasteful. Here are the results from running a test program which performs path based operations (creates and deletes 1000 files): Without patch: [root@blackbox ~]# sync [root@blackbox ~]# time ./a.out 1 real 0m4.314s user 0m1.923s sys 0m1.144s [root@blackbox ~]# sync [root@blackbox ~]# time ./a.out 1 real 0m4.383s user 0m1.940s sys 0m1.177s [root@blackbox ~]# sync [root@blackbox ~]# time ./a.out 1 real 0m4.339s user 0m1.863s sys 0m1.129s With patch: [root@blackbox ~]# sync [root@blackbox ~]# time ./a.out 1 real 0m3.005s user 0m1.162s sys 0m0.816s [root@blackbox ~]# sync [root@blackbox ~]# time ./a.out 1 real 0m3.188s user 0m1.222s sys 0m0.867s [root@blackbox ~]# sync [root@blackbox ~]# time ./a.out 1 real 0m2.999s user 0m1.131s sys 0m0.832s Change-Id: Id160a24f44b4dccfcfce99a6f69ddb8938523cd5 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6321 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: use native STACK_WIND for read _async() callsAnand Avati2013-11-261-10/+81
| | | | | | | | | | | | | There is little value in using synctask wrappers for async IO requests, as STACK_WIND is asynchronous by nature already. Skip going through synctask for read/write async calls. Change-Id: Ifde331d7c97e0f33426da6ef4377c5ba70dddc06 BUG: 1009134 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6325 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: Fix iobuf leaks in gfapiPoornima2013-11-261-5/+5
| | | | | | | | | | | | In glfs_readv, if syncop_readv() fails with return value <= 0 the iobref was not being unrefd which would cause iobuf leaks. Change-Id: I9850ae149e53cf75ba26f8b5f4c5446cce4b5991 BUG: 1018176 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6324 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: wake migration waiters after migrationAnand Avati2013-11-261-0/+3
| | | | | | | | | | | | | Wake call threads which are waiting on migration to complete with a cond_broadcast. Else if any call which arrives right when migration is attempted will end up hanging indefinitely. Change-Id: I7df5298f93998d9a54fb12c16654e62333018ece BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6323 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Backport of http://review.gluster.org/6262Vijaykumar M2013-11-192-7/+49
| | | | | | | | | Change-Id: Id93b6755b9a71044a7ed90ac9c779121160a75e0 BUG: 1030208 Signed-off-by: Vijaykumar M <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/6271 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* mgmt/glusterd: add option to specify a different base-portKaleb S. KEITHLEY2013-11-065-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | This is (arguably) a hack to work around a bug in libvirt which is not well behaved wrt to using TCP ports in the unreserved space between 49152-65535. (See RFC 6335) Normally glusterd starts and binds to the first available port in range, usually 49152. libvirt's live migration also tries to use ports in this range, but has no fallback to use (an)other port(s) when the one it wants is already in use. libvirt cannot fix this in time for their impending release. This is submitted to gerrit to provide some minimal visibility upstream to justify hacking this change (as a temporary patch) into the glusterfs-3.4.1 RPMs for Fedora 18-21 until libvirt can fix their implementation. Change-Id: Ie77b00ac60730d1e48907dd0b38ddae92f3ac345 BUG: 987555 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6147 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavan Pichai <rpichai@redhat.com>
* dual license: update remaining files with correct license textKaleb S. KEITHLEY2013-10-3025-325/+100
| | | | | | | | | | | | | | | Sayan Saha has previously approved changing everthing to dual license but somehow we have missed changing these files. I am explicitly not updating the copyright dates as nothing else that's copyrightable has changed in these files with the license change Change-Id: I498eb648527a2c55a384df335b555bd5c6087e03 BUG: 951551 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6129 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gfapi: fix return value of glfs_finiKrishnan Parthasarathi2013-10-301-4/+8
| | | | | | | | | Change-Id: I5b90c7602334226a978bbdae2f9516e8701b403f BUG: 1004519 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6093 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpm: fix "warning: File listed twice: .../glusterd.info"Niels de Vos2013-10-281-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Commit a482e422 added glusterd.info to the %files section of the glusterfs-server package. However, this file was listed already. This causes the following warning when building the RPMs: warning: File listed twice: /var/lib/glusterd/glusterd.info Merging the attributes for /var/lib/glusterd/glusterd.info into one line prevents this warning. This have been merged in the master branch: > Change-Id: I0d518ec186a8725dc4c5cba00b60da83fdadf103 > Reviewed-on: http://review.gluster.org/5836 > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Anand Avati <avati@redhat.com> BUG: 1005161 Change-Id: I98633415675817a6170707ca9170bb59b77d1c24 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/6149 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* glusterd: Fix storing volumes on setting global optsKaushal M2013-10-241-3/+6
| | | | | | | | | | | | | | | | Glusterd would not store all the volumes when a global options were set. When setting a global option, like 'nfs.*' options, glusterd used to modify the volinfo for all the volumes, but would store only the volinfo for the named volume. This lead to mismatch in the persisted and the in-memory representation of those volumes, which lead to problems like peers being rejected because of volume mismatches. BUG: 1012400 Change-Id: I49903baaa4c93088d7c0d03553ccab37036b5426 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/6029 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: add node uuid in rebalance and remove brick status xml outputBala.FA2013-10-243-12/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds node uuid in rebalance/remove-brick status xml output. Output XML will look like <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <volRebalance> <op>3</op> <nodeCount>1</nodeCount> <node> <nodeName>localhost</nodeName> ==>> <id>883626f8-4d29-4d02-8c5d-c9f48c5b2445</id> <files>0</files> <size>0</size> <lookups>0</lookups> <failures>0</failures> <status>3</status> <statusStr>completed</statusStr> </node> <aggregate> <files>0</files> <size>0</size> <lookups>0</lookups> <failures>0</failures> <status>3</status> <statusStr>completed</statusStr> </aggregate> </volRebalance> </cliOutput> Change-Id: Ie2eb6e8d024605326d1a710b7c40ee30139f0f22 BUG: 1012296 Signed-off-by: Bala.FA <barumuga@redhat.com> Reviewed-on: http://review.gluster.org/6032 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Disable eager-locks on NetBSD for 3.4 branchEmmanuel Dreyfus2013-10-241-0/+10
| | | | | | | | | | | | | | As described in https://bugzilla.redhat.com/show_bug.cgi?id=1005526 eager-locks are broken on release-3.4, at least for NetBSD. This change disable them by default, leaving the admin the possibility to explicitely enable the feature if needed. BUG: 1005526 Change-Id: I6f1b393865b103ec56ad5eb5143f59bb8672f19c Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6020 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: skipped tag in xml output of rebalance/remove-brick statusAravinda VK2013-10-241-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Skipped files count is available in CLI output of rebalance status and remove-brick status, but not available in xml output. Example output: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <volRebalance> <op>3</op> <nodeCount>1</nodeCount> <node> <nodeName>localhost</nodeName> <files>0</files> <size>0</size> <lookups>0</lookups> <failures>0</failures> <skipped>0</skipped> <status>0</status> <statusStr>completed</statusStr> </node> <aggregate> <files>0</files> <size>0</size> <lookups>0</lookups> <failures>0</failures> <skipped>0</skipped> <status>0</status> <statusStr>completed</statusStr> </aggregate> </volRebalance> </cliOutput> BUG: 1012772 Change-Id: I4f5128c3fa3b2b791bcbaf41ac7f229f80bfefe9 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/6000 Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/6119 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: runtime in xml output of rebalance/remove-brick statusAravinda VK2013-10-241-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "runtime in secs" is available in the CLI output of rebalance status and remove-brick status, but not available in xml output when --xml is passed. runtime in aggregate section will be max of all nodes runtimes. Example output: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <volRebalance> <op>3</op> <nodeCount>1</nodeCount> <node> <nodeName>localhost</nodeName> <files>0</files> <size>0</size> <lookups>0</lookups> <failures>0</failures> <skipped>0</skipped> <runtime>1.00</runtime> <status>3</status> <statusStr>completed</statusStr> </node> <aggregate> <files>0</files> <size>0</size> <lookups>0</lookups> <failures>0</failures> <skipped>0</skipped> <runtime>1.00</runtime> <status>3</status> <statusStr>completed</statusStr> </aggregate> </volRebalance> </cliOutput> BUG: 1012773 Change-Id: I6de59d4ed03983b6ffc014d6a331251cf635a690 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/5997 Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/6118 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* nfs/mount3: fix crash in subdir resolutionSantosh Kumar Pradhan2013-10-141-1/+1
| | | | | | | | | | | | | | | | | | * __mnt3_resolve_export_subdir_comp: if nfs_entry_loc_fill fails, mres->resolveloc does not contain valid data * gf_log should use 'gfid' instead of mres->resolveloc.inode->gfid * fixes a crash if program flow gets to this line Backport FIX link: http://review.gluster.org/4948 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Change-Id: I6dea17ae3f07210430a0b71bd08be6f59f739c9a BUG: 1018547 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/6083 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* build: sync glusterfs.spec.in with Fedora glusterfs.specKaleb S. KEITHLEY2013-10-111-5/+14
| | | | | | | | | | | | | (this is the release-3.4 branch) sync with Fedora glusterfs.spec 3.4.1-2+ Change-Id: I13e7161dca969804415045a47e37705819fe173d BUG: 819130 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6058 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* doc: Release notes for 3.4.1Vijay Bellur2013-09-271-0/+144
| | | | | | | | Change-Id: Id4bb25c3fbda52700b1d4d624cd622db3b3c0d8a Signed-off-by: Vijay Bellur <vbellur@redhat.com> BUG: 811311 Reviewed-on: http://review.gluster.org/6011 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* posix-acl: fixup extended ACL entries properlyv3.4.1rc1v3.4.1Anand Avati2013-09-252-1/+46
| | | | | | | | | | | | | | Typically when updating cached ACL from backend, we get both iatt and ACL xattrs (like lookup, readdirplus etc.) However in calls like setattr(), the mode would have updated but we receive only iatt and not the ACL xattrs. In such case we need to "spread" the effects of the changed mode properly into the cached ACL xattr ourselves. Change-Id: I23a7bc9c14722ff6848e175ed4bbe863a21ce2c9 BUG: 998967 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6002 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gNFS: avoid double fd unref in opendirSantosh Kumar Pradhan2013-09-241-3/+1
| | | | | | | | | | | | | | | | Noticed that the fd_unref was called on the fd regardless of the return value at nfs3svc_opendir_readdir_cbk(), hence removing an extra unref in the negative case in nfs_inode_opendir_cbk, which fixes the spurious fd_unref(). Back port of: http://review.gluster.org/4943 (Rajesh Amaravathi) Change-Id: Ibddf487c7890407d01befedd65eefb10cb9c989f BUG: 1011761 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/5996 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/dht: Treat migration failures due to space constraints as skippedv3.4.1qa3shishir gowda2013-09-196-17/+86
| | | | | | | | | | | | | | | | Currently rebalance/remove-brick op's display migration failed count even for files which failed due to space issues (not enough space for file, or migration leading to cluster imbalance) These will now be counted as skipped, and rebalance/remove-brick status will display the additional counter BUG: 989846 Change-Id: I4efa7ce69dd43680ff47181afed0c561954c5080 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/5977 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gfapi: implement a minimial glfs_fini()Anand Avati2013-09-192-4/+74
| | | | | | | | | | | | | At the very least, we should PARENT_DOWN on the currently active graph and disconnect ourselves from glusterd. Further cleanups underway. Change-Id: I9276686a84b0975b5ce272b4cbec1b80920d5c5c BUG: 1004519 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5903 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cli,glusterd: Task parameters in xml outputKaushal M2013-09-194-8/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of 91cd0eae2cc1d96cbafa6457835f146503355238 from master This patch introduces task parameters for the asynchronus task shown in volume status. The parameters are only given for xml output. The parameters shown currently are, - source and destination bricks for replace-brick tasks ...... <tasks> <task> <type>Replace brick</type> <id>3d1a1005-9d2e-4ae0-bd62-577bc1d333a3</id> <status>1</status> <params> <srcBrick>archm:/export/test4</srcBrick> <dstBrick>archm:/export/test-replace1</dstBrick> </params> </task> </tasks> ...... - list of bricks being removed for remove-brick tasks ...... <tasks> <task> <type>Remove brick</type> <id>901c20ca-0da2-41de-8669-5f0caca6b846</id> <status>1</status> <params> <brick>archm:/export/test2</brick> <brick>archm:/export/test3</brick> </params> </task> </tasks> ...... The changes for non-xml output will be done in a subsequent patch. BUG: 916577 Change-Id: Iade8a4974aefc5ffb080553496ae5a3169055090 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5973 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: add aggregate status for rebalance and remove-brick status xml outputKaushal M2013-09-191-1/+15
| | | | | | | | | | | | | | | | | | | Backport of 91e4b7aa1361087317238b9bf6427ef274737c8c from master Add aggregate status information in <aggregate> section of gluster volume 'rebalance status' and 'remove-brick status cli xml output. The aggregate status determined based on the most critical level and the aggregate status will have 'Complete' only when all individual status are 'Complete'. BUG: 1006813 Change-Id: I803d4bfb31dbda53b5665332263576c910562805 Original-author: Timothy Asir <tjeyasin@redhat.com> Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5972 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Don't reset rebalance status on add-brickKaushal M2013-09-191-9/+0
| | | | | | | | | | | | | | | | | | | | | | Backport of 67c28b19355c47e96d1420405cc38753a3e5f9be from master The rebalance status was being reset to 'Not started' when add-brick was performed. This would lead to odd cases where a 'rebalance status' on a volume would show status as 'not started' but would also include the rebalance statistics. This also affected the showing of asynchronus task status in 'volume status' command. By not resetting the status prevent the above issues from happening. Since we use the running/not-running of the rebalance process as the check when performing other operations we can safely leave the rebalance stats collected on an add-brick. BUG: 1006247 Change-Id: Idade88d9e5a6f27659490b3e6d85495d426ef0a3 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5971 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpcsvc: allocate large auxgid list on demandAnand Avati2013-09-196-2/+43
| | | | | | | | | | | | | | | | For rpc requests having large aux group list, allocate large list on demand. Else use small static array by default. Without this patch, glusterfsd allocates 140+MB of resident memory just to get started and initialized. Change-Id: I3a07212b0076079cff67cdde18926e8f3b196258 Signed-off-by: Anand Avati <avati@redhat.com> BUG: 953694 Reviewed-on: http://review.gluster.org/5927 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/5928
* mount/fuse: Implement forget in cbks for fuse.Vijay Bellur2013-09-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | With the introduction of inode_ctx_set in fuse as part of 2991503d014, forget cbk gets called for fuse xlator. Though nothing needs to be done inf forget_cbk, excessive log messages of the following kind are observed: [2013-09-16 06:09:50.758063] W [defaults.c:1331:default_forget] (-->/usr/local/lib/glusterfs/3git/xlator/mount/fuse.so(+0xa1f2) [0x7f51432781f2] (-->/usr/local/lib/libglusterfs.so.0(inode_unref+0x3c) [0x7f5144e5 816c] (-->/usr/local/lib/libglusterfs.so.0(+0x2d061) [0x7f5144e58061]))) 0-fuse: xlator does not implement forget_cbk This patch prevents such log messages from being seen. Signed-off-by: Vijay Bellur <vbellur@redhat.com> BUG: 979910 Change-Id: Ie5874138f46822b10ff4213bd1134d78330ec460 Reviewed-on: http://review.gluster.org/5932 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5975 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cli: Fix 'status all' xml output when volumes are not startedKaushal M2013-09-192-10/+38
| | | | | | | | | | | | | | Backport of 7d9bc0d21408c31651a65a6ec0e67c3b8acd0fde from master CLI now only outputs one XML document for 'status all' only containing those volumes which are started. BUG: 1004218 Change-Id: I119ac40282380886b46a09fd9a19d35115fd869d Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5970 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: Add statusStr xml tag to task list and rebalance/remove brick statusKaushal M2013-09-193-19/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of cd7951aa31ae4bbdf35fc6d1f2466636844b889d from master New xml tag statusStr added to following gluster cli commands gluster volume status all --xml (For Task status) gluster volume rebalance <VOLNAME> status --xml gluster volume remove-brick <VOLNAME> <BRICK1..> status --xml Example(volume status all): <task> <type>Rebalance</type> <id>82d8d122-8738-4144-8507-d93fc98b61df</id> <status>3</status> <statusStr>completed</statusStr> </task> Example(volume rebalance <VOL> status) <node> <nodeName>localhost</nodeName> <files>0</files> <size>0</size> <lookups>0</lookups> <failures>0</failures> <status>3</status> <statusStr>completed</statusStr> </node> Also modified task status as string instead of showing number in gluster volume status all Example: Status of volume: gv1 Gluster process Port Online Pid ------------------------------------------------------------------------------ Brick sumne.sumne:/gfs/b1 49154 Y 15489 Brick sumne.sumne:/gfs/b2 49155 Y 15493 NFS Server on localhost N/A N 15913 Task ID Status ---- -- ------ Rebalance 82d8d122-8738-4144-8507-d93fc98b61df completed BUG: 1003521 Change-Id: I2f6845b621cbd5a74aeb3a3195f944536745e0ec Original-author: Aravinda VK <avishwan@redhat.com> Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5969 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: Remove grep process entries from pidgrepRaghavendra Talur2013-09-151-1/+1
| | | | | | | | | | | | | | | | | | Problem: We were picking process with lowest pid from ps|grep result. However, lowest pid need not be oldest process as recycling of PIDs can take place. Solution: Removed grep process entries from ps entries using grep -v grep. Change-Id: I2b9687a05a34cf6358f773183770d69a3fb9eb10 BUG: 858488 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/5930 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Calculate volume op-versions only on set/resetv3.4.1qa2Kaushal M2013-09-133-6/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/5568 The volume op-versions are calculated during a volume set/reset, reading a volume from disk and importing a volume during probe or volume sync. The calculation of the volume op-version depends on the clusters op-version as some features are enabled automatically depending on the clusters op-version. We also don't store the volume op-versions persistently and don't export the volume op-versions during sync. Due to this, there can occur cases which will lead to inconsistencies in volumes in different peers. One such case is below, Consider, a cluster made up 3 peers P1, P2 and P3, operating at op-version N. The cluster has two volumes V1 and V2, which have volume op-versions N (since volume op-version cannot be greater than cluster op-version). We have, Cluster-op-version = N V1 op-version = N V2 op-version = N A set operation on V1 causes the clusters op-version to be bumped up to N+1. Assume that there exist some features that are automatically enabled on op-version N+1. The op-version of V2 remains at N as no operation has been performed on it. So, Cluster op-version = N+1 V1 op-version = N+1 V2 op-version = N Now, we probe a new peer P4. On the new peer we will have the following op-versions, Cluster op-version = N+1 V1 op-version = N+1 V2 op-version = N+1 This happens because we don't send volume op-versions during the sync after probe. P4 will freshly calculate the op-version of V2 (assuming features have been auto enabled due to the cluster op-version being N+1) as N+1. Another case is when glusterd on a peer restarts. Assume P3 was restarted, glusterd will recalculate the volume op-versions during the restore state. Again, op-version of V2 will be calculated as N+1 assuming auto enabled features. This will lead to inconsistency in the volume representation in memory and on disk, as glusterd will assume the volume contains auto enabled features, but the volfiles don't contain them as they were not regenrated. These kind of issues can be solved by calculating the volume op-version only when features are enabled and disabled (ie. during volume set/reset), persisting the volume-op-versions and exporting/importing them. BUG: 1005043 Change-Id: Id8bb05ba2a77e510739b3b1833f98b4d6d1fa4d7 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5832 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Use volume op-versions during volgenKaushal M2013-09-134-19/+14
| | | | | | | | | | | | | | | | | Backport of '3af61d6 glusterd: Use volume op-versions during volgen' from master Instead of using the cluster op-version, volume op-version is used to enable open-behind during volgen. For doing this, the volume op-versions are updated before regenerating the volfiles. BUG: 990830 Change-Id: I07e4a34004816c803fcbb3ee1ddd4b1e4c3a8006 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5831 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd: Update sub_count on remove brickVijay Bellur2013-09-132-0/+26
| | | | | | | | Change-Id: I7c17de39da03c6b2764790581e097936da406695 BUG: 1002556 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5902 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Allow bumping down a peer's op-version during probev3.4.1qa1Kaushal M2013-09-102-28/+9
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/5715 Earlier, a peer running a higher op-version couldn't be probed into a cluster running at a lower op-version. This created issues when trying to expand an upgraded cluster. This patch changes this behaviour. The cluster no longer rejects a peer being probed if its op-version is higher than the cluster op-version. The peer will reduce its op-version if it doesn't have any volumes. If the peer contains volumes and needs to reduce its op-version, it fails the handshake and the probe fails. BUG: 1005038 Change-Id: Iabe790a9f826a4ac63d379eeeba01efcfef01f4d Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5834 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: Ignore subvols with error in min-free-disk/inodesAmar Tumballi2013-09-105-17/+86
| | | | | | | | | | | | | | | | | | | Currently when selecting a alternative subvolume when hashed subvol has exceeded min-free-disk/inodes, we do not check if layouts have errors (including decommissioning). This leads to data being written to those subvolumes, and in case of decommissioning, will lead to data loss. BUG: 982919 > Original-Author: shishir gowda <sgowda@redhat.com> > Reviewed-on: http://review.gluster.org/5299 Change-Id: If301a86cf3ca5fad6529bd2e61382f9901663ba0 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/5888 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* rpc: fix typo which refers glibc macroAnand Avati2013-09-101-1/+1
| | | | | | | | | | | | | A typo which read MAX_AUTH_BYTES instead of GF_MAX_AUTH_BYTES was picking the value 400 instead of the larger 2048. This causes failures when number of aux group ids is a large number. Change-Id: Idb8d59aee2690fd53e24c2e09f58a16fe387ef27 BUG: 1000131 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5854 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: fix for not able to rename foldersRaghavendra Talur2013-09-101-8/+11
| | | | | | | | | | | | If oldname is being renamed to newname, we need to check for type of newname only if newname exists. Change-Id: I068a283f9ffe67fcd5e8754d6bf052a2339efbf2 BUG: 953694 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/5886 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: fix glfs_readlink()Anand Avati2013-09-101-1/+6
| | | | | | | | | | | | glfs_readlink() is supposed to memcpy the buffer pointer returned by syncop_readlink(). Fix it. Change-Id: I5936b07abbd93cf02b354233dc60f6623e30a38b BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5885 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>