summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* doc: add release-notes for 3.8.2v3.8.2Niels de Vos2016-08-101-0/+60
| | | | | | BUG: 1353507 Change-Id: Idf64fc2b79e263582e2e36c02d43f699f28a333b Signed-off-by: Niels de Vos <ndevos@redhat.com>
* storage/posix: fix inode leaksRaghavendra G2016-08-102-1/+6
| | | | | | | | | | | | | | | | | | | | | > Reviewed-on: http://review.gluster.org/14739 > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: N Balachandran <nbalacha@redhat.com> > Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> > Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> BUG: 1365742 Change-Id: Ibd221ba62af4db17bea5c52d37f5c0ba30b60a7d Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/15127 Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* glusterd: Fix memory leak in glusterd (un)lock RPCsroot2016-08-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: At the time of execute "gluster volume profile <vol> info" command It does have memory leak in glusterd. Solution: Modify the code to prevent memory leak in glusterd. Fix : 1) Unref dict and free dict_val buffer in glusterd_mgmt_v3_lock_peer and glusterd_mgmt_v3_unlock_peers. Test : To verify the patch run below loop to generate io traffic for (( i=0 ; i<=1000000 ; i++ )); do echo "hi Start Line " > file$i; cat file$i >> /dev/null; done To verify the improvement in memory leak specific to glusterd run below command cnt=0;while [ $cnt -le 1000 ]; do pmap -x <glusterd-pid> | grep total; gluster volume profile distributed info > /dev/null; cnt=`expr $cnt + 1`; done After apply this patch it will reduce leak significantly. > Reviewed-on: http://review.gluster.org/14862 > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> > Reviewed-by: Prashanth Pai <ppai@redhat.com> BUG: 1365743 Change-Id: I52a0ca47adb20bfe4b1848a11df23e5e37c5cea9 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/15125 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* dht/rebalance: allocate migrator thread pool dynamicallySusant Palai2016-08-102-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problems: The maximum number of migratior threads created was static set to "40". And the number of these threads get created in rebalance depends on the number of cores user has. If the number of cores exceeds 40, a crash or memory corruption can be seen. Fix: Make the migratior thread pool dynamic. > Change-Id: Ifbdac8a1a396363dd75e2f6bcb454070cfdbf839 > BUG: 1362069 > Reviewed-on: http://review.gluster.org/15000 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> (cherry picked from commit b8e8bfc7e4d3eaf76bb637221bc6392ec10ca54b) Change-Id: Ifbdac8a1a396363dd75e2f6bcb454070cfdbf839 BUG: 1362069 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/15061 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* posix: Do not move and recreate .glusterfs/unlink directoryAshish Pandey2016-08-102-11/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: At the time of start of a volume, it is checked if .glusterfs/unlink exist or not. If it does, move it to landfill and recreate unlink directory. If a volume is mounted and we write data on it till we face ENOSPC, restart of that volume fails as it will not be able to create unlink dir. mkdir will fail with ENOSPC. This will not allow volume to restart. Solution: If .glusterfs/unlink directory exist, don't move it to landfill. Delete all the entries inside it. master - http://review.gluster.org/#/c/15030/ Change-Id: Icde3fb36012f2f01aeb119a2da042f761203c11f BUG: 1364365 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/15093 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* feature/bitrot: Ignore files with sticky bit setKotresh HR2016-08-091-0/+8
| | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14903 Scrubber scrubs entries in backend. It is scrubbing files with sticky bit as well. This might include linkfiles which should be skipped. This patch adds the check to ignore linkfiles during scrub. Change-Id: Ic21367b37770d391326c55c659491a1e5a82335b BUG: 1359020 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 8c47b19fc057f08c47444ef557503e610c707128) Reviewed-on: http://review.gluster.org/14983 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
* glusterd : skip non directories inside /var/lib/glusterd/volsJiffin Tony Thottan2016-08-092-0/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now glusterd won't come up if vols directory contains an invalid entry. Instead of doing that with this change a message will be logged and then skip that entry Backport details: >Change-Id: I665b5c35291b059cf054622da0eec4db44ec5f68 >BUG: 1318591 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/13764 >Reviewed-by: Prashanth Pai <ppai@redhat.com> >Reviewed-by: Atin Mukherjee <amukherj@redhat.com> >Smoke: Gluster Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> (cherry picked from commit 720b63c24b07ee64e1338db28de602b9abbef0a1) Change-Id: I665b5c35291b059cf054622da0eec4db44ec5f68 BUG: 1365265 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/15113 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* build: systemd unit should not be marked executableNiels de Vos2016-08-092-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | systemd complains about the unit for GlusterD when it is executable: Configuration file /usr/lib/systemd/system/glusterd.service is marked executable. Please remove executable permission bits. Proceeding anyway. The Makefile that installs the unit has some scripted commands. These are not needed and standard "*dir" and "*DATA" postfixes for variables can be used instead. The EXTRA_DIST variable is needed for building the 'make dist' tarball on systems where there is no systemd. The unit would be missing from the tarball if it is not explicitly included. Cherry picked from commit 9f22282795e20fd62b22847b92dffd0cde9cca1b: > BUG: 1354489 > Change-Id: I5e72ec201036906b9b2458bc8931ccebf9a8c6b4 > Reported-by: Sergej Pupykin <ml@sergej.pp.ru> > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/14892 > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Change-Id: I5e72ec201036906b9b2458bc8931ccebf9a8c6b4 BUG: 1354499 Reported-by: Sergej Pupykin <ml@sergej.pp.ru> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/15115 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* tests: fix spurious failure in tests/bugs/glusterd/bug-1089668.tAtin Mukherjee2016-08-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/15085 Instead of rebalance stop, its always better to wait for rebalance to complete as the former doesn't have any purpose. >Reviewed-on: http://review.gluster.org/15085 >Smoke: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Change-Id: Ia1bc2a34d937a0a96543bebd257dcda619f12474 BUG: 1364326 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/15089 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* libglusterfs: fix glusterd statedump crashAtin Mukherjee2016-08-073-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14987 commit 3c04a91 removed setting typeStr to NULL if num_allocs is set to 0, this has caused this regression. Code has been put back like earlier and to avoid statedump printing all the NULL values check is modified to see skip the records if num_allocs is 0 instead of total_allocs >Reviewed-on: http://review.gluster.org/14987 >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Smoke: Gluster Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: N Balachandran <nbalacha@redhat.com> >Reviewed-by: Prashanth Pai <ppai@redhat.com> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Change-Id: Ib8bcc2fba908e88cf52b641c3f6bcba74f5e667c BUG: 1364329 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/15091 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* posix: honour fsync flags in posix_do_zerofillRavishankar N2016-08-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/15100/ commit fe1054110ac54750ca0333a727d83b14a98e165e introduced fallocate + FALLOC_FL_ZERO_RANGE to do posix_do_zerofill but did not do an fsync if O_SYNC or O_DSYNC fd flags were set. Prashant Pai pointed out performing fallocate(2) does not remove the necessity to do fsyncs if durability is desired: http://linux-fsdevel.vger.kernel.narkive.com/bDmrAUlh/fallocate-falloc-fl-punch-hole So fixed it to honour the fd flags. Change-Id: I27ae90b429185d0af29a5e632c4a8b242075a899 BUG: 1364497 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit cf51bc699646359be92969024a52c225e7ee55a1) Reviewed-on: http://review.gluster.org/15103 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* nfs: allow hostnames with dashes in exports/netgroups filesNiels de Vos2016-08-057-6/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hostnames with dashes (like "vagrant-testVM") are not correctly parsed when reading the exports/netgroups files. This bacomes obvious when running ./run-tests-in-vagrant.sh because it causes tests/basic/mount-nfs-auth.t and tests/basic/netgroup_parsing.t to fail. The regex for hostname (in exports) and the entry and hostname (netgroups) parsing does not include the "-" sign, and hence the hostnames are splitted at it. Cherry picked from commit e5221d288e41d29d89d52f8deab657d2285a852c: > BUG: 1350237 > Change-Id: I38146a283561e1fa386cc841c43fd3b1e30a87ad > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/14809 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Change-Id: I38146a283561e1fa386cc841c43fd3b1e30a87ad BUG: 1357834 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14955 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
* cluster/tier: dont promote if estimated block consumption > hi watermarkMilind Changire2016-08-052-50/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | Add test to fail promotion if estimated block consumption grows beyond hi watermark. Skip file migrations until next cycle if tier_get_fs_stat() fails in tier_migrate_using_query_file() > Reviewed-on: http://review.gluster.org/14780 > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> > Reviewed-by: Dan Lambright <dlambrig@redhat.com> (cherry picked from commit 1f4e41e8c2f5f4af4564caba0a08996853f089f4) Change-Id: Ice04572fa739c09109c4433e65965197482a7beb BUG: 1362198 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/15065 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* xlator/trash : append '/' at the end in trash_notify_lookup_cbkJiffin Tony Thottan2016-08-052-5/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the notify function in trash xlator, a lookup is performed to obtain path of old trash directory. The result usually contains path without '/' at the end. The trash xlator maintains expects '/' at the end for the values such as 'old trash dir' and 'new trash dir'. Otherwise certian checks in the code will fail. >Change-Id: I89e02e4b249314fb6536297f959865feee182c83 >BUG: 1357397 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/14938 >Smoke: Gluster Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Anoop C S <anoopcs@redhat.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> >(cherry picked from commit d90307c1b0245e0e6a39044a28819cde520a100c) Change-Id: I89e02e4b249314fb6536297f959865feee182c83 BUG: 1358262 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/14965 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Anoop C S <anoopcs@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* packaging: Remove ".py" extension from symlink targetAravinda VK2016-08-042-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | S57glusterfind-delete-post.py* is packaged in $LIBEXEC/glusterfs/glusterfind directory, symlink created to /var/lib/glusterd/hooks directory ln -s $(libexecdir)/glusterfs/glusterfind/S57glusterfind-delete-post.py \ $(DESTDIR)$(GLUSTERD_WORKDIR)/hooks/1/delete/post/S57glusterfind-delete-post.py ".py" should be removed from symlink target so that build system will not try to compile the symlink files and generate .pyc/.pyo files. > Reviewed-on: http://review.gluster.org/14928 > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Kotresh HR <khiremat@redhat.com> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Change-Id: I9155378aa72eb8559ba8af76d91a4985f69f38f9 BUG: 1363598 Signed-off-by: Aravinda VK <avishwan@redhat.com> Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/15075 Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* georep: add reset-sync-time option for session deleteMilind Changire2016-08-037-6/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the stime xattr at all the brick roots to (0,0) if the argument reset-sync-time has been provided on the command-line. To avoid testing against directory specific stime, the remote stime is assumed to be minus_infinity, if the root directory stime is set to (0,0), before the directory scan begins. This triggers a full volume resync to slave in the case of a geo-rep session recreation with the same master-slave volume pair. Command synopsis: gluster volume geo-replication <MASTERVOL> <SLAVE>::<SLAVEVOL> delete \ [reset-sync-time] Update gluster cli man page to include new sub-command reset-sync-time. > Reviewed-on: http://review.gluster.org/14051 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Aravinda VK <avishwan@redhat.com> > Reviewed-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 70fd68d94f768c098b3178c151fa92c5079a8cfd) Change-Id: Ie4ce03b9425ed9bb81eda8681058c0fc6f990948 BUG: 1357773 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/14953 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* glfs/upcall: entries should be removed under mutex lockSoumya Koduri2016-08-032-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During poll, upcall entries should be removed from the upcall_list only under upcall_list_mutex lock. Otherwise it could result in the list corruption if there are entries being added during poll resulting in memory leak. Also addressed a probable leak during any failures with upcall entry addition. This is backport of below master patch - http://review.gluster.org/14972 >Change-Id: I468183f961eb6faed9a0a1bcb783705f711641fc >BUG: 1358608 >Signed-off-by: Soumya Koduri <skoduri@redhat.com> >Reviewed-on: http://review.gluster.org/14972 >Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> >(cherry picked from commit 89dee8b46e126bc1d7541da90fa60844aa83451e) Change-Id: I8f83175c7b550d8674dda5030168d5b94ccdd04c BUG: 1361665 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/15048 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* tests: Fix tests/bitrot/bug-1244613.tKotresh HR2016-08-021-0/+3
| | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/15028 Wait for gluster nfs to initialize before attempting the nfs mount. Change-Id: I4bd9579ad5368935cf62632a5d612f89fce5979f BUG: 1362065 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit ae4f59f929be36b40c9f8e20804b6bc4564cc7a3) Reviewed-on: http://review.gluster.org/15060 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* snapshot/snapd: Don't display pid when snapd is offlineAvra Sengupta2016-08-012-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14981/ We were previously reading the pidfile, and displaying the pid even if snapd daemon is not running. Now to fix it, we re-assign pid value to -1, if snapd is offline. > Reviewed-on: http://review.gluster.org/14981 > Tested-by: Vijay Bellur <vbellur@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> (cherry picked from commit ec6925a379c7bee071df1638bc2751b266cee346) Change-Id: I4baff8d489fe9380061c52aea006db90fa421cd7 BUG: 1360985 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/15033 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* gluster man page: Add output option "--xml" to man page of glusterMohit Agrawal2016-08-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | backport of commit 138bea7ea65987ca23f73c1f0c4f8868fd38cdff > BUG: 1360670 > Change-Id: Ia167bb5b541a12459f70ab1205bd4ffdab8c7e65 > Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> > Reviewed-on: http://review.gluster.org/15027 > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Vijay Bellur <vbellur@redhat.com> > (cherry picked from commit 138bea7ea65987ca23f73c1f0c4f8868fd38cdff) Change-Id: I48a33640cb4a10697a5b030bb91b8a75434a923e BUG: 1362025 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: http://review.gluster.org/15056 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* gfapi/upcall: Fix a ref leakSoumya Koduri2016-08-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | inode_find (used to create the handle) takes a reference of the inode. This needs to be un'refernced to avoid leak. This is backport of below master patch - http://review.gluster.org/14984 >Change-Id: I22f03577a8f1d9608cfc62d57202cfc4c2ba12b3 >BUG: 1358608 >Signed-off-by: Soumya Koduri <skoduri@redhat.com> >Reviewed-on: http://review.gluster.org/14984 >Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> >(cherry picked from commit bb48eb46910085928efbd7fb491c5b2db25bba98) Change-Id: I92701af8a948d982fd4dbe31af32334c1bb26347 BUG: 1361665 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/15049 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* tests: Fix get_pending_heal_count check in ecRavishankar N2016-07-3010-4/+4
| | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/15006/ Change-Id: I3d274bdc2036392af942a17a0e0bf28f431c947b BUG: 1360574 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/15047 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es>
* storage/posix: Look for file in "unlink" dir IFF open on real-path fails ↵Krutika Dhananjay2016-07-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | with ENOENT Backport of: http://review.gluster.org/#/c/15039/ PROBLEM: In some of our users' setups, open() on the anon fd failed for a reason other than ENOENT. But this error code is getting masked by a subsequent open() under posix's hidden "unlink" directory, which will fail with ENOENT because the gfid handle still exists under .glusterfs. And the log message following the two open()s ends up logging ENOENT, causing much confusion. FIX: Look for the presence of the file under "unlink" ONLY if the open() on the real_path failed with ENOENT. Change-Id: Id83782fb3995d578881f7a586c83c3e0baea2ae8 BUG: 1361449 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/15042 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* posix: leverage FALLOC_FL_ZERO_RANGE in zerofill fopRavishankar N2016-07-291-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/15037/ posix_zerofill() implements zerofilling of a given (offset,length) by doing a writev in a loop followed by an optional fsync on the file. fallocate(2) has a FALLOC_FL_ZERO_RANGE flag which does away with all this and provides the same result (from a userspace application point of view) with a single syscall. This patch attempts the zerofill with the latter and falls back to the former if it fails. Tested using a libgfapi based C program on XFS and observed using gdb that posix_zerofill()'s call to fallocate with FALLOC_FL_ZERO_RANGE was a success. Change-Id: Iceaf0cbc57c52dac63540872e8538d79e8dee631 BUG: 1361483 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/15044 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* storage/posix: Give correct errno for anon-fd operationsPranith Kumar K2016-07-294-48/+52
| | | | | | | | | | | | | | | | | | | | | >Change-Id: Ia9e61d3baa6881eb7dc03dd8ddb6bfdde5a01958 >BUG: 1343906 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14669 >Smoke: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Raghavendra G <rgowdapp@redhat.com> >(cherry picked from commit d5088c056d5aee1bda2997ad5835379465fed3a1) Change-Id: I8f4c26a2314766579aa03873deb8033c75944c0d BUG: 1360138 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15008 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
* cluster/ec: Unlock stale locks when inodelk/entrylk/lk failsPranith Kumar K2016-07-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Rafi for hinting a while back that this kind of problem he saw once. I didn't think the theory was valid. Could have caught it earlier if I had tested his theory. >Change-Id: Iac6ffcdba2950aa6f8cf94f8994adeed6e6a9c9b >BUG: 1344836 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14703 >Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> >Smoke: Gluster Build System <jenkins@build.gluster.org> >Tested-by: mohammed rafi kc <rkavunga@redhat.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> BUG: 1360576 Change-Id: If9ccf0b3db7159b87ddcdc7b20e81cde8c3c76f0 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15025 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* tests: Fix spurious failures with split-brain-favorite-child-policy.tPranith Kumar K2016-07-281-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: It is not guranteed that the self-heal daemon would apply the new option as soon as volume set is executed because all the command gurantees is that the process is notified of the change in volfile. Shd still needs to fetch volfile and reconfigure. If the next volume heal command comes even before the reconfigure happens, then the heal won't happen. Fix: Restart shd to make sure it has the option loaded with new value. >BUG: 1358976 >Change-Id: I3ed30ebbec17bd06caa632e79e9412564f431b19 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14978 >Smoke: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> >Tested-by: Jeff Darcy <jdarcy@redhat.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> BUG: 1360573 Change-Id: I09e097dbdc2cae659ad1617d336945eb804b09a5 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15022 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com>
* tests: Fix pending-heal-count checksPranith Kumar K2016-07-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | EXPECT_WITHIN takes regular expression to match the count, so even when there are say 10 entries to heal, it would think that the heal is complete. Fixed checking pending heal count with correct regex. Thanks to Xavi for finding this problem. >Change-Id: Ic593d22468b2b586bfca864962ffa0eda96b1d1f >BUG: 1332054 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14985 >Smoke: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> BUG: 1360574 Change-Id: I310f8d492bb576224797d9090658ca1e6367861c Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15023 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com>
* afr: some coverity fixesRavishankar N2016-07-2811-110/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note: This is a backport of http://review.gluster.org/14895. It contains: i) fixes that prevent deadlocks (afr-common.c). ii) fixes over-writing op-errno=ENOMEM with possible other values (afr-inode-read.c). iii) prevents doing further operations with a NULL dictionary if allocation fails (afr-self-heal-data.c). iv) prevents falsely marking a sink as healed if metadata heal fails midway(afr-self-heal-metadata.c). v) other minor fixes. Considering the above are not trivial fixes, the patch is a good candidate for merging in 3.8 branch. Thanks to Krutika for a cleaner way to track inode refs in afr_set_split_brain_choice(). Change-Id: I2d968d05b815ad764b7e3f8aa9ad95a792b3c1df BUG: 1360556 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/15018 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tests: Fix timing issue in ec.tPranith Kumar K2016-07-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Because of timing issue sometimes the mount is unmounted even before the version is updated, this is leading to not triggering heals. Fix: One way to fix this would be to increate 'sleep 2' to 'sleep 10' but that would slow things down. I changed the way ec learns it needs xattr healing so that it triggers heals even when the xattrs are not marked correctly. >Change-Id: I1c82041166443ae7079dd99b89ea2ed170233ba3 >BUG: 1359001 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14980 >Smoke: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> BUG: 1360575 Change-Id: I3e7812e3b54caee651e20d4f5dd7dded2f2aa8d6 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15024 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* tests: Fix spurious failure of br-stub.tKotresh HR2016-07-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14960/ The nfs mount fails occasionally in ./tests/bitrot/br-stub.t. The reason being nfs mount is attempted before the gluster nfs has come up. It is a race and hence happens occasionally. The patch fixes it by waiting for nfs server to come up before mount. Thanks skoduri@redhat.com for root causing it. Change-Id: I3adbf2363514635785c02b1478733095ad0b74cf BUG: 1360579 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit f4bbe515097e0149c78c1fc1bae9fb90928e7cd8) Reviewed-on: http://review.gluster.org/15021 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* cluster/ec: Handle absence of keys in some callback dictAshish Pandey2016-07-261-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: This issue arises when we do a rolling update from 3.7.5 to 3.7.9. For 4+2 volume running 3.7.5, if we update 2 nodes and after heal completion kill 2 older nodes, this problem can be seen. After update and killing of bricks, 2 nodes will return inodelk count key in dict while other 2 nodes will not have inodelk count in dict. This is also true for get-link-count. During dictionary match , ec_dict_compare, this will lead to mismatch of answers and the file operation on mount point will fail with IO error. Solution: Don't match inode, entry and link count keys while comparing two dictionaries. However, while combining the data in ec_dict_combine, go through all the dictionaries and select the maximum values received in different dicts for these keys. master - http://review.gluster.org/#/c/14761/ Change-Id: I33546e3619fe8f909286ee48fb0df2009cd3d22f BUG: 1360174 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/14761 Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/15013
* rpc/socket.c : Modify socket_poller code in case of ENODATA error code.Mohit Agrawal2016-07-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Polling failure errors are coming till volume is not come while SSL is enabled. Solution: To avoid the message update one condition in socket_poller code It will not exit from thread in case of received ENODATA from ssl_do function. Backport of commit 84e9fc2fb5fabf9d1e553a420854a306cdb8a168 > Change-Id: Ia514e99b279b07b372ee950f4368ac0d9c702d82 > BUG: 1349709 > Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> > Reviewed-on: http://review.gluster.org/14786 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> > (cherry picked from commit 84e9fc2fb5fabf9d1e553a420854a306cdb8a168) BUG: 1359654 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Change-Id: If1820c0b3d0cd976875137bc1175d4b2008779af Reviewed-on: http://review.gluster.org/14999 Tested-by: MOHIT AGRAWAL <moagrawa@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/ctr: Check for NULL localN Balachandran2016-07-264-3/+11
| | | | | | | | | | | | | | | | | | | | This is a defensive fix to prevent a crash reported during a rename operation. This is not reproducible under normal circumstances. This patch also moves ctr-messages.h to the src dir of the changetimerecorder xlator. Backported from master: http://review.gluster.org/#/c/14964/ Change-Id: If459f46d3ce9258f595d0ca7ef55942bf466d767 BUG: 1360122 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/15009 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* tests: Remove hard coding in get_auxPranith Kumar K2016-07-251-4/+12
| | | | | | | | | | | | | | | | | | | | >Change-Id: Ie007d8006a2f2be0187f0c73d46ec6dda2a68a6b >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14988 >Smoke: Gluster Build System <jenkins@build.gluster.org> >Tested-by: Jeff Darcy <jdarcy@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> >(cherry picked from commit dac9ec0c015e748c0e7909496cdc636831975e0e) BUG: 1359625 Change-Id: If9927c020202f0707a6d61c66522918e0e8f6d98 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14992 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* changelog/rpc: Fix rpc_clnt_t mem leaksKotresh HR2016-07-246-7/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/13658 PROBLEM: 1. Freeing up rpc_clnt object might lead to crashes. Well, it was not a necessity to free rpc-clnt object till now because all the existing use cases needs to reconnect back on disconnects. Hence timer code was not taking ref on rpc-clnt object. Glusterd had some use-cases that led to crash due to ping-timer and they fixed only those code paths that involve ping-timer. Now, since changelog has an use-case where rpc-clnt need to be freed up, we need to fix timer code to take refs 2. In changelog, because of issue 1, only mydata was being freed which is incorrect. And there are races where rpc-clnt object would access the freed mydata which would lead to crashes. Since changelog xlator resides on brick side and is long living process, if multiple libgfchangelog consumers register to changelog and disconnect/reconnect mulitple times, it would result in leak of 'rpc-clnt' object for every connect/disconnect. SOLUTION: 1. Handle ref/unref of 'rpc_clnt' structure in timer functions properly. 2. In changelog, unref 'rpc_clnt' in RPC_CLNT_DISCONNECT after disabling timers and free mydata on RPC_CLNT_DESTROY. RPC SETUP IN CHANGELOG: 1. changelog xlator initiates rpc server say 'changelog_rpc_server' 2. libgfchangelog initiates one rpc server say 'libgfchangelog_rpc_server' 3. libgfchangelog initiates rpc client and connects to 'changelog_rpc_server' 4. In return changelog_rpc_server initiates a rpc client and connects back to 'libgfchangelog_rpc_server' REF/UNREF HANDLING IN TIMER FUNCTIONS: Let's say rpc clnt refcount = 1 1. Take the ref before reigstering callback to timer queue >>>> rpc_clnt_ref (say ref count becomes = 2) 2. Register a callback to timer say 'callback1' 3. If register fails: >>>> rpc_clnt_unref (ref count = 1) 4. On timer expiration, 'callback1' gets called. So unref rpc clnt at the end in 'callback1'. This is corresponding to ref taken in step 1 >>>> rpc_clnt_unref (ref count = 1) 5. The cycle from step-1 to step-4 continues....until timer cancel event happens 6. timer cancel of say 'callback1' If timer cancel fails: Do nothing, Step-4 would have unrefd If timer cancel succeeds: >>>> rpc_clnt_unref (ref count = 1) Change-Id: I91389bc511b8b1a17824941970ee8d2c29a74a09 BUG: 1359364 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 637ce9e2e27e9f598a4a6c5a04cd339efaa62076) Reviewed-on: http://review.gluster.org/14994 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* tiering/ctr: Fix strcpy coverityAvra Sengupta2016-07-221-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch is without a testcase, because it needs additional modification to the existing build method to hit the scenario this fix is intended for, and hence writing a testcase alone won't suffice. Backport of http://review.gluster.org/#/c/14696/ > Reviewed-on: http://review.gluster.org/14696 > Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> > Smoke: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: N Balachandran <nbalacha@redhat.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Dan Lambright <dlambrig@redhat.com> (cherry picked from commit 3474aa85e399a92d3ee9159a2d066d4bd73611a0) Change-Id: I6cffba3e09a023f105dbf2975cc9a3ae1a965c31 BUG: 1346133 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/14721 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* rpc/socket: pthread resources are not cleaned upN Balachandran2016-07-221-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A socket_connect failure creates a new pthread which is not a detached thread. As no pthread_join is called, the thread resources are not cleaned up causing a memory leak. Now, socket_connect creates a detached thread to handle failure. > Change-Id: Idbf25d312f91464ae20c97d501b628bfdec7cf0c > BUG: 1343374 > Signed-off-by: N Balachandran <nbalacha@redhat.com> > Reviewed-on: http://review.gluster.org/14875 > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> (cherry picked from commit 9886d568a7a8839bf3acc81cb1111fa372ac5270) Change-Id: I69ef46013c8dbc70cbda2695f12be1f6d3720055 BUG: 1354250 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/14979 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* rpc/socket.c: Modify approach to cleanup threads of socket_poller in ↵Mohit Agrawal2016-07-214-142/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | socket_spawn. Problem: Current approach to cleanup threads of socket_poller is not appropriate. Solution: Enable detach flag at the time of thread creation in socket_spawn. Fix: Write a new wrapper(gf_create_detach_thread) to create detachable thread instead of store thread ids in a queue. Test: Fix is verfied on gluster process, To test the patch followed below procedure Enable the client.ssl and server.ssl option on the volume Start the volume and count anon segment in pmap output for glusterd process pmap -x <glusterd-pid> | grep "\[ anon \]" | wc -l Stop the volume and check again count of anon segment it should not increase. Backport of commit 2ee48474be32f6ead2f3834677fee89d88348382 > Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> > Change-Id: Ib8f7ec7504ec8f6f74b45ce6719b6fb47f9fdc37 > BUG: 1336508 > Reviewed-on: http://review.gluster.org/14694 > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> BUG: 1354395 Change-Id: Ibdbbae508d9dda2fd36220a9b1e47f7776336929 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: http://review.gluster.org/14891 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* tests: Fix spurious failure of tests/bugs/glusterd/bug-1111041.tAvra Sengupta2016-07-211-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | On a faster machine the ps check was returning two pids, including the glusterfsd process's pid, right after that, process forked. Hence removing that ps, as for the scope of this test, verifying the snapd pid from the status command itself is enough. > Reviewed-on: http://review.gluster.org/14963 > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> (cherry picked from commit be69510e670cb5ee893399ca1d7e7d2a60a9483c) Change-Id: I8bd8fc4ea406d96e3a47f952cfe44560b615dbe6 BUG: 1358591 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/14969 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* tests: fix rebalance timing issueSakshi Bansal2016-07-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | With a start and stop rebalance, the stop command may fail as by that time the rebalance process may not come up. Using the rebalance status commmand to ensure that the rebalance process is up before stoping rebalance. Backport of http://review.gluster.org/14885 > Change-Id: I3d5123cd5dfabde2720428455b257d11b980ce21 > BUG: 1354372 > Signed-off-by: Sakshi Bansal <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/14885 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Change-Id: I3d5123cd5dfabde2720428455b257d11b980ce21 BUG: 1355610 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/14897 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* feature/bitrot: Fix scrub status with sharded volumeKotresh HR2016-07-201-12/+26
| | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/14927 Bitrot scrubs each shard entries separately. Scrub statistics was counting each shard entry which is incorrect. This patch skips the statistics count for sharded entries. Change-Id: I184c315a4bc7f2cccabc506eef083ee926ec26d3 BUG: 1357975 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 1929141da34d36f537e9798e3618e0e3bdc61eb6) Reviewed-on: http://review.gluster.org/14959 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* nfs: Reset cs->resolvedhard while resolving an entrySoumya Koduri2016-07-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an entry is not found in the inode table, nfs xlator should be resolving it by sending an explicit lookup to the brick process. But currently its broken in case of NFS3_LOOKUP fop where in the server bails out early resulting in sending pargfid attributes to the client. To fix the same reset 'cs->resolvedhard' so that an explicit lookup is done for the entry in the resume_fn "nfs3_lookup_resume()". This is backport of the below mainline patch - http://review.gluster.org/14911 BUG: 1357257 >Change-Id: I999f8bca7ad008526c174d13f69886dc809d9552 >Signed-off-by: Soumya Koduri <skoduri@redhat.com> >BUG: 1356068 >Reviewed-on: http://review.gluster.org/14911 >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Smoke: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Niels de Vos <ndevos@redhat.com> >(cherry picked from commit 3c485cb896837c8e362fd0b094325002ce806ac4) Change-Id: Ifeb21887810115369ca2ae6c8c3d3619d4e6c066 Reviewed-on: http://review.gluster.org/14941 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: soumya k <skoduri@redhat.com> Reviewed-by: jiademing.dd <iesool@126.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* feature/bitrot: Show whether scrub is in progress/idleKotresh HR2016-07-185-14/+64
| | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14864/ Bitrot scrub status shows whether the scrub is paused or active. It doesn't show whether the scrubber is actually scrubbing or waiting in the timer wheel for the next schedule. This patch shows this status with "In Progress" and "Idle" respectively. Change-Id: I995d8553d1ff166503ae1e7b46282fc3ba961f0b BUG: 1355639 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit f4757d256e3e00132ef204c01ed61f78f705ad6b) Reviewed-on: http://review.gluster.org/14901 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* socket: log the client identifier in ssl connectRaghavendra Bhat2016-07-161-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | Backport of commit d308fb5e152d8c908bf4f5da81f553fbe3d0400a > Change-Id: I4b463ecafb66de16cbe7ed23fae800bb1204f829 > BUG: 1333912 > Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> > Reviewed-on: http://review.gluster.org/14242 > Tested-by: Vijay Bellur <vbellur@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> > Smoke: Gluster Build System <jenkins@build.gluster.org> > (cherry picked from commit d308fb5e152d8c908bf4f5da81f553fbe3d0400a) Change-Id: Id007d3e28292f504913b7df8b8eb693c0427b22b BUG: 1351878 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: http://review.gluster.org/14845 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* features/index: Ignore regular files when examining state of the inode wrt ↵Krutika Dhananjay2016-07-151-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | ENTRY_CHANGES Backport of: http://review.gluster.org/14870 This prevents unnecessary sys_lstat() syscall when xattrop is operating on regular files. Also, to avoid (even) the one-time execution of sys_lstat() syscalls on disperse volumes or replicate volumes when granular entry self-heal is disabled, we pass a key in afr_selfheal_undo_pending() indicating to index that this xattrop is on a granular directory index. Index will accordingly decide whether or not to attempt the index state initialization. Change-Id: I86b69e83b6216c3371d997a4983d75d4be6a28b2 BUG: 1355609 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14921 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* glusterd: Fix gsyncd upgrade issueKotresh HR2016-07-153-31/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14898/ Problem: gluster upgrade is not generating new volfiles Cause: During upgrade, "glusterd --xlator-option *.upgrade=on -N" is run to generate new volfiles. It is run post 'glusterfs' rpm installation. The above command fails during upgrade if geo-replication is installed. This is because on glusterd start 'gsyncd' binary is called to configure geo-replication related stuff. Since 'glusterfs' rpm is installed prior to 'geo-rep' rpm, the 'gsyncd' binary used to glusterd upgrade command is of old version and hence it fails before generating new volfiles. Solution: Don't call geo-replication configure during upgrade/downgrade. Geo-replication configuration happens during start of glusterd after upgrade. Change-Id: Id58ea44ead9f69982f86fb68dc5b9ee3f6cd11a1 BUG: 1356439 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/14898 (cherry picked from commit 1b998788ece8c8b52657e8b9aae65d3279690c5b) Reviewed-on: http://review.gluster.org/14916 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* Glusterd: printing the node details on error message of rebalancehari2016-07-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | back-port of : http://review.gluster.org/#/c/14495 back-port of : http://review.gluster.org/#/c/14540 Problem: on the rebalance start with one of the glusterd being down among the volume, the error message says only about the brick path. Fix: adding the node details >Change-Id: I5827d3a9a15b0461c9ce3a51c0b16246ca58f335 >BUG: 1337899 >Signed-off-by: hari <hgowtham@redhat.com> >Change-Id: I3075f3a73e289dfe577742a3d5086531026f567d >BUG: 1339923 >Signed-off-by: hari gowtham <hgowtham@redhat.com> Change-Id: Ic3988ff3042808d623642dc5a2ef82ef55ac8424 BUG: 1339928 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/14541 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Tested-by: hari gowtham <hari.gowtham005@gmail.com> Reviewed-by: Zhou Zhengping <johnzzpcrystal@gmail.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* afr, index: Clean up stale directory and file indices in granular entry shKrutika Dhananjay2016-07-158-40/+243
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/14832 Specifically when a directory tree is removed (rm -rf) while a brick is down, both the directory index and the name indices of the files and subdirs under it will remain. Self-heal will need to pick up these and remove them. Towards this, afr sh will now also crawl indices/entry-changes and call an rmdir on the dir if the directory index is stale. On the brick side, rmdir fop has been implemented for index xl, which would delete the directory index and its contents if present in a synctask. Change-Id: I08f45201adca56737ec2be1aab5433aebaefefd0 BUG: 1355609 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14920 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/bitrot: Option to set scrub interval to a minuteKotresh HR2016-07-153-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14836/ Bitrot scrub-frequency supports "hourly|daily|weekly|biweekly|monthly". But it is painful for testing as minimum scrub-interval is an hour Hence introducing a scrub interval of minute to ease testing. It is intentionally not exposed in bitrot command help as it is only for testing. e.g., gluster vol bitrot <volname> scrub-frequency minute Change-Id: I155a65298d3fad5ae9e529d9c7d4b0d25fa297c0 BUG: 1354429 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/14836 (cherry picked from commit 7df1174f7bed2a00631cf17201f5217a053afeb1) Reviewed-on: http://review.gluster.org/14890 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>