summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* tools/glusterfind: Do not show session corrupted if no status fileAravinda VK2015-08-271-1/+1
| | | | | | | | | | | | | | | | | When a glusterfind session is created it creates session directories in all the nodes which are part of the Volume. But session status file only present in initiated node. Show Session corrupted only if status file exists and invalid content. Change-Id: I8443c0335b872645b54c0aa77d9893dbe2589c92 Signed-off-by: Aravinda VK <avishwan@redhat.com> BUG: 1243838 Reviewed-on: http://review.gluster.org/11699 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Milind Changire <mchangir@redhat.com> Reviewed-by: Kotresh HR <khiremat@redhat.com>
* tools/glusterfind: Prepend prefix in case of deleteSaravanakumar Arumugam2015-08-263-16/+23
| | | | | | | | | | | | | | | In case of delete operation alone, output prefix adding was not handled earlier. Output prefix is added now. Change-Id: Ia91444dddbff501b26a864f6185ca4c0aaf4c802 BUG: 1244144 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/11712 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Milind Changire <mchangir@redhat.com>
* protocol/server : porting missing gf_log's to gf_msgManikandan Selvaganesh2015-08-264-17/+63
| | | | | | | | | Change-Id: I8818931fafea3c013551a5de23a9f77c81164841 BUG: 1252808 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/11895 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* snapshot:cleanup snaps during unprobeMohammed Rafi KC2015-08-264-22/+104
| | | | | | | | | | | | | | | When doing an unprobe, the volume that doesnot contain any brick of the particular node will be deleted. So the snaps associated with that volume should also delete Change-Id: I9f3d23bd11b254ebf7d7722cc1e12455d6b024ff BUG: 1203185 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/9930 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* glusterd: Don't allow remove brick start/commit if glusterd is down of the ↵Atin Mukherjee2015-08-263-31/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | host of the brick remove brick stage blindly starts the remove brick operation even if the glusterd instance of the node hosting the brick is down. Operationally its incorrect and this could result into a inconsistent rebalance status across all the nodes as the originator of this command will always have the rebalance status to 'DEFRAG_NOT_STARTED', however when the glusterd instance on the other nodes comes up, will trigger rebalance and make the status to completed once the rebalance is finished. This patch fixes two things: 1. Add a validation in remove brick to check whether all the peers hosting the bricks to be removed are up. 2. Don't copy volinfo->rebal.dict from stale volinfo during restore as this might end up in a incosistent node_state.info file resulting into volume status command failure. Change-Id: Ia4a76865c05037d49eec5e3bbfaf68c1567f1f81 BUG: 1245045 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11726 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* tests: Fix corruption of files on NetBSDRaghavendra Talur2015-08-251-13/+15
| | | | | | | | | | | | | | | | | | | This is one more attempt to eliminate corruption of files by our tests scripts on NetBSD. Changes done: 1. Have every local variable with a unique name. 2. Change date format to match with gluster's. 3. Pass the parameters to G_LOG without interpretation, hence the change from $* to $@. Change-Id: I833a93555da93179a1b39a9e4e7086216c335c3d BUG: 1251592 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/11993 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com>
* glusterd : Display status of Self Heal Daemon for disperse volumeAshish Pandey2015-08-251-16/+22
| | | | | | | | | | | | | | | | | Problem : Status of Self Heal Daemon is not displayed in "gluster volume status" As disperse volumes are self heal compatible, show the status of self heal daemon in gluster volume status command Change-Id: I83d3e6a2fd122b171f15cfd76ce8e6b6e00f92e2 BUG: 1217311 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/10764 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* cluster/afr : Examine data/metadata readable for read-subvolAnuradha Talur2015-08-253-23/+118
| | | | | | | | | | | | | | | | | | During lookup and discover, currently read_subvol is based only on data_readable. read_subvol should be decided based on both data_readable and metadata_readable. Credits to Ravishankar N for the logic of afr_first_up_child from http://review.gluster.org/10905/ . Change-Id: I98580b23c278172ee2902be08eeaafb6722e830c BUG: 1240244 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/11551 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* afr: modify afr_txn_nothing_failed()Ravishankar N2015-08-253-12/+94
| | | | | | | | | | | | | | | | | | In an AFR transaction, we need to consider something as failed only if the failure (either in the pre-op or the FOP phase) occurs on the bricks on which a transaction lock was obtained. Without this, we would end up considering the transaction as failure even on the bricks on which the lock was not obtained, resulting in unnecessary fsyncs during the post-op phase of every write transaction for non-appending writes. Change-Id: Iee79e5d85dc7b4c41459d8bdd04a8454bdaf9a9d BUG: 1250170 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/11827 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tests: add arbiter-statfs.t/tier.t to bad testsAtin Mukherjee2015-08-251-1/+3
| | | | | | | | | | | | | | | | | | | | Recent regression links for proof: http://build.gluster.org/job/rackspace-netbsd7-regression-triggered/9611/consoleFull https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/9616/consoleFull https://build.gluster.org/job/rackspace-regression-2GB-triggered/13613/consoleFull Filed https://bugzilla.redhat.com/show_bug.cgi?id=1256588 for tracking arbiter-statfs.t spurious failure and https://bugzilla.redhat.com/show_bug.cgi?id=1231268 is going to track tier.t's issue. https://bugzilla.redhat.com/show_bug.cgi?id=1231268 Change-Id: I61dc8f3d3366b2c784e3ce82bd88900f2651cbef BUG: 1254127 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/12005 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: avoid mknod on decommissioned brickSusant Palai2015-08-252-35/+334
| | | | | | | | | | Change-Id: I8c39ce38e257758e27e11ccaaff4798138203e0c BUG: 1256243 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/11998 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* heal: Add check for healing directories in split-brainRavishankar N2015-08-241-1/+27
| | | | | | | | | | | | | | 1. Healing using `bigger-file' option does not make much sense for directories, hence disallow it and notify the user. 2. Healing using 'source-brick' option for directories performs a conservative merge. Notify the user about it. Change-Id: I0acff7b438bdb256615ed0f40d45694f37a77dd5 BUG: 1254167 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/11937 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* glusterd: stop all the daemons services on peer detachGaurav Kumar Garg2015-08-244-23/+90
| | | | | | | | | | | | | | | Currently glusterd is not stopping all the deamon service on peer detach With this fix it will do peer detach cleanup properlly and will stop all the daemon which was running before peer detach on the node. Change-Id: Ifed403ed09187e84f2a60bf63135156ad1f15775 BUG: 1255386 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/11509 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* snapshot: Make fops static for correct resolution of symbolsSoumya Koduri2015-08-241-36/+38
| | | | | | | | | | | | | | | Few of the snapshot fops (like 'svc_lookup') may not get resolved while using dynamic loading as there could be other libraries(like libntirpc) with same routine names. Making them static to resolve the same. Change-Id: I6577bf3705864f5583425c94427b4e1025a59bcd BUG: 1248669 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/11805 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* libgfapi: adding 'follow' flag to glfs_h_lookupat()Jiffin Tony Thottan2015-08-248-30/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously glfs_h_lookupat won't follow the symlink, this patch introduces new flag `follow` which will resolve the same. Applications linking against the new library will need to use the new glfs_h_lookupat API call. In order to stay compatible with existing binaries that use the previous glfs_h_lookupat() function, the old symbol needs to stay available. Verification that there are two versions of glfs_h_lookupat: $ objdump -T /usr/lib64/libgfapi.so.0 | grep -w glfs_h_lookupat 0000000000015070 g DF .text 000000000000021e GFAPI_3.7.4 glfs_h_lookupat 0000000000015290 g DF .text 0000000000000008 (GFAPI_3.4.2) glfs_h_lookupat Testing with a binary (based on anonymous_fd_read_write.c from ./tests/) that was linked against the old library: $ objdump -T ./lookupat | grep -w glfs_h_lookupat 0000000000000000 DF *UND* 0000000000000000 GFAPI_3.4.2 glfs_h_lookupat Enable debugging for 'ld.so' so that we can check that the GFAPI_3.4.2 version of the symbol gets loaded: $ export LD_DEBUG_OUTPUT=lookupat.ld.log LD_DEBUG=all $ ./lookupat $ grep -w glfs_h_lookupat lookupat.ld.log.2543 2543: symbol=glfs_h_lookupat; lookup in file=./lookupat [0] 2543: symbol=glfs_h_lookupat; lookup in file=/lib64/libgfapi.so.0 [0] 2543: binding file ./lookupat [0] to /lib64/libgfapi.so.0 [0]: normal symbol `glfs_h_lookupat' [GFAPI_3.4.2] Change-Id: I8bf9b1c19a0585f681bc1a7f84aad1ccd0f75f6a BUG: 1252410 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/11883 Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* snapshot: Fix snapshot info's xml outputAvra Sengupta2015-08-243-1/+45
| | | | | | | | | | | | | | Display description field with (null) if no description is present for the snapshot, instead of removing the field altogether. Change-Id: I965b08cd6e54eea56c32e2712fab7daa8a663f11 BUG: 1250387 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11834 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* snapshot/scheduler: Check if volume exists before adding/editing schedulesAvra Sengupta2015-08-231-21/+67
| | | | | | | | | | | | | | | Before adding or editing a scheduler, check if the volume name provided in the schedule, exists in the cluster or not. Added return code VOLUME_DOES_NOT_EXIST(17) for the same. Change-Id: Ia3fe3cc1e1568ddd10f9193bbf40a098f0fe990a BUG: 1213349 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11830 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* snapshot: Log deletion of snapshot, during auto-deleteAvra Sengupta2015-08-232-2/+8
| | | | | | | | | | | | | | | | | When auto-delete is enabled, and soft-limit is reached, on creation of a snapshot, the oldest snapshot for that volume is deleted. Displaying a warning log before deleting the oldest snapshot. Change-Id: I75f0366935966a223b63a4ec5ac13f9fe36c0e82 BUG: 1255310 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11963 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* snapshot/scheduler: Output correction of initialisationAvra Sengupta2015-08-231-2/+2
| | | | | | | | | | | Change-Id: I4a6e00805da7b254b8b08e7bb142960fb6c64923 BUG: 1218164 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11924 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* SSL improvements: do not fail if certificate purpose is setEmmanuel Dreyfus2015-08-232-0/+9
| | | | | | | | | | | | | | | Since glusterfs shares the same settings for client-side and server-side of SSL, we need to ignore any certificate usage specification (SSL client vs SSL server), otherwise SSL connexions will fail with 'unsupported cerritifcate" BUG: 1247152 Change-Id: I7ef60271718d2d894176515aa530ff106127bceb Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/11840 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* dht: block/handle create op falling to decommissioned brickSusant Palai2015-08-235-57/+455
| | | | | | | | | | | | | | | | | | | | | | | Problem: Post remove-brick start till commit phase, the client layout may not be in sync with disk layout because of lack of lookup. Hence,a create call may fall on the decommissioned brick. Solution: Will acquire a lock on hashed subvol. So that a fix-layout or selfheal can not step on layout while reading the layout. Even if we read a layout before remove-brick fix-layout and the file falls on the decommissioned brick, the file should be migrated to a new brick as per the fix-layout. Change-Id: If84a12ec34f981adb2b9b224e80f535cfe5bf9f2 BUG: 1232378 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/11260 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* features/bitrot: Fix scrubber frequency setKotresh HR2015-08-232-5/+22
| | | | | | | | | | | | | | | | | | | | | When bitrot is configured on multiple volumes in a cluster and scrubber-frequency is changed for one volume, it is resetting frequency for all other volumes w.r.t to its scrubber-frequency. This should not happen. Changing scrubber-frequency should affect only that volume on which it is set. This patch fixes the issue. Also restricted the logs to the configure volume. Change-Id: I90d6e864b131e3d8dd4010079a00f924032f2098 BUG: 1252825 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11897 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* event: add dispatched flag to know if event_dispatch was calledKrishnan Parthasarathi2015-08-214-1/+18
| | | | | | | | | | | | | | This is important for glusterfs processes that choose to reconfigure no. of event-threads (a.k.a epoll worker-threads) before they call event_dispatch on the event_pool. glusterd needs this today. Change-Id: Ia8df3c958545324472262c555ed84b71797f002e BUG: 1242421 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/11911 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* afr: launch index heal on local subvols up on a child-up eventRavishankar N2015-08-211-17/+11
| | | | | | | | | | | | | | | | | | | | | | | | Problem: When a replica's child goes down and comes up, the index heal is triggered only on the child that just came up. This does not serve the intended purpose as the list of files that need to be healed to this child is actually captured on the other child of the replica. Fix: Launch index-heal on all local children of the replica xlator which just received a child up. Note that afr_selfheal_childup() eventually calls afr_shd_index_healer() which will not run the heal on non-local children. Signed-off-by: Ravishankar N <ravishankar@redhat.com> Change-Id: Ia23e47d197f983c695ec0bcd283e74931119ee55 BUG: 1253309 Reviewed-on: http://review.gluster.org/11912 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tests: remove unwanted tests from volume-snapshot.tAtin Mukherjee2015-08-211-12/+0
| | | | | | | | | | | | | | | | | | | | volume-snapshot.t failspuriously because of having additional test cases which restarts glusterd and they are really not needed as far as the test coverage is concerned. Currently glusterd doesn't have a mechanism to indicate that volumes handshaking has been completed or not, due to this even if the peer handshaking finishes and all the peers are back to the cluster there could be a case where any command which accesses the volume structure might end up in corruption as volume handshaking is still in progress. This is because of volume list is still not been made URCU protected. Change-Id: Id8669c22584384f988be5e0a5a0deca7708a277d BUG: 1255599 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11972 Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* quota :display the size of soft limit percentageManikandan Selvaganesh2015-08-212-16/+21
| | | | | | | | | | | | | | Display the size equivalent to the soft limit percentage in gluster v quota <volname> list <path> and gluster v quota <volname> list-objects <path> command Change-Id: I31ee82e9e836068348cf9458dcaf13f043d9fd87 BUG: 1248521 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/11808 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* bitrot: Scrubber log should mark bad file as a ALERT in the scrubber logGaurav Kumar Garg2015-08-201-2/+2
| | | | | | | | | | | | If bad file detected by scrubber then scrubber should log that bad file as a ALERT message in scrubber log. Change-Id: I410429e78fd3768655230ac028fa66f7fc24b938 BUG: 1240218 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/11965 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* protocol/server: forget the inodes which got ENOENT in lookupRaghavendra Bhat2015-08-204-22/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | If a looked up object is removed from the backend, then upon getting a revalidated lookup on that object ENOENT error is received. protocol/server xlator handles it by removing dentry upon which ENOENT is received. But the inode associated with it still remains in the inode table, and whoever does nameless lookup on the gfid of that object will be able to do it successfully despite the object being not present. For handling this issue, upon getting ENOENT on a looked up entry in revalidate lookups, protocol/server should forget the inode as well. Though removing files directly from the backend is not allowed, in case of objects corrupted due to bitrot and marked as bad by scrubber, objects are removed directly from the backend in case of replicate volumes, so that the object is healed from the good copy. For handling this, the inode of the bad object removed from the backend should be forgotten. Otherwise, the inode which knows the object it represents is bad, does not allow read/write operations happening as part of self-heal. Change-Id: I23b7a5bef919c98eea684aa1e977e317066cfc71 BUG: 1238188 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/11489 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* quota/marker: fix inode quota with renamevmallika2015-08-197-536/+540
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are three problems with marker-rename which is fixed in this patch Problem 1) 1) mq_reduce_parent_size is not handling inode-quota contribution 2) When dest files exists and IO is happening Now renaming will overwrite existing file mq_reduce_parent_size called on dest file with saved contribution, this can be a problem is IO is still happening contribution might have changed Problem 2) There is a small race between rename and in-progress write Consider below scenario 1) rename FOP invoked on file 'x' 2) write is still in progress for file 'x' 3) rename takes a lock on old-parent 4) write-update txn blocked on old-parent to acquire lock 5) in rename_cbk, contri xattrs are removed and contribution is deleted and lock is released 6) now write-update txn gets the lock and updates the wrong parent as it was holding lock on old parent so validate parent once the lock is acquired Problem 3) when a rename operation is performed, a lock is held on old parent. This lock is release before unwinding the rename operation. This can be a problem if there are in-progress writes happening during rename, where update txn can take a lock and update the old parent as inode table is not updated with new parent Change-Id: Ic3316097c001c33533f98592e8fcf234b1ee2aa2 BUG: 1240991 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11578 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* protocol-client/server: Minor logging improvements for better debuggingAnoop C S2015-08-193-2/+19
| | | | | | | | | | | | Adding some log messages to protocol client and server to ease the debugging process. Change-Id: I84a05fcde7189d6e6ad5c37c1bbffb148d123517 BUG: 1227667 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: http://review.gluster.org/11903 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* libgfapi: non-default symbol version macros are incorrectKaleb S. KEITHLEY2015-08-191-2/+2
| | | | | | | | | | | | | | | default symbol versions are in form glfs_h_lookupat@@GFAPI_2.7.4, versus old, non-default versions are in the form glfs_h_lookup@GFAPI_2.4.2 I.e. "@@" versus "@" Change-Id: I88a6b129558c0b3a6064de7620b3b20425e80bc9 BUG: 1254863 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/11955 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* rpm: include required directory for glusterfindNiels de Vos2015-08-194-9/+16
| | | | | | | | | | | | | | | | | | | The directory was marked as %ghost, which causes the following installation failure: Error unpacking rpm package glusterfs-server-3.8dev-0.446.git45e13fe.el7.centos.x86_64 error: unpacking of archive failed on file /var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post.py;5581f20e: cpio: open Also, *all* Python files should be part of the RPM package. This includes generated .pyc and .pyo files. BUG: 1225465 Change-Id: Iee74905b101912c4a845257742c470c3fe42ce2a Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/11298 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* features/shard: Ensure shards are owned by the same owner/group as the ↵Krutika Dhananjay2015-08-193-31/+106
| | | | | | | | | | | | original file Change-Id: Id759af8f3ff5fd8bfa9f8121bab25722709d42b7 BUG: 1251824 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/11874 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* cluster/tier : Use dht_* versions for xlator_fopsN Balachandran2015-08-181-16/+28
| | | | | | | | | | | | | The tier xlator was using the default_* versions for some xlator_fops. Changed to use the dht_* versions for all xlator_fops Change-Id: I8252fb3911b8a48a55e9eee42b89bd66bbacf799 BUG: 1254451 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/11948 Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* tests: Moving ./tests/basic/mount-nfs-auth.t andAvra Sengupta2015-08-181-0/+3
| | | | | | | | | | | | | | | | ./tests/geo-rep/georep-basic-dr-rsync.t to bad test Till the spurious regression failures are fixed, moving these tests to bad test so as to unblock the NetBSD regression Also added ./tests/geo-rep/georep-basic-dr-tarssh.t to bad test. Change-Id: I8c0cb355a7832a6a794d2d3550d304947e91e936 BUG: 1254127 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11934 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* tiering/glusterd: start tier daemon during volume startMohammed Rafi KC2015-08-174-1/+81
| | | | | | | | | | | | | | | | | | | Tier daemon should always run with tier volume. If volume is stopped and started again, we manually need to start the tier-daemon, instead this patch will automatically trigger tier process along with volume start. A snapshot restored volume will not have node_state_info, so we need to create and store it dynamically Change-Id: I659387c914bec7a1b6929ee5cb61f7b406402075 BUG: 1238593 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/11525 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* xml output: Fix non-uniform opErrstr xml outputAvra Sengupta2015-08-141-2/+9
| | | | | | | | | | | | | | Display <opErrstr/> in case of no operrstr for all xml output of gluster commands. Change-Id: Ie16f749f90b4642357c562012408c434cd38661f BUG: 1245895 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11835 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* cluster/ec: Fix write size in self-healXavier Hernandez2015-08-143-0/+60
| | | | | | | | | | | | | | | | | | Self-heal was always using a fixed block size to heal a file. This was incorrect for dispersed volumes with a number of data bricks not being a power of 2. This patch adjusts the block size to a multiple of the stripe size of the volume. It also propagates errors detected during the data heal to stop healing the file and not mark it as healed. Change-Id: I9ee3fde98a9e5d6116fd096ceef88686fd1d28e2 BUG: 1251446 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/11862 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* rdma:restore device linked list structure in case of failureMohammed Rafi KC2015-08-131-3/+5
| | | | | | | | | | | | | | | We maintain a linked list strcture to store device information, and maintain head in a ctx variable. A new device will be added at the beginning of list. But if the device creation failed, then we need to adjust the linked list to proper state. Change-Id: I07cefd3b808d8973a915728b3ba7f2955d29c92a BUG: 1250297 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11829 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* dht: return non NULL xattr,xdata for ret >= 0Susant Palai2015-08-131-2/+2
| | | | | | | | | | Change-Id: I4a3dd8c00894ceeed4af77df2d960f372281a03b BUG: 1235989 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/11409 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* tests: call cleanup on receiving external signals INT, TERM and HUPPrasanna Kumar Kalever2015-08-131-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | problem: when executing testcases manually, some time we may want to terminate the testcase execution in between due to various reasons. Existing testcase flow has no mechanism to call cleanup before they terminate abnormally, hence we endup with volume setups and mount points uncleaned. Solution: This patch traps such kind of abnormal terminations and calls 'cleanup' function soon after they are caught and then terminates the testcases with appropriate status.. $ ./tests/basic/mount-nfs-auth.t 1..87 ========================= TEST 1 (line 8): glusterd ok 1 RESULT 1: 0 ========================= TEST 2 (line 9): pidof glusterd ok 2 RESULT 2: 0 ========================= TEST 3 (line 10): gluster -mode=script --wignore volume info No volumes present ok 3 RESULT 3: 0 ^C received external signal --INT--, calling 'cleanup' ... $ glusterd && gluster vol status No volumes present Change-Id: Ia51a850c356e599b8b789cec22b9bb5e87e1548a BUG: 1252374 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/11882 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* dht/tier :rename fails with EBUSYMohammed Rafi KC2015-08-131-8/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the files was in hot tier and the look up was done already, then hashed and cached subvolume will be hot-tier. Once the file is moved from hot-tier to cold-tier, then subsequent lookup will send a revalidate lookup to hot-tier and it will find out that the file was actually moved and there is only link in the cached subvolume. So dht will return an ESTALE to fuse. Upon receiving ESTALE for a lookup, fuse will create a new inode and sent a fresh lookup. This lookup will be successful, and it will locate the file properly. Then fuse try to link the inode, but the older inode was already there in inmemory inode cache with same gfid and that is also shared with fuse kernal. So inode_link will return the older ionode itself. So the subsequent rename fop will come to gluster with the older inode. From dht_rename, we will take a lock on the inode and after successful inodelk on inode dht will send lookup before creating a link. this lookup will again find out that the file is a link file, and then dht will think that file is migrating/migrated in the mean time, and will send EBUSY. Change-Id: Ib3a01e5b1d7f64514b04bb6234026d049f082679 BUG: 1248306 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/11768 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Dan Lambright <dlambrig@redhat.com>
* cluster/tier: fix 64 bit issue with sql query using timesDan Lambright2015-08-132-6/+6
| | | | | | | | | | | | | We overflowed when converting seconds to usecs in preperation for sql queries. The fix uses uint64_t throughout including subexpressions. Change-Id: I59bdb742197400dede97f54735b52030920b0d19 BUG: 1231268 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/11885 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joseph Fernandes
* posix: posix_make_ancestryfromgfid shouldn't log ENOENTvmallika2015-08-133-8/+16
| | | | | | | | | | | | | | posix_make_ancestryfromgfid shouldn't log ENOENT and it should set proper op_errno Change-Id: I8a87f30bc04d33cab06c91c74baa9563a1c7b45d BUG: 1251449 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/11861 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* cli: changing the assignment to comparison operator on an if statementHari Gowtham2015-08-131-1/+1
| | | | | | | | | | | | | | CID: 1124702 Change-Id: I6366834224a8176824070150b7f2af76b4d65b7f BUG: 789278 Signed-off-by: Hari Gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/11665 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* rpc: add owner xlator argument to rpc_clnt_newKrishnan Parthasarathi2015-08-1215-14/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The @owner argument tells RPC layer the xlator that owns the connection and to which xlator THIS needs be set during network notifications like CONNECT and DISCONNECT. Code paths that originate from the head of a (volume) graph and use STACK_WIND ensure that the RPC local endpoint has the right xlator saved in the frame of the call (callback pair). This guarantees that the callback is executed in the right xlator context. The client handshake process which includes fetching of brick ports from glusterd, setting lk-version on the brick for the session, don't have the correct xlator set in their frames. The problem lies with RPC notifications. It doesn't have the provision to set THIS with the xlator that is registered with the corresponding RPC programs. e.g, RPC_CLNT_CONNECT event received by protocol/client doesn't have THIS set to its xlator. This implies, call(-callbacks) originating from this thread don't have the right xlator set too. The fix would be to save the xlator registered with the RPC connection during rpc_clnt_new. e.g, protocol/client's xlator would be saved with the RPC connection that it 'owns'. RPC notifications such as CONNECT, DISCONNECT, etc inherit THIS from the RPC connection's xlator. Change-Id: I9dea2c35378c511d800ef58f7fa2ea5552f2c409 BUG: 1235582 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/11436 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* dht: remove 'null' for directory/file path from brick log for many operationsSakshi2015-08-121-3/+6
| | | | | | | | | | Change-Id: I39cd2089240c0ad62b749f176847cc5337e57f73 BUG: 1231264 Signed-off-by: Sakshi <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/11206 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* dht : updating return value for layout set functionSakshi2015-08-121-2/+2
| | | | | | | | | | | Change-Id: I7fd89e00b418391afe0a13c2033919c979cc8bbb BUG: 789278 Signed-off-by: Sakshi <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/10869 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* features/bitrot: Fix rescheduling scrub-frequencyKotresh HR2015-08-121-20/+11
| | | | | | | | | | | | | | | | | While rescheduling scrub frequency, boot time of the brick was considered where it is not required and also delta is calculated using unsigned int resulting in the loss of fractional part leading to wrong scrub frequency. Boot time is completely removed and delta calculation is simplified. Change-Id: If54697389f663afc86408dc8a01a3ea07e00f2dc BUG: 1251042 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/11853 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* tests: Disable trace mode in G_LOGRaghavendra Talur2015-08-121-1/+1
| | | | | | | | | | | | | | | We run tests in trace mode(set -x) when re-running failed tests. G_LOG is a util function and it need not be executed in trace mode. Change-Id: I5490bdcacef6856c5501272c8173828c30aaf373 BUG: 1251592 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/11865 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com>