summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tests: return correct value from run_head_tests when no tests are foundJeff Darcy2016-03-121-4/+4
| | | | | | | | | | | | | Also added a diff filter to avoid listing deleted tests. Thanks to Raghavendra Talur for the suggestion. Change-Id: Ied2d552d227b55027211c07db6ee5dc20979596b Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: https://review.gluster.org/13686 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> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Choose local child as source if possiblePranith Kumar K2016-03-119-31/+57
| | | | | | | | | | | | | | | | | It is better to choose local brick as source if possible to prevent over the wire read thus saving on bandwidth. Also changed code to not attempt data-heal if 'source' is selected as arbiter. Change-Id: I9a328d0198422280b13a30ab99545370a301dfea BUG: 1314150 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13585 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Krutika Dhananjay <kdhananj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/shard: Implement discard fopKrutika Dhananjay2016-03-119-30/+167
| | | | | | | | | | | | Change-Id: Ia5bd8d36b21a586df6556fbec3474892d5871229 BUG: 1261841 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13657 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* tests: run tests from the most recent commit firstJeff Darcy2016-03-112-2/+40
| | | | | | | | | | Change-Id: If11f552543bf0f1f0e9756e9f2237b72e44b7aed Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/13439 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: Raghavendra Talur <rtalur@redhat.com>
* tests: Use force_umount instead of umountPranith Kumar K2016-03-111-3/+3
| | | | | | | | | | | | | | | umount leads to spurious failures with "mount is busy" kind of errors at the time of umount. Use 'force_umount' instead. BUG: 1310171 Change-Id: I5a5579288f002de14effc00b793143fef86eb828 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13611 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
* snapshot: Use svc->manager during glusterd restartAvra Sengupta2016-03-112-5/+34
| | | | | | | | | | | | | | | Instead of using svc->start, we should use svc->manager as it takes care of initializing svc too, and both starts and stops snapd as needed. Change-Id: I3d3afdf4c4203bee3b790a017b820339fd376af6 BUG: 1316437 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/13665 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: Rajesh Joseph <rjoseph@redhat.com>
* fdl: fix race during initializationJeff Darcy2016-03-101-7/+7
| | | | | | | | | | | | | | | | | | | | | | There was a race between fdl_worker starting to run and setting this->private in fdl_init. This should never happen on a multiprocessor, since the new thread should start on a different core and creating it there should take many times longer than getting from pthread_create to the end of fdl_init on the original core. The only way it seems likely is if the new thread is started on the same core that's already in fdl_init, and the new thread preempts the old, which many would consider broken . . . but there are plenty of broken thread implementations and it's hardly surprising that glibc has one. Still, it's a race and it did show up in regression tests a few times, so it needs to be fixed. Change-Id: Ifa5b0ae1ec111860f0d3f55a98aa2b8f2cef84ca Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/13674 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: Vijay Bellur <vbellur@redhat.com>
* protocol client/server: Fix client-server handshakeAvra Sengupta2016-03-109-12/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Currently on a successful connection between protocol server and client, the protocol client initiates a CHILD_UP event in the client stack. At this point in time, only the connection between server and client is established, and there is no guarantee that the server side stack is ready to serve requests. It works fine now, as most server side translators are not dependent on any other factors, before being able to serve requests today and hence they are up by the time the client stack translators receive the CHILD_UP (initiated by client handshake). The gap here is exposed when certain server side translators like NSR-Server for example, have a couple of protocol clients as their child(connecting them to other bricks), and they can't really serve requests till a quorum of their children are up. Hence these translators should defer sending CHILD_UP till they have enough children up, and the same needs to be propagated to the client stack translators. Fix: Maintain a child_up variable in both the protocol client and protocol server translators. The protocol server should update this value based on the CHILD_UP and CHILD_DOWN events it receives from the translators below it. On receiving such an event it should forward that event to the client. The protocol client on receiving such an event should forward it up the client stack, thereby letting the client translators correctly know that the server is up and ready to serve. The clients connecting later(long after a server has initialized and processed it's CHILD_UP events), will receive a child_up status as part of the handshake, and based on the status of the server's child_up, can either propagate a CHILD_UP event or defer it. Change-Id: I0807141e62118d8de9d9cde57a53a607be44a0e0 BUG: 1312845 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/13549 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: Jeff Darcy <jdarcy@redhat.com>
* Tier: displaying status only one the nodes running tierdhari gowtham2016-03-101-7/+14
| | | | | | | | | | | | | | | | | | | | When tier status is given on a cluster where one node doesn't have tierd running, the status is shown as not started. The status of the node without tierd should not be displayed. This patch will skip if the current node if the status is not started Change-Id: Ibeb39f13133f94a5869b020c5ccd9bd6992323f1 BUG: 1315666 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/13647 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: hari gowtham <hari.gowtham005@gmail.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* glusterd: fixing few memory leak in glusterdGaurav Kumar Garg2016-03-101-3/+3
| | | | | | | | | | | | | | | | While freeing memory currently glusterd is not freeing correct memory. this might result in some serious situation. With this fix glusterd will free correct memory location. Change-Id: Ide9c33a2ec5822b560e9e2dfcb6a0b442fc97047 BUG: 1287517 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/13660 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* nsr-server: fix (?) ENODATA problem on FreeBSDJeff Darcy2016-03-102-0/+6
| | | | | | | | | | | Change-Id: I5f16a04e34a37e1f4cef38d75aff3479429473e3 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/13625 Tested-by: Avra Sengupta <asengupt@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Avra Sengupta <asengupt@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* tests, shard: fallocate tests refactorKrutika Dhananjay2016-03-107-57/+205
| | | | | | | | | | | | Change-Id: I3f275185f4dcb1939e8074851c8f140c5e40b28d BUG: 1261841 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13405 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* gluster/uss: change ctime attr of a dir when USS enabledvmallika2016-03-101-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Consider a testcase: mount -t nfs host1:/vol1 /mnt ls /mnt ls /mnt/.snaps (As expected this fails) gluster volume set vol1 features.uss enable Now `ls /mnt/.snaps` should work, but fails with No such file or directory. This is because NFS client and Kernel VFS caches the list of files in a directory. This cache is updated if there are any changes in the directory attributes. This patch solves the problem by changing ctime attribute when USS is enabled Change-Id: I48b284100d0589f1c0285782a1302080c15d4e1f BUG: 1163416 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/9106 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: Rajesh Joseph <rjoseph@redhat.com>
* uss/gluster: generate gfid for snapshot files from snapname and gfidvmallika2016-03-105-35/+162
| | | | | | | | | | | | | | | | | | | | | | | | | If 'a' and 'b' are hardlinks, we need to generate a virtual gfid for these files so that the inode number for 'a' and 'b' are same. Generate gfid as below: gfid_of_a = MD5(snapname + back_end_gfid(a)) if '/dir1/a' and '/dir2/b' are hardlinks, then inode number should be same for all below files: /mnt/.snaps/snap1/dir1/a /mnt/.snaps/snap1/dir2/b /mnt/dir1/.snaps/snap1/a /mnt/dir2/.snaps/snap1/b Change-Id: Ifda793455610e554f3f1e4cbb90d44c02cda4b0f BUG: 1171703 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/9255 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: Rajesh Joseph <rjoseph@redhat.com>
* glusterd: Always copy old brick ports when importingKaushal M2016-03-092-20/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When an updated volinfo is imported in, the brick ports from the old volinfo should be always copied. Earlier, this was being done only if the old volinfo was stopped and new volinfo was started. This could lead to brick ports chaging when the following sequence of steps happened. - A volume is stopped - GlusterD is stopped on a peer - The stopped volume is started - The stopped GlusterD is started This sequence would lead to bricks on the peer with re-started GlusterD to get new ports, which could break firewall rules and could prevent client access. This sequence could be hit when enabling management encryption in a Gluster trusted storage pool. Change-Id: I808ad478038d12ed2b19752511bdd7aa6f663bfc BUG: 1313628 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/13578 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* tests: Add mechanism for disabled testsRaghavendra Talur2016-03-0933-72/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requirements: Should be able to skip tests from run-tests.sh run. Should be granular enough to disable on subset of OSes. Solution: Tests can have special comment lines with some comma separated values within them. Key names used to determine test status are G_TESTDEF_TEST_STATUS_CENTOS6 G_TESTDEF_TEST_STATUS_NETBSD7 Some examples: G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=123456 G_TESTDEF_TEST_STATUS_NETBSD7=KNOWN_ISSUE,BUG=4444444 G_TESTDEF_TEST_STATUS_CENTOS6=BAD_TEST,BUG=123456;555555 You can change status of test to enabled or delete the line only if all the bugs are closed or modified or if the patch fixes it. Change-Id: Idee21fecaa5837fd4bd06e613f5c07a024f7b0c2 BUG: 1295704 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13393 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: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* fuse: Address the review comments in the backportPoornima G2016-03-095-28/+42
| | | | | | | | | | | | | | | | | Backport @ http://review.gluster.org/#/c/13626/3 Fix a typo error, consolidate the selinux and capability check in getxattr and setxattr. Change-Id: I4303de3d4dd00853169b07577311e03cbb912ed7 BUG: 1316327 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/13653 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Vijay Bellur <vbellur@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/bit-rot-stub: get frame->local before unwindingRaghavendra Bhat2016-03-091-3/+5
| | | | | | | | | | | | | | | | | | In bit-rot-stub, if unlink fails, then it was unwinding directly. Then it was trying to cleanup local. But local would be NULL, since it was unwinding directly without getting the value of frame->local. The NULL cleanup of local was causing the brick process to crash. Change-Id: I8544ba73b2e8dc0c50b1a53ff8027d85588d087b BUG: 1315465 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/13628 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* geo-rep: Fix Entry Creation issue with non root UID/GIDAravinda VK2016-03-091-0/+20
| | | | | | | | | | | | | | | | | | | | | | | During entry_ops RENAME Geo-rep sends stat info along with the recorded info from Changelog. In Slave side if Source file exists Geo-rep renames to Target file by calling os.rename. If source file does not exists, it tries to create Target file directly using available stat info from Master. If UID and GID are different in Master for that file then stat info will have different UID/GID during Create. Geo-rep gets EACCES when it tries to create a new entry using gfid-access with different UID/GID. With this patch, Entry creation with different UID/GID is split into two operations. Create Entry with UID:0 and GID:0 and then set UID/GID. Change-Id: I4987e3a205d8513c06fa66198cde145a87003a01 BUG: 1313303 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/13542 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: Kotresh HR <khiremat@redhat.com>
* geo-rep: hard-link rename issues on changelog replayMilind Changire2016-03-091-4/+24
| | | | | | | | | | | | | | | | | | | | | Problem: LINK + RENAME changelog when replayed after worker restart causes stale hard-links to persist since VFS returns success for RENAME if hard-links point to same inode. Solution: Worker detects RENAME being issued on hard-links to the same inode and unlinks the source file-name. Conditionally rename by verifying that the source gfid matches with the on-disk gfid on the slave. Change-Id: I3ff1c30ef79e77503c8b246d46dab8ac3059ccf2 BUG: 1296174 Signed-off-by: Milind Changire <mchangir@redhat.com> Reviewed-on: http://review.gluster.org/13189 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: Aravinda VK <avishwan@redhat.com>
* packaging: rpm scriptlet cleanup, handle -p /sbin/ldconfigKaleb S KEITHLEY2016-03-081-23/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RPM documention indicates that during an rpm install or erase, the script(lets): %post, %preun, and %postun (and %pre, %build, %install, etc.) are copied to a temp file, and then the temp file is run as a (/bin/sh or bash) script. Unfortunately the documentation is not clear about how rpmbuild and/or rpm determine where the end of any scriptlet is when it is copied to the file. Most things in the glusterfs.spec work correctly as is. These are the %preun, %post, and %postun scriptlets that are "closed" by a following %preun, %post, and %postun, or poetentially another scriptlet, e.g. %file. The ones that don't work correctly (only one actually) are those where there is a comment in the spec file before it is closed by another scriptlet. Further complicating things is that the type of scriptlet affects what rpm does and what `rpm -qp --scripts ...` shows. The specific one that didn't work was the "%postun libs" scriptlet. It is followed by a comment before being "closed" by the %files section (or scriptlet). It can be written two ways: "%postun libs\n/sbin/ldconfig" or "%postun libs -p /sbin/ldconfig" Either way it's written, `rpm -qp --scripts glusterfs-libs...` will include the comment lines between the %postun libs line and the following %files line. But the way rpm executes these depends on how they're written. If written as "%postun libs\n/sbin/ldconfig" rpm will simply run /sbin/ldconfig with no command line options, i.e. execve ("/sbin/ldconfig", [ "/sbin/ldconfig" ], [ ]); But when written as "%postun libs -p /sbin/ldconfig", it will copy the comment lines to a temp file, and pass the temp file name and "1" as (command line) parameters, i.e. execve ("/sbin/ldconfig", [ "/sbin/ldconfig", "/tmp/tmpXXXXXX", "1" ], [ ]); Which results in ldconfig exiting with an error. (Remember, both ways show the comment in `rpm -qp --scripts ...`) (Note though, that the similar "%postun api -p /sbin/ldconfig" is run correctly, because it is "closed" by the following "%postun server" scriptlet.) Finally, through trial and error, it appears that rpm can be tricked with a hack, and "closure" of the scriptlet forcedlike this: %postun libs -p /sbin/ldconfig %if ( 0%{?_undocumented_hack_closes_scriptlets} ) %postun %endif in which case ldconfig appears to run correctly. Note also that here too the comment will be included in the output of `rpm -qp --scripts ...` But that's very ugly hack. Change-Id: I587a490ddcdf47d01605479bc8ef8b0e439108fb BUG: 1315024 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13613 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> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* features/shard: Return ENOTSUP for unsupported fallocate flagsKrutika Dhananjay2016-03-082-1/+12
| | | | | | | | | | | | | | | Basis: http://lists.gnu.org/archive/html/qemu-devel/2016-02/msg05101.html Change-Id: I5bf80b6e8caed3d7f136fc57e16abfb28869e009 BUG: 1261841 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13523 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> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: Move tier-file-create.t to bad testsKrutika Dhananjay2016-03-081-0/+1
| | | | | | | | | | | | Change-Id: Iaddb244699b0e2647a67a75f257e4c47e0e69e0d BUG: 1315560 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13632 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: Dan Lambright <dlambrig@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* afr: misc performance improvementsRavishankar N2016-03-083-29/+74
| | | | | | | | | | | | | | | | | | | | | 1. In afr_getxattr_cbk, consider the errno value before blindly launching an inode refresh and a subsequent retry on other children. 2. We want to accuse small files only when we know for sure that there is no IO happening on that inode. Otherwise, the ia_sizes obtained in the post-inode-refresh replies may mismatch due to a race between inode-refresh and ongoing writes, causing spurious heal launches. Change-Id: Ife180f4fa5e584808c1077aacdc2423897675d33 BUG: 1309462 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/13595 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.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> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* qemu-block: deprecated/defunct, remove from treeKaleb S KEITHLEY2016-03-081-12/+0
| | | | | | | | | | | | | | | | qemu-block xlator is not used by anyone, or so I'm told. It's also substantially out of date. There's little reason to keep it in our sources. (And FedoraProject doesn't like bundled software either.) Change-Id: I1112a5fe5278b7899484eebc2e74fca713346b75 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13629 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: Jeff Darcy <jdarcy@redhat.com>
* glusterd: volume get should pick options from priv->opts tooAtin Mukherjee2016-03-084-19/+69
| | | | | | | | | | | | | | | As of now volume get was not looking for all the global options maintained in option dictionary in glusterd_conf_t. This patch includes the same. Change-Id: Ib05259a2dcacc4a712cae4217fe4a6553b61da56 BUG: 1300596 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13272 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* geo-rep: Fix CPU utilization 100% with PopenAravinda VK2016-03-081-0/+4
| | | | | | | | | | | | | | | | | | | Errorstore is maintained by Geo-rep to collect errors from the child processes opened using Popen. If Popen.communicate is used then it closes stderr. When stderr is not available errorstore.tailer() will enter into infinite loop without gap. With this patch, sleep time added when stderr of Child process is already closed. Change-Id: Ic36aabd6de35b259467d0bab7952468432867a94 BUG: 1315601 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/13637 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kotresh HR <khiremat@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* rpc: Connect back only if rpc is not disabledKotresh HR2016-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | This is to fix regression caused by below patch - http://review.gluster.org/#/c/13456/ As discussed over http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/14284, patch #13456 caused a regression where in if there are any pending rpc invocations, we end up accessing freed object. This patch fixes it by allowing reconnect during rpc submit only if rpc is not disabled. Change-Id: I4ef4dd52bd42368bb89129f98bc973e46c6a39f4 BUG: 1295107 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/13592 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* tools/glusterfind: Do not fail cleanup script on volume deleteAravinda VK2016-03-081-1/+6
| | | | | | | | | | | | | | | If glusterfind dir is not present inside GLUSTERD_WORKDIR, then cleanup script Post Volume delete was failing. This patch safely handles the absence of glusterfind directory in GLUSTERD_WORKDIR BUG: 1289935 Change-Id: I9f7e6035e3dc6079927803df942b0f921218c79a Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/12923 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: Kotresh HR <khiremat@redhat.com>
* glusterd:upon re-peer probe glusterd should not return response to CLI two timesGaurav Kumar Garg2016-03-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | If a node N1 and node N2 is part of the cluster and a node N2 try to reprobe node N1 when N1 is disconnected by any means (for eg: either server is down or glusterd is not running or there is a network outage, or firewall is blocking port number 24007 on which glusterd listen, etc.), then glusterd trying to send back two responses to CLI resulting into a double free and a glusterd crash. With this fix glusterd will send response to cli only once and prevent glusterd crash. Note: glusterd was crashing only when user has done first peer probe with hostname and re-probe with ip-address or vice-versa. Change-Id: I92012b147091cf9129f1fbc17834b3f4d7cb46a0 BUG: 1310677 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/13546 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: Atin Mukherjee <amukherj@redhat.com>
* fuse: Add a new mount option capabilityPoornima G2016-03-077-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | Originally all security.* xattrs were forbidden if selinux is disabled, which was causing Samba's acl_xattr module to not work, as it would store the NTACL in security.NTACL. To fix this http://review.gluster.org/#/c/12826/ was sent, which forbid only security.selinux. This opened up a getxattr call on security.capability before every write fop and others. Capabilities can be used without selinux, hence if selinux is disabled, security.capability cannot be forbidden. Hence adding a new mount option called capability. Only when "--capability" or "--selinux" mount option is used, security.capability is sent to the brick, else it is forbidden. Change-Id: I77f60e0fb541deaa416159e45c78dd2ae653105e BUG: 1309462 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/13540 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: Raghavendra G <rgowdapp@redhat.com>
* glusterd: avoid setting op-version lower than current cluster op-versionGaurav Kumar Garg2016-03-071-1/+15
| | | | | | | | | | | | | | | | | | | Currently glusterd allow setting a cluster op-version which is lower than current cluster op-version. Though command is successful but it does not set that lower op-version. With this fix it will return error message "Required op-version (requested op-version) should not be lower than current cluster op-version (current cluster op-version)" Change-Id: Ia5b61858ee22a5a26721ec12ab12ff48e1a40c82 BUG: 1315186 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/13622 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: Atin Mukherjee <amukherj@redhat.com>
* ganesha: coverity fix in glusterd-ganesha.cKaleb S KEITHLEY2016-03-071-28/+7
| | | | | | | | | | | | | | | | | | | | | | | | | CID 1351698 Allocating buffer of size stat.st_size) to read lines from the file without an overrrun feels like a bit of a hack. While it's extremely unlikely that the file would ever be more than a thousand bytes long, a) we don't want to use bad patterns (and set bad examples or precedents for elsewhere in the source), and b) what if somehow the file did become "large." We just don't want to ever risk allocating huge amounts of memory by accident. And all the superfluous logic to copy the resulting string? We have gf_strdup() for that. And a clean coverity. See following gerrit review comments for the URL. Change-Id: I5860d6995d0eed06667fd2369df6be53ccff6ceb Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13614 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: Jeff Darcy <jdarcy@redhat.com>
* qemu-block: deprecated/defunct, remove from treeKaleb S KEITHLEY2016-03-07124-42231/+2
| | | | | | | | | | | | | | | | | qemu-block xlator is not used by anyone, or so I'm told. It's also substantially out of date. There's little reason to keep it in our sources. (And FedoraProject doesn't like bundled software either.) Change-Id: I4aeb2fdfd962ec6d93de6bae126874121272220a Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13473 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: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* features/index: Get gfid type in readdirPranith Kumar K2016-03-041-1/+46
| | | | | | | | | | | | Change-Id: I2a6174e1af70a94a52b0b735fd8504800a7ea173 BUG: 1313135 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13553 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Anuradha Talur <atalur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* packaging: %post server isn't quietKaleb S KEITHLEY2016-03-041-1/+1
| | | | | | | | | | | | | firewall-cmd prints out "success" during install Change-Id: I9b0d3d38170d2fc41fefd6ef555a958c5eeb39aa BUG: 1312897 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13596 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* afr: do not set arbiter as a readable subvol in inode contextRavishankar N2016-03-043-4/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: If afr_lookup_done() or afr_read_subvol_select_by_policy() chooses the arbiter brick to serve the stat() data, file size will be reported as zero from the mount, despite other data bricks being available. This can break programs like tar which use the stat info to decide how much to read. Fix: In the inode-context, mark arbiter as a non-readable subvol for both data and metadata. It it to be noted that by making this fix, we are *not* going to serve metadata FOPS anymore from the arbiter brick despite the brick storing the metadata. It makes sense to do this because the ever increasing over-loaded FOPs (getxattr returning stat data etc.) and compound FOPS in gluster will otherwise make it difficult to add checks in code to handle corner cases. Change-Id: Ic60b25d77fd05e0897481b7fcb3716d4f2101001 BUG: 1310171 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reported-by: Mat Clayton <mat@mixcloud.com> Reviewed-on: http://review.gluster.org/13539 Reviewed-by: Anuradha Talur <atalur@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> 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: Jeff Darcy <jdarcy@redhat.com>
* tests: Fix spurious failure of ec-read-policy.tXavier Hernandez2016-03-041-1/+1
| | | | | | | | | | | | Change-Id: I5297e24dd10cbfbcd671fe630ae3e960b9daa8f8 BUG: 1313775 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/13575 Tested-by: Raghavendra Talur <rtalur@redhat.com> 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: Jeff Darcy <jdarcy@redhat.com>
* Remove replace-brick-self-heal.t from bad-testsAnuradha Talur2016-03-041-1/+0
| | | | | | | | | | | | | | Unable to recreate any failures even after running the test for more than an hour in a loop. Change-Id: Id1c7e60d39bce6b312dbb4ea0975079348bb1649 BUG: 1314549 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/13599 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>
* quota: reduce latency for testcase ./tests/bugs/quota/bug-1293601.tvmallika2016-03-041-5/+3
| | | | | | | | | | | | | | | | Currently test-case './tests/bugs/quota/bug-1293601.t' runs quota enable and disable 10 times each, which take a long time. This is not a real use-case and it is enough to test once. Change-Id: Ic282d66438f89721f3c392929047ba42b85ad155 BUG: 1313300 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13556 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: Jeff Darcy <jdarcy@redhat.com>
* glusterd: reject peer probe from a reinstalled nodeAtin Mukherjee2016-03-042-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | In a cluster if a node (say N1) goes through a OS reinstallation then probing some other node in the cluster from N1 doesn't fail as in gd_validate_mgmt_hndsk_req () uuid & hostname checks are done separately but there should be one more check where both the conditions should meet. Steps to create the problem - N1 probes N2 - bring down glusterd instance on N2 - remove /var/lib/glusterd/* from N2 - restart glusterd instance on N2 - execute gluster peer probe N1 from N2 Validations in gd_validate_mgmt_hndsk_req () has been improved to handle this special case Change-Id: I3ba5d8e243bae07a7a6743d01b019e7014d39171 BUG: 1311874 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13519 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: Jeff Darcy <jdarcy@redhat.com>
* socket: Launch socket_poller only if connect succeededKaushal M2016-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | For an encrypted connection, sockect_connect() used to launch socket_poller() in it's own thread (ON by default), even if the connect failed. This would cause two unrefs to be done on the transport, once in socket_poller() and once in socket_connect(), causing the transport to be freed and cleaned up. This would cause further reconnect attempts from failing as the transport wouldn't be available. By starting socket_poller() only if connect succeeded, this is avoided. Change-Id: Ie22090dbb1833bdd0f636a76cb3935d766711917 BUG: 1313206 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/13554 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: Raghavendra G <rgowdapp@redhat.com>
* packaging: gratuitous dependencies on rsyslog-mm{count,jsonparse}Kaleb S KEITHLEY2016-03-031-30/+0
| | | | | | | | | | | | | | | | | | | | | | | | remove unnecessary dependencies. GlusterFS only ships example config files, and the system may not actually be using rsyslog at all. (It may only be RHEL5 that uses rsyslog "out of the box.") Also, several example config files (including gluster-rsyslog-7.2.conf, gluster-rsyslog-5.8.conf, logger.conf.example) are already installed in /etc/glusterfs/ by `make install` in the extras directory and are included in the -server RPM. Installing them (anywhere) in the spec file is redundant. Furthermore, a query in the fedora-devel mailing list about the preferred location for these files went unanswered. Change-Id: I07bd6a8714a05e8b91adc03f101032c1593da360 BUG: 1310437 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13485 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: Jeff Darcy <jdarcy@redhat.com>
* MAINTAINERS: add maintainers for quotavmallika2016-03-031-3/+2
| | | | | | | | | | Change-Id: I47faaca0f66b8e566ced72646ee6ff8e7cad90d8 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13586 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: Jeff Darcy <jdarcy@redhat.com>
* tier: Fix unused-but-set-variable warningRaghavendra Talur2016-03-031-2/+0
| | | | | | | | | | | | Change-Id: Ie5eaf1075b1c9c29dd7d85bf7b61b22e1fbce422 BUG: 1314291 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13591 Reviewed-by: hari gowtham <hari.gowtham005@gmail.com> 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: Jeff Darcy <jdarcy@redhat.com>
* tests/quota : improving tests for quotaManikandan Selvaganesh2016-03-0323-342/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tests/basic/quota.t includes all the basic test that needs to be tested for quota. In most of the other tests specific to bugs(tests/bugs/quota/*), tests such as creating and starting volume, enabling quota, setting limit, writing data, doing list have been done which is essential to write a individual quota test file, but, if the specific bug just needs to test *few* particular cases, I have moved those tests under tests/basic itself to speedup the regressions. Basics of inode-quota and it's enforcing, renaming with quota are basic tests and is hence moved under tests/basic folder. In other files, I have removed tests which are not needed, such as 'pidof glusterd' or checking for 'gluster volume info' or if there are any test which is already being tested under tests/basic and is being written again. Change-Id: Iefd6d9529246d59829cc5bf02687a1861d8462a8 BUG: 1294826 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/13216 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: Vijaikumar Mallikarjuna <vmallika@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* Tier: making detach start fail when brick on hot tier is downhari2016-03-032-1/+8
| | | | | | | | | | | | | | | | | | | Currently detach tier start happens even when a hot brick is down this might lead to data loss. This patch prevents the detach tier start from being executed successfully if a brick in hot tier is down Change-Id: I3b6047a44bd01b8a6887d41f799f64de6bf075ef BUG: 1309999 Signed-off-by: hari <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/13474 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: hari gowtham <hari.gowtham005@gmail.com> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* MAINTAINERS: Geo-replication maintainer additionVenky Shankar2016-03-031-0/+1
| | | | | | | | | Change-Id: I231e075370c7f883090ecf5792e6f7633773f6c9 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/11171 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>
* glusterd: Avoid ret value of glusterd_resolve_brick in retreive brick pathAtin Mukherjee2016-03-031-3/+6
| | | | | | | | | | | | | | | | | | | | In glusterd_store_retrieve_bricks() commit a60c39d introduced glusterd_resolve_brick () call to resolve all the bricks which is incorrect since by the time peerinfo list may not be constructed. The requirement here was to get the local brick's uuid populated and match that with MY_UUID. Fix is to overlook the return code of glusterd_resolve_brick() to ensure that the failure in resolving non local bricks are genuine and expected. Change-Id: I22822ae5b4e96fe4eacd50ea5c41e58061557106 BUG: 1313901 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13588 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* mgmt/glusterd: Show features.shard option in volume-set-help outputKrutika Dhananjay2016-03-022-1/+16
| | | | | | | | | | | | Change-Id: If9004c4374b92d058cf56add50a91ecad43a2840 BUG: 1261773 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/13565 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> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>