summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* meta: fix memory leak in meta xlatorsMohammed Rafi KC2016-08-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | meta xlator is leaking iobuf and iobrefs in read path This patch fixes memleak in meta_default_read code path > Reviewed-on: http://review.gluster.org/15068 > 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> > Reviewed-by: Poornima G <pgurusid@redhat.com> BUG: 1364506 Change-Id: Ieb413267604d9870dbe6e11258fffd279a7bd7cf Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/15102 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: Pranith Kumar Karampuri <pkarampu@redhat.com>
* posix: fix posix_fgetxattr to return the correct errorSusant Palai2016-08-071-3/+23
| | | | | | | | | | | | | | | | | | | | posix_fgetxattr used to not updating op_ret and op_errno (initialized to -1 and ENOENT respectively) on success cases. Hence, it can return ENOENT even if all the opertions were sucessful. BUG: 1358823 Change-Id: I1799ca7e48a4bd800a678366d2b6927d19c31f88 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/12745 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> Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/13449 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>
* dht/rebalance: allocate migrator thread pool dynamicallySusant Palai2016-08-052-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 1362070 > 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: 1362070 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/15062 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: Raghavendra G <rgowdapp@redhat.com>
* socket: log the client identifier in ssl connectRaghavendra Bhat2016-08-031-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: I2a57a206edab3e0c05ce28c299d78264c9a33d8b BUG: 1351933 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: http://review.gluster.org/14844 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: Prashanth Pai <ppai@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: Fix memory leak in glusterd (un)lock RPCsroot2016-08-031-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: 1363747 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/15081 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>
* packaging: Remove ".py" extension from symlink targetAravinda VK2016-08-032-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: 1363594 Signed-off-by: Aravinda VK <avishwan@redhat.com> Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/15074 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>
* gfapi : Avoid double freeing of dict in glfs_*_*getxattrJiffin Tony Thottan2016-08-031-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The dict variable "xattr" is passed to glfs_getxattr_process() and glfs_listxattr_process() in glfs_*_*getxattrs(). This variable is unrefed by both functions and again in caller function which may result in segfault. So it is wrong to call dict_unref() in both glfs_*xattr_process functions. Backport reference : >Change-Id: I227f55ebc3169f58910863c04ae536a8d789e80e >BUG: 1247603 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/13483 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Niels de Vos <ndevos@redhat.com> Change-Id: I2e574ff4b7a095749540bdb9d3593bc1d6275e56 BUG: 1311407 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/13505 Reviewed-by: Prashanth Pai <ppai@redhat.com> 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> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* gfapi/upcall: Fix a ref leakSoumya Koduri2016-08-031-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: Iaa91ee757e3497e25d8669c1592106b6266057a0 BUG: 1362010 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/15057 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* glfs/upcall: entries should be removed under mutex lockSoumya Koduri2016-08-022-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: Ib6702911ca1fa09a3f1a493b27195665603854d3 BUG: 1362010 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/15058 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* tests: Fix spurious failure of tests/bugs/glusterd/bug-1111041.tAvra Sengupta2016-08-011-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: 1358590 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/14968 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* Add 3.7.14 release-notesv3.7.14Kaushal M2016-08-011-0/+40
| | | | Change-Id: I4fdd60601738df454fbb58a58497df75bfcaafe5
* 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: Id68bbe98740eea9889b17f8ea3126ed45970d26f BUG: 1360785 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/15041 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>
* protocol/client: Filter o-direct in readv/writevPranith Kumar K2016-07-291-8/+15
| | | | | | | | | | | | | | | | | | | | | | | >Change-Id: I519c666b3a7c0db46d47e08a6a7e2dbecc05edf2 >BUG: 1322214 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14215 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> >(cherry picked from commit 74837896c38bafdd862f164d147b75fcbb619e8f) BUG: 1360785 Pranith Kumar K <pkarampu@redhat.com> Change-Id: Ib4013b10598b0b988b9f9f163296b6afa425f8fd Reviewed-on: http://review.gluster.org/15050 Tested-by: Pranith Kumar Karampuri <pkarampu@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> Reviewed-by: Pranith Kumar Karampuri <pkarampu@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: 1361402 Change-Id: If9ccf0b3db7159b87ddcdc7b20e81cde8c3c76f0 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15040 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>
* cli/xml: Fix wrong XML format in volume get commandAravinda VK2016-07-291-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this Patch, <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <volGetopts> <count>258</count> <Option>cluster.lookup-unhashed</Option> <Value>on</Value> <Option>cluster.lookup-optimize</Option> <Value>off</Value> <Option>cluster.min-free-disk</Option> <Value>10%</Value> <Option>cluster.min-free-inodes</Option> <Value>5%</Value>... With this patch, <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <volGetopts> <count>258</count> <Opt> <Option>cluster.lookup-unhashed</Option> <Value>on</Value> </Opt> <Opt> <Option>cluster.lookup-optimize</Option> <Value>off</Value> </Opt> <Opt> <Option>cluster.min-free-disk</Option> <Value>10%</Value> </Opt> <Opt> <Option>cluster.min-free-inodes</Option> <Value>5%</Value> </Opt>... BUG: 1357766 Change-Id: I6c5a040f659f2244ddcd47c57882b4f300cbe52f Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14931 (cherry picked from commit bc0b106f0ae8ecd336c7689917e46bc2685603c8) Reviewed-on: http://review.gluster.org/14949 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* storage/posix: Give correct errno for anon-fd operationsPranith Kumar K2016-07-294-46/+51
| | | | | | | | | | | | | | | | | | | | >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> BUG: 1360140 Change-Id: I553dd59424aaff9538e0798370846d653ca1cf32 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15011 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>
* afr: some coverity fixesRavishankar N2016-07-2811-110/+161
| | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14895/ Thanks to Krutika for a cleaner way to track inode refs in afr_set_split_brain_choice(). Change-Id: I2d968d05b815ad764b7e3f8aa9ad95a792b3c1df BUG: 1360549 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/15017 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>
* geo-rep: Handle Config parser errorsAravinda VK2016-07-282-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python ConfigParser lib has two methods, readfp and read, it should be used as follows. readfp(open("defaults.conf")) read("custom.conf") ConfigParser.read(path) ignores any file errors, which is intentional since errors are handled while loading default config. Geo-rep uses only one config file(Session config in Master side and Template config on Slave side) so we should use readfp to avoid skipping OS errors. config.read is retained in case of `--config-set-rx` where glusterd creates new template config file. BUG: 1357759 Change-Id: I15a14d3743facd7b8c7af0edc70fdefaa43efd04 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14777 (cherry picked from commit d94bf608b16b82f2c8f8588a96459cb746773b32) Reviewed-on: http://review.gluster.org/14946 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kotresh HR <khiremat@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* features/ctr: Check for NULL localN Balachandran2016-07-274-4/+15
| | | | | | | | | | | | | | | | | | | | | 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: I2aac2d4da5752f6a0b45a70e0d97a4d506532ff4 BUG: 1360125 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/15007 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: Milind Changire <mchangir@redhat.com> Reviewed-by: Dan Lambright <dlambrig@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: 1360578 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit f4bbe515097e0149c78c1fc1bae9fb90928e7cd8) Reviewed-on: http://review.gluster.org/15020 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>
* changelog/rpc: Fix rpc_clnt_t mem leaksKotresh HR2016-07-276-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: 1359363 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 637ce9e2e27e9f598a4a6c5a04cd339efaa62076) Reviewed-on: http://review.gluster.org/14993 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* rpc/socket: pthread resources are not cleaned upN Balachandran2016-07-271-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: If0a65c50fef2a32148cf3a1d7992e63f044bf0ad BUG: 1360553 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/15019 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> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/ec: Handle absence of keys in some callback dictAshish Pandey2016-07-271-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: 1360152 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/15012
* 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: 1359651 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Change-Id: I86aa9955eca13d23120ba17b787f619c7de6be0c Reviewed-on: http://review.gluster.org/14998 Tested-by: MOHIT AGRAWAL <moagrawa@redhat.com> 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: Prashanth Pai <ppai@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* rpc/socket.c: Modify approach to cleanup threads of socket_poller in ↵Mohit Agrawal2016-07-264-143/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: 1354394 Change-Id: I271e83e7a210ecd27a7471c53147ceb837a33cad Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: http://review.gluster.org/14886 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* tests: Remove hard coding in get_auxPranith Kumar K2016-07-231-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: 1359369 Change-Id: I56e633244a2154a3565a17fd8e4853cf9045c4f3 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14991 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>
* feature/bitrot: Ignore files with sticky bit setKotresh HR2016-07-221-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: 1359017 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 8c47b19fc057f08c47444ef557503e610c707128) Reviewed-on: http://review.gluster.org/14982 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>
* feature/bitrot: Fix scrub status with sharded volumeKotresh HR2016-07-211-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: 1357973 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 1929141da34d36f537e9798e3618e0e3bdc61eb6) Reviewed-on: http://review.gluster.org/14958 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>
* georep: add reset-sync-time option for session deleteMilind Changire2016-07-217-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. Change-Id: Ie4ce03b9425ed9bb81eda8681058c0fc6f990948 BUG: 1357772 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/14051 Reviewed-by: Kotresh HR <khiremat@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> Reviewed-by: Aravinda VK <avishwan@redhat.com> (cherry picked from commit 70fd68d94f768c098b3178c151fa92c5079a8cfd) Reviewed-on: http://review.gluster.org/14952
* features/bitrot: Move throttling code to libglusterfsKotresh HR2016-07-199-105/+112
| | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14846 Since throttling is a separate feature by itself, move throttling code to libglusterfs. Change-Id: If9b99885ceb46e5b1865a4af18b2a2caecf59972 BUG: 1357514 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/14944 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>
* cluster/ec: Fix race in timer cancellationXavier Hernandez2016-07-171-15/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | A race in timer cancellation for delayed unlock could cause a crash if the cancelling thread fails to cancel the timer because it has already been fired but not executed, and the callback is scheduled out of the CPU, delaying it until the thread has released important resources needed by the callback. This patch improves the handling of this case to make it robust. Backport of: > Change-Id: I5c8a8c6610c5136f71b938aa78b5878ba05238d4 > BUG: 1345855 > Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> > Reviewed-on: http://review.gluster.org/14712 > Smoke: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Change-Id: I5c8a8c6610c5136f71b938aa78b5878ba05238d4 BUG: 1346156 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/14724 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>
* fuse: unref dict even if fuse_first_lookup failsKremmyda, Olia (NSN - GR/Athens)2016-07-171-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | In fuse_first_lookup function, "dict_unref (dict)" should be included in the out label, in case create_frame returns an empty pointer the dict to be unreferenced as well. Backport of commit b01fb8d3bb9772d94073aaa52b2d8210ac4fabb8: > Bug: 1338544 > Change-Id: Ifb8a3378aec6521c1aa848f818968b6bfdb72089 > Signed-off-by: Olia Kremmyda <olympia.kremmyda@nokia.com> > Reviewed-on: http://review.gluster.org/14464 > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Smoke: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Bug: 1339138 Change-Id: I5c26740ecf8e4344a3150e1f9ac9bdcaec22d819 Signed-off-by: Olia Kremmyda <olympia.kremmyda@nokia.com> Reviewed-on: http://review.gluster.org/14463 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> 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>
* Glusterd: printing the node details on error message of rebalancehari2016-07-151-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | back-port of : http://review.gluster.org/#/c/14495 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> Reviewed-on: http://review.gluster.org/14540 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> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@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: 1356426 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 1b998788ece8c8b52657e8b9aae65d3279690c5b) Reviewed-on: http://review.gluster.org/14915 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/bitrot: Option to set scrub interval to a minuteKotresh HR2016-07-153-1/+9
| | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/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: 1354425 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit 7df1174f7bed2a00631cf17201f5217a053afeb1) Reviewed-on: http://review.gluster.org/14887 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>
* feature/bitrot: Show whether scrub is in progress/idleKotresh HR2016-07-155-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: 1355635 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit f4757d256e3e00132ef204c01ed61f78f705ad6b) Reviewed-on: http://review.gluster.org/14900 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: Jeff Darcy <jdarcy@redhat.com>
* rpc: invalid argument when function setsockopt sets option TCP_USER_TIMEOUTNiels de Vos2016-07-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | If option "transport.tcp-user-timeout" hasn't been setted, glusterd's priv->timeout will be -1, which will cause invalid argument when set TCP_USER_TIMEOUT. Cherry picked from commit b2c73cbf423de6201f956f522b7429615c88869d: > Change-Id: Ibc16264ceac0e69ab4a217ffa27c549b9fa21df9 > BUG: 1349657 > Signed-off-by: Zhou Zhengping <johnzzpcrystal@gmail.com> > Reviewed-on: http://review.gluster.org/14785 > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Change-Id: Ibc16264ceac0e69ab4a217ffa27c549b9fa21df9 BUG: 1354404 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14889 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Zhou Zhengping <johnzzpcrystal@gmail.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* features/index: Exclude gfid-type for '.', '..'Pranith Kumar K2016-07-101-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | index_get_gfid_type is assuming all names are gfids where as some of these entry->d_names can be '.' or '..' Thanks a lot to Nithya for RC >BUG: 1336630 >Change-Id: I06ad688a5865ab25b4f6c8a91af8c7fb2ed62186 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14589 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Ravishankar N <ravishankar@redhat.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> >(cherry picked from commit a89a9d266c439800286f281655d67f4e362dec32) Change-Id: I2a3d13ee76846c38e965f8a98bacc8755a8debfd BUG: 1341482 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14598 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
* doc: Add release-notes for 3.7.13v3.7.13Kaushal M2016-07-081-0/+31
| | | | | Change-Id: Ie91a6c4b9de85e7e6d073a6e2cd0027ad1387c06 Signed-off-by: Kaushal M <kaushal@redhat.com>
* glusterd: compare uuid instead of hostname address resolutionAtin Mukherjee2016-07-073-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14849 In glusterd_get_brickinfo () brick's hostname is address resolved. This adds an unnecessary latency since it uses calls like getaddrinfo (). Instead given the local brick's uuid is already known a comparison of MY_UUID and brickinfo->uuid is much more light weight than the previous approach. On a scale testing where cluster hosting ~400 volumes spanning across 4 nodes, if a node goes for a reboot, few of the bricks don't come up. After few days of analysis its found that glusterd_pmap_sigin () was taking signficant amount of latency and further code walthrough revealed this unnecessary address resolution. Applying this fix solves the issue and now all the brick processes come up on a node reboot. Change-Id: I299b8660ce0da6f3f739354f5c637bc356d82133 BUG: 1352833 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14849 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: Samikshan Bairagya <samikshan@gmail.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/14861
* gfapi: update count when glfs_buf_copy is usedRaghavendra Talur2016-07-071-2/+3
| | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14854 glfs_buf_copy collates all iovecs into a iovec with count=1. If gio->count is not updated it will lead to dereferencing of invalid address. Change-Id: I7c58071d5c6515ec6fee3ab36af206fa80cf37c3 BUG: 1352482 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Signed-off-by: Poornima G <pgurusid@redhat.com> Reported-By: Lindsay Mathieson <lindsay.mathieson@gmail.com> Reported-By: Dmitry Melekhov <dm@belkam.com> Reported-By: Tom Emerson <TEmerson@cyberitas.com> Reviewed-on: http://review.gluster.org/14859 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>
* glusterd: fail volume delete if one of the node is downAtin Mukherjee2016-07-044-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14681 Deleting a volume on a cluster where one of the node in the cluster is down is buggy since once that node comes back the resync of the same volume will happen. Till we bring in the soft delete feature tracked in http://review.gluster.org/12963 this is a safe guard to block the volume deletion. Please note the test file which is backported from this commit has an issue where we start the volume and then try to delete it which is anyway going to fail. So the test actually doesn't validate the fix. http://review.gluster.org/#/c/14693/ in master fixed the problem and the same is ported as part of this commit as well. Change-Id: I9c13869c4a7e7a947f88842c6dc6f231c0eeda6c BUG: 1344634 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14681 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-on: http://review.gluster.org/14692 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com>
* fuse: accept the -s option to allow automountingNiels de Vos2016-07-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | autofs passes the -s option when mounting. All /sbin/mount.<fs> helpers accept this, except mount.glusterfs. Because the helper fails when -s is passed accessing the mountpoint through autofs gives the following error: $ ls /lan/storage.lan.example.net/repos ls: cannot open directory /lan/storage.lan.example.net/repos: Too many levels of symbolic links Cherry picked from commit c8da5669a15ed6944cceb9d003789ff333754bff: > BUG: 1340936 > Change-Id: I84755cdac59e630618cb745c0eb3228cc1e93a1a > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/14559 > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Smoke: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Oleksandr Natalenko <oleksandr@natalenko.name> Change-Id: I84755cdac59e630618cb745c0eb3228cc1e93a1a BUG: 1344551 Signed-off-by: Niels de Vos <ndevos@redhat.com> Tested-by: Kaveh Minooie <kminooie@gmail.com> Reviewed-on: http://review.gluster.org/14686 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Oleksandr Natalenko <oleksandr@natalenko.name> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* gfapi/handleops: Avoid using glfd during createSoumya Koduri2016-07-031-23/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid leaking glfd while creating a file using handleops and since application shall not be interested in it, use the 'fd' object directly which can be un'refed post create. This is backport of below mainline patch - http://review.gluster.org/14532 > Change-Id: I119874ffb63fb4aa18f846ba1fdbe77874b66a54 > BUG: 1339553 > Signed-off-by: Soumya Koduri <skoduri@redhat.com> > Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> > Reviewed-on: http://review.gluster.org/14532 > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Tested-by: Gluster Build System <jenkins@build.gluster.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> (cherry picked from commit 763ed1017b0011934ad2414d7396c46e528ea5b3) Change-Id: I119874ffb63fb4aa18f846ba1fdbe77874b66a54 BUG: 1351877 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14840 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>
* nfs: build exportlist with multiple groupnodesBipin Kunal2016-07-032-18/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EXPORT procedure of the MOUNT protocol does not correctly create structures for the 'groupnodes' in the reply. Each 'groupnode' should be a single entry in the 'nfs.rpc-auth-allow' volume option. Because the value is handled as a single string, the encoding of the groupnode->gr_name fails when the value of the volume option is longer than 255 characters. In the error case, encoding the EXPORTS reply fails, and the waiting 'showmount' command will not receive a reply and times out. Splitting the allowed entries and creating a groupnode for each one prevents the too long ->gr_name. This is following the structures for the EXPORTS reply in the MOUNT protocol more correctly as well. Note that the contents of ->gr_name is expected to be server dependent. This is backport of below mainline fix - http://review.gluster.org/#/c/14667/ Change-Id: Ibbabad581cc9aa00feb80fbbc851a1b10b28383d BUG: 1343290 Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Bipin Kunal <bkunal@redhat.com> Reviewed-on: http://review.gluster.org/14698 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>
* xdr/nfs: free complete groupnode structureBipin Kunal2016-07-031-4/+14
| | | | | | | | | | | | | | | | | | | | | | | The groupnode->gr_next pointer is not traversed upon free. This is currently not a problem, because the pointer is never used. However the correct way to free a groupnode should check the ->gr_next pointer and free any of the groups that it encounters. This problem was identified while correcting a problem with the MOUNT protocol. The change "nfs: build exportlist with multiple groups" starts to use ->gr_next. This is backport of below mainline fix - http://review.gluster.org/#/c/14666/ Change-Id: I9d04eaf4c65bdb8db136321d60e70789da1739d7 BUG: 1343290 Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Bipin Kunal <bkunal@redhat.com> Reviewed-on: http://review.gluster.org/14697 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/gfid-access: Fix nameless lookup on ".gfid"Kotresh HR2016-07-011-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14773 Problem: In geo-replication, if the data copied from .snaps directory to the master, the first set of copy after uss is enabled doesn't get sync to slave. Cause: Enabling uss results in graph switch. So when the lookup comes on "0x00...0d/gfid1" on new graph, ("0x00...0d' being the gfid of virtual directory ".gfid"), it fails as gfid-access xlator doesn't handle it. Fix: Handle nameless lookup on ".gfid" in gfid-access xlator. Change-Id: I32be0064e8fd58068646dbf662432f4a3da14e77 BUG: 1349271 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit b37c6d9088851b2ef83ce4e28af642892e5fd268) Reviewed-on: http://review.gluster.org/14775 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>
* libglusterfs: Implement API that provides page-aligned iobufsKrutika Dhananjay2016-06-293-32/+50
| | | | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/14672 One of the consumers of a page aligned buffer would be posix's readv fop on O_DIRECT fds. Today the way it works is by getting a page-aligned buffer through calloc, pread()ing into this buffer and then copying its contents into a newly created iobuf's ptr. This results in an extra memcpy() which can be avoided if we could implement an api that would return an iobuf whose ptr is page-aligned. That way the iobuf->ptr can be directly passed to sys_pread() as a parameter by posix translator. Change-Id: Ie44c300dc773fef8e1669d609987d47dbd340ac2 BUG: 1351024 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14826 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: Zhou Zhengping <johnzzpcrystal@gmail.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* configure: Prevent glupy installation outside $prefixNiels de Vos2016-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glupy was installed in the global path outside the prefix path, even if --prefix is passed. ./configure --prefix=/usr/local make install Expected: ${DESTDIR}${prefix}/lib64/python<VERSION>/site-packages/gluster Actual: ${DESTDIR}/usr/lib64/python<VERSION>/site-packages/gluster prefix was not honoured. With this patch, glupy will be installed inside the prefix path. Cherry picked from commit 85de0c83392d861ba47c97664ff73fd7f8705a3a: > BUG: 1335717 > Change-Id: I810dd8d2d6c403540d4b738f5ab54237c7358bf6 > Signed-off-by: Aravinda VK <avishwan@redhat.com> > Reviewed-on: http://review.gluster.org/14315 > Smoke: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Niels de Vos <ndevos@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> BUG: 1336137 Change-Id: I810dd8d2d6c403540d4b738f5ab54237c7358bf6 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14340 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Anoop C S <anoopcs@redhat.com> 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>
* build: Filter -D_FORTIFY_SOURCE from CFLAGSNiels de Vos2016-06-292-76/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We use python-config to get recommended CFLAGS. It provides -D_FORTIFY_SOURCE=2 by default that conflicts with our --enable-debug option or a developer provided no-optimization option. Hence, filter it out from default CFLAGS. Cherry picked from commit 5e65701f2660d1be101da81bffea7721d4f9ece0: > Change-Id: Id80196baeb55415b1ea334e7b17143e56dfbadb3 > BUG: 1283948 > Co-authored-by: Kaleb S KEITHLEY <kkeithle@redhat.com> > Signed-off-by: Raghavendra Talur <rtalur@redhat.com> > Reviewed-on: http://review.gluster.org/12707 > Smoke: Gluster Build System <jenkins@build.gluster.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Change-Id: Id80196baeb55415b1ea334e7b17143e56dfbadb3 BUG: 1336137 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14339 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Anoop C S <anoopcs@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>