summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* features/bit-rot-stub: delete the link for bad object in quarantine directoryRaghavendra Bhat2015-12-164-2/+95
| | | | | | | | | | | | | | | | | | When the bad object is deleted (as of now manually from the backend itself), along with its gfid handle, the entry for the bad object in the quarantne directory is left as it is (it also can be removed manually though). But the next lookup of the object upon not finding it in the backend, sends forget on the in-memory inode. If the stale link for the gfid still exists in the quarantine directory, bir-rot-stub will unlink the entry in its forget or in the next failed lookup on that object with errno being ENOENT. Change-Id: If84292d3e44707dfa11fa29023b3d9f691b8f0f3 BUG: 1285241 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/12743 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* tier/glusterd: Only positive values for freq-thresholdsJoseph Fernandes2015-12-162-0/+6
| | | | | | | | | | | | Fixed error handling for validation for freq-thresholds Change-Id: Ibe3a9752ac0b525b0c8c0d6c4b4e4d694bd91b88 BUG: 1291603 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/12970 Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* cluster/afr: During name heal, propagate EIO only on gfid or type mismatchKrutika Dhananjay2015-12-161-5/+13
| | | | | | | | | | | | | | | | When the disk associated with a brick returns EIO during lookup, chances are that name heal would return an EIO because one of the syncop_XXX() operations as part of it returned an EIO. This is inherently treated by afr_lookup_selfheal_wrap() as a split-brain and the lookup is aborted prematurely with EIO even if it succeeded on the other replica(s). Change-Id: Ib9b7f2974bff8e206897bb4f689f0482264c61e5 BUG: 1291701 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12973 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>
* glusterd/afr: store afr pending xattrs as a volume optionRavishankar N2015-12-154-16/+122
| | | | | | | | | | | | | | | | | | | | | | | Problem: When AFR xlator initialises, it uses the name of the client xlators below it for storing the pending changelogs (xattrs). This can be problem when some other xlator is loaded in between AFR and the client. Though that is a trivial 'traverse-graph-till-the-client-and-use-the-name' fix in AFR's init(), there are other issues like when there's no client xlator at all when, say, AFR is moved to the server side. Fix: The client xlator names are currenly unique and stored as brickinfo->brick_ids. So persist these ids as comma separated values in AFR's volume_options and use them as xattr values during init(). Change-Id: Ie761ffeb3373a4c4d85ad05c84a768c4188aa90d BUG: 1285152 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12738 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* tier/glusterd : making new tier detach command throw warninghari gowtham2015-12-155-22/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | For detach tier, the validation was done using the string "detach-tier" but the new commands used has the string "tier". Making the string use "tier" to compare, creates problem as the tier status and tier detach have the keyword "tier". So tier detach and tier status were separated. and strtok was used to prevent the condition from passing when the volume name has a substring of "tier". (only the second word from the string is got and checked if the feature is tier) Problem: new detach tier command doesnt throw warnings like "not a tier volume" or " detach tier not started" respectively instead it prints empty output. Fix: while validate the volume is checked if its a tiered volume if yes it is checked if the detach tier is started, else a warning is thrown respectively. Change-Id: I94246d53b18ab0e9406beaf459eaddb7c5b766c2 BUG: 1288517 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/12883 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: DEBUG log should not come after resetting client log levelGaurav Kumar Garg2015-12-151-0/+2
| | | | | | | | | | | | | | | | | After resetting diagnostics.client-log-level option still DEBUG log is logging in scrubber and bitrot log file. After resetting any option value of that options goes to default value. This patch will set the default value of client and brick log level to "INFO" log level. Change-Id: I4cf04754dcf5ddc908dae4d9bdf525cfcd6cc2bd BUG: 1252696 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/11887 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* test: Move tests/bugs/tier/bug-1286974.t to bad testMohammed Rafi KC2015-12-151-0/+1
| | | | | | | | | | | | | Moving this bug into bad test as it causes some spurious failures Change-Id: I5fe491858283374e5a061a48c50ac5a02a2941fa BUG: 1251592 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12967 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* storage/posix: Implement .unlink directoryAshish Pandey2015-12-159-24/+322
| | | | | | | | | | | | | | | | | | | | | | | | Problem: For EC volume, If a file descriptor is open and file has been unlinked, any further write on that fd will fail. When a write request comes, EC internally reads some blocks using anonymous fd. This read will fail as the file has already been unlinked. Solution: To solve this issue, we are using .unlink directory to keep track of unlinked file. If a file is to be unlinked while its fd is open, move this to .unlink directory and unlink it from .glusterfs and real path. Once all the fd will be closed, remove this entry form .unlink directory. Change-Id: I8344edb0d340bdb883dc46458c16edbc336916b9 BUG: 1286029 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/12816 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Xavier Hernandez <xhernandez@datalab.es> 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>
* features/changelog: Remove incorrect error messageKotresh HR2015-12-141-4/+0
| | | | | | | | | | | | | | | | | | During changelog_rollover, the rename error is logged even though changelog rollover is successful. This got mistakenly added as part of commit 64e6836ac8fb96f38a859eea0d8525cd9bd2693f (http://review.gluster.org/10532). Removing the same. Change-Id: I7ac1a16b41de5a6a4d7e714946585dff3ce0e83b BUG: 1290421 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/12940 Reviewed-by: Aravinda VK <avishwan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* bitrot: getting correct value of scrub stat'sGaurav Kumar Garg2015-12-146-41/+220
| | | | | | | | | | | | | | | | | | | When user execute bitrot scrub status command then gluster is not giving correct value of Number of Scrubbed files, Number of Unsigned files, Last completed scrub time, Duration of last scrub. With this patch scrub status will give correct value for all the above fields. Change-Id: Ic966f76d22db5b0c889e6386a1c2219afbda1f49 BUG: 1285989 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/12776 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* bitrot: Update 'scrub status' cmd in man pageKotresh HR2015-12-141-0/+3
| | | | | | | | | | | | | | Update following bitrot status command in man page. gluster vol bitrot <volname> scrub status Change-Id: I86aa123d568711c6b3d655b60cfd901a8d4c3408 BUG: 1286988 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/12834 Reviewed-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org>
* dht/rebalance: Use seperate return variable for destination cleanupJoseph Fernandes2015-12-121-3/+3
| | | | | | | | | | | | | | | Use seperate local return variable for destination cleanup, without messing with the function return variable. Change-Id: Iaea9ed2927234fdb888aef7a31ec362090e98196 BUG: 1290975 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/12956 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* tests:bugs:fuse: add setup.sh and teardown.sh to facilitate manual testingMichael Adam2015-12-112-0/+25
| | | | | | | | | | Change-Id: Ia8fe402663bbdabdc10c18ab42a2063466eb42b6 BUG: 1286735 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12830 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* tests:bugs:fuse: add test for bug #1283103 - selinux mount vs security xattrsMichael Adam2015-12-111-0/+59
| | | | | | | | | | BUG: 1283103 Change-Id: Ic4485d650275f67eb6b0b8382a92eb829c06e27c Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12827 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* Add support for sparse files to tarssh methodAlex Markelov2015-12-111-1/+1
| | | | | | | | | | | | | | | | Without '--sparse' option tar will not properly archive sparse file and geo-replication will result in non-sparse file on the remote end. Here is more on how I arrived at this http://markelov.org/wiki/index.php/GlusterFS_3.6.1_on_CentOS_6.5:_geo-replication_and_sparse_files_problem Change-Id: I8d671964a1b48bbb916e4a064571221bf3631494 BUG: 1276839 Signed-off-by: Alex Markelov <alex@markelov.org> Reviewed-on: http://review.gluster.org/12476 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com>
* features/index : Prevent logging due to NULL dictAnuradha Talur2015-12-101-4/+4
| | | | | | | | | | | | | Added a check for non-NULLness of dict before performing dict_foreach_match on it. Change-Id: I77d83559934006425ed33745b8a244b2f5d90cb1 BUG: 1250803 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/12910 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>
* fuse: forbid only access to security.selinux xattr if not mounted with 'selinux'Michael Adam2015-12-101-2/+2
| | | | | | | | | | | | | | | | | Originally, all selinux.* xattrs were forbidden, causing for example Samba's acl_xattr module which uses security.NTACL to fail without the 'selinux' mount option, which is confusing at least. This change specializes the check to the security.selinux attribute, so other selinux.* attributes work with or without the option. Change-Id: I9d3083123efbf403f20572cfb325a300ce2e90d9 BUG: 1283103 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12826 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* tests, shard: Remove dependency on strict-write-orderingKrutika Dhananjay2015-12-105-10/+9
| | | | | | | | | | Change-Id: I00171a77bdefb1c2e7e4610cb0ade5679bdb761f BUG: 1289840 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12915 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>
* tests: Fix arbiter-statfs.tRavishankar N2015-12-102-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ..and remove it from bad tests list. Problem: https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/12516/consoleFull ++ SETUP_LOOP /d/backends/brick1 ++ '[' 1 '!=' 1 ']' ++ backend=/d/backends/brick1 ++ case ${OSTYPE} in +++ awk -F: '/not in use/{print $1; exit}' +++ vnconfig -l vnconfig: VNDIOCGET: Bad file descriptor ++ vnd= ++ '[' x = x ']' ++ echo 'no more vnd' no more vnd ++ return 1 Fix: TEST the return value of SETUP_LOOP. Also added EXIT_EARLY to the test case because there is no point in continuing the test when setting the bricks fail. Change-Id: I933611c41f93ac646f1170b62db656314c801ef1 BUG: 1290125 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12936 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* glusterd: Maintain per transaction op-info objectanand2015-12-102-0/+196
| | | | | | | | | | | | | | | | Issues: Since in op-sm transactions a mix of access to global op-info & per transaction op-info objects are used, the correctness of op-info object may go for a toss resulting into incorrect response getting passed back to cli Fix: Use per transaction op-info object Change-Id: Ice023bace3e137dfd8e7b13bd5b53545a79a203f BUG: 1287027 Signed-off-by: anand <anekkunt@redhat.com> Reviewed-on: http://review.gluster.org/12836 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* tests/tier: spurious failure in rename testN Balachandran2015-12-102-5/+8
| | | | | | | | | | | | | | | bug-1279376-rename-demoted-file.t fails sometimes The fix is based on the assumption that the test failed because the demotion happened too quickly. Change-Id: Ieccc736f387fcf6afaa72fa9918adb6dd34f2c8a BUG: 1289845 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/12926 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* storage/posix: fix dict leak in posix_fgetxattrSusant Palai2015-12-101-2/+1
| | | | | | | | | | Change-Id: I8c53805993570e6f37786dde2103cb884c026791 BUG: 1285230 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/12916 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* glusterd: add pending_node only if hxlator_count is validRavishankar N2015-12-091-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a regression introduced by commit 0ef62933649392051e73fe01c028e41baddec489 . See BZ for bug description. Problem: To perform GLUSTERD_BRICK_XLATOR_OP, the rpc requires number of xlators (n) the op needs to be performed on and the xlator names are populated in dictionary with xl-0, xl-1... xl-n-1 as keys. When Volume heal full is executed, for each replica group, glustershd on the local node may or may not be selected to perform heal by glusterd. XLATOR_OP rpc should be sent to the shd running on the same node by glusterd only when glustershd on that node is selected at least once. This bug occurs when glusterd sends the rpc to local glustershd even when it is not selected for any of the replica groups. Fix: Don't send the rpc to local glustershd when it is not selected even once. Change-Id: I2c8217a8f00f6ad5d0c6a67fa56e476457803e08 BUG: 1287503 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12843 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>
* tier/ctr: Check filename in ctr_lookup for nameless lookupJoseph Fernandes2015-12-091-1/+1
| | | | | | | | | | | | Check filename in ctr_lookup for nameless lookup Change-Id: I1ab3f658e3b9fee708f6986d1990f16db920d2fb BUG: 1285663 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/12760 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* tests: mark several tests as badMichael Adam2015-12-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are currently several spurious tests. We should bundle adding them to the bad test list into one patch so that they don't prevent each other's regression runs from succeeding... Failing on Linux: ================= tests/basic/afr/split-brain-healing.t: https://build.gluster.org/job/rackspace-regression-2GB-triggered/16680/consoleFull tests/basic/afr/sparse-file-self-heal.t: https://build.gluster.org/job/rackspace-regression-2GB-triggered/16682/consoleFull tests/basic/afr/replace-brick-self-heal.t: https://build.gluster.org/job/rackspace-regression-2GB-triggered/16681/consoleFull tests/bugs/tier/bug-1279376-rename-demoted-file.t: https://build.gluster.org/job/rackspace-regression-2GB-triggered/16675/consoleFull this one thows core: tests/bugs/snapshot/bug-1140162-file-snapshot-features-encrypt-opts-validation.t https://build.gluster.org/job/rackspace-regression-2GB-triggered/16674/consoleFull Failing on NetBSD: ================== tests/basic/afr/arbiter-statfs.t: https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/12551/consoleFull tests/features/weighted-rebalance.t: https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/12538/consoleFull Change-Id: I1f48d5631d761b5d3e736bfd918f483bdbd36c5a BUG: 1290270 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12933 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tier/dht: files are still going to decommissioned subvolMohammed Rafi KC2015-12-091-3/+27
| | | | | | | | | | | | | | After detach tier start, creates are still going to hot tier. Because when creating data files we are not checking for decommissioned bricks. Change-Id: I8e28258d9b2367dcc8ad6e5e91d0e54d92fdf771 BUG: 1289602 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12914 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* tier : Spawn promotion or demotion thread depending on local bricksJoseph Fernandes2015-12-091-22/+29
| | | | | | | | | | | | | | | | | | | Spawn Promotion or Demotion depending if there are any Cold or Hot bricks present localy. IF the local HOT brick list is empty dont spawn demote thread. IF the local COLD brick list is empty dont spawn promote thread. Signed-off-by: Joseph Fernandes <josferna@redhat.com> Change-Id: I524730e59414dd156c78ec0bd7a3629212697e6e BUG: 1289578 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/12912 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* tests/bug-924726.t: fix grep pattern to get correct glusterfs pidRaghavendra G2015-12-091-1/+1
| | | | | | | | | Change-Id: Ia2444b1b3e45e3e224bcd59e780a0f38c492f133 BUG: 1289428 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/12906 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* tests: fix brick_up_statusKaushal M2015-12-094-5/+4
| | | | | | | | | | | | | | | The brick_up_status function wasn't correct after the introduction of the RDMA port into the `volume status` output. It has been fixed to use the XML brick status of a specific brick instead of normal CLI output. Change-Id: I5327e1a32b1c6f326bc3def735d0daa9ea320074 BUG: 1289584 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/12913 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: fix the buildMichael Adam2015-12-091-1/+1
| | | | | | | | | | | | | | Fix the build broken in 6e9f88cfd4c80c6af7260e5e6537cb76b6c0 Change-Id: I0c5cedff980688cb47f3f0e9f4968c23d2f507d3 BUG: 1289869 Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-on: http://review.gluster.org/12918 Reviewed-by: Poornima G <pgurusid@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Atin Mukherjee <amukherj@redhat.com>
* quota: copy quota_version value in func glusterd_volinfo_dupvmallika2015-12-082-0/+49
| | | | | | | | | | | | | | | | | | | | | quota_version is a new variable introduced for quota xattr versioning feature. quota_version was not copied when creating duplicate volinfo in function 'glusterd_volinfo_dup' so any feature like snapshot/tiering using glusterd_volinfo_dup will get the default value of quota_version instead of the correct number and can cause a problem Change-Id: I7b0f418002d49aa7210e2e741e65ee5b2593e6a6 BUG: 1288474 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12881 Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd/quota: quota-version conflict in export/import volinfovmallika2015-12-086-11/+36
| | | | | | | | | | | | | | | When exporting/importing voinfo during handshake, quota conf and quota xattr version were using same key 'quota-version' and updated wrong values when importing quota version values. Change-Id: If939d6f5bc4851d4114963877be72dda21834f0f BUG: 1287996 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12865 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* tier/glusterd: Check before starting tier daemon during volume startMohammed Rafi KC2015-12-084-5/+90
| | | | | | | | | | | | | | | | | We start tier daemon when volume is started without looking into the previous status. The problem with that if detach-tier is started and then volume force start is actually starting tier daemon. This is also fixes a problem where tier daemon is not starting after detach stop. Change-Id: I15b56a711e12f0e24f5ab123561258bd448621f7 BUG: 1286974 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/12833 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* posix: fix posix_fgetxattr to return the correct errorSusant Palai2015-12-081-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. Change-Id: I5db3c1821208166a052d734b0be2553d009b8ee4 BUG: 1285230 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>
* quota: add 'quota-version' to xlator volume_options structurevmallika2015-12-081-0/+1
| | | | | | | | | | | | | | | | | Below error is seen in brick log: 0-vol1-quota: option 'quota-version' is not recognized So add this option to the volume_options structure of marker xlator Change-Id: I1bd68a537936ee0f9af85dac74f1377f84edb8f4 BUG: 1283178 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12878 Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* features/shard: Do not update inode-ctx size (again) after xattropKrutika Dhananjay2015-12-081-2/+4
| | | | | | | | | | | | | | | This is to fix race between parallel writevs that could mess up the file size value in inode ctx. Thanks to Pranith for helping with RCA'ing the issue. Change-Id: Ief94e0b3bcd87a8e2391fb39af1b99d020abd764 BUG: 1289447 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12907 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cli/quota: show used_space,(file,dir) count even when quota limit is not setManikandan Selvaganesh2015-12-083-55/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: As of now quota 'list/list-objects' will list the usage only if limit is set for every directory else it will fail with ENOATTR(If inode/inode-quota is already configured for the first time). Feature: With the patch we are enhancing this command to list the usage even if quota limit is not set but still the user has to configure inode/inode-quota for the first time. Example: Consider we have /client/dir and /client1(absolute path from mount point): Quota limit is set only on /client. when we try listing /client/dir or /client1, it shows "Limit not set". Fix: The patch fixes this by showing "used space" in case of list command and shows "file_count" & "dir_count" in case of list-objects command. This works fine with xml output as well. Change-Id: I68b08ec77a583b3c7f39fe4d6b15d3d77adb095a BUG: 1284752 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/12741 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* cluster/tier : Fix double free in tier processN Balachandran2015-12-071-3/+1
| | | | | | | | | | | | | | | | | The tier process tries to free ipc_ctr_params twice if the syncop_ipc call in tier_process_ctr_query fails. ipc_ctr_params is freed when ctr_ipc_in_dict is freed. But ctr_ipc_out_dict is NULL when syncop_ipc fails, causing GF_FREE to be called on a non-NULL ipc_ctr_params ptr again. Change-Id: Ia15f36dfbcd97be5524588beb7caad5cb79efdb4 BUG: 1288995 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/12890 Reviewed-by: Joseph Fernandes Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* glusterd: Disallow peer with existing volumes to be probed in clusterAtin Mukherjee2015-12-064-4/+27
| | | | | | | | | | | | | | | As of now we do allow peer to get added in the trusted storage pool even if it has a volume configured. This is definitely not a supported configuration and can lead to issues as we never claim to support merging clusters. A single node running a standalone volume can be considered as a cluster. Change-Id: Id0cf42d6e5f20d6bfdb7ee19d860eee67c7c45be BUG: 1287992 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/12864 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* mount/fuse: Fix use-after-free crashPranith Kumar K2015-12-061-3/+6
| | | | | | | | | | | | fouh->len is accessed after 'node' is freed. Also 'rv' is int where as fouh->len is uint32, changed comparison to ssize_t variables. BUG: 1288857 Change-Id: Ied43d29e1e52719f9b52fe839cee31ce65711eea Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/12886 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* tier/dht: Fix mem leak from lookup response dictJoseph Fernandes2015-12-061-0/+6
| | | | | | | | | | | | | Fixing memory leak from response dict during a parent lookup to get the path. Change-Id: I60c23d0b25e7f763f0e53c40e71ee053aba6d555 BUG: 1288019 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/12867 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Joseph Fernandes Tested-by: Joseph Fernandes
* tier/tier: Ignoring status of already migrated filesJoseph Fernandes2015-12-031-5/+16
| | | | | | | | | | | | | Ignore the status of already migrated files and in the process don't count. Change-Id: Idba6402508d51a4285ac96742c6edf797ee51b6a BUG: 1276141 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/12758 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* glusterd: disable ping timer b/w glusterd and make epoll thread count to 1Gaurav Kumar Garg2015-12-031-1/+2
| | | | | | | | | | | | | | | | Currently glusterd is crashing when enable/disable heal and i/o is in progress on the fuse mount. This is because of by default multi thread epoll in glusterd is 2. Workaround is to make epoll thread to 1 and set ping-timeout to 0 Change-Id: Ifbe9b43a361c5409b707539f0ee831c610a5c36b BUG: 1288059 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12874 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* Make rfc.sh show what its actually doingPatrick Uiterwijk2015-12-031-0/+13
| | | | | | | | | | | Change-Id: Ifb9246a2680e5f985871d4209b46dd803979c2e1 BUG: 1131275 Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com> Reviewed-on: http://review.gluster.org/8496 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* tests: add bug-924726.t to ignore listDan Lambright2015-12-031-1/+2
| | | | | | | | | | | | bug-924726.t has had spurious errors in regression tests. Change-Id: I5514e90909c3ecdd487c0dcf501ebf0952dc4fbb BUG: 1287872 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/12859 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* cluster/tier: fix loading tier.so into glusterdN Balachandran2015-12-038-43/+74
| | | | | | | | | | | | | | | | | glusterd occasionally loads shared libraries of translators. This failed for tiering due to a reference to dht_methods which is defined as a global variable which is not necessary. The global variable has been removed and this is now a member of dht_conf and is now initialised in the *_init calls. Change-Id: Ifa0a21e3962b5cd8d9b927ef1d087d3b25312953 BUG: 1287842 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/12863 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com>
* glusterd: stop daemon services upon peer detach correctlyGaurav Kumar Garg2015-12-032-18/+41
| | | | | | | | | | | | | | | | | | | | | Problem: Currently glusterd is stopping all the daemons service upon peer detach. If user have multi node cluster and if user want to detach any node from the cluster, and detached node having stand alone volume then upon detaching glusterd stopping all the daemon's of the detached node, which is having running volume. Fix: Upon peer detach it should do peer detach cleanup properly and it should stop only those daemon on the node on which it require. Change-Id: I98b8099166f82e235ded6d02261f59a6511a003b BUG: 1287455 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/12838 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* geo-rep: use cold tier bricks for namespace operationsSaravanakumar Arumugam2015-12-034-17/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: symlinks are not getting synced to slave in a Tiering based volume. Solution: Now, symlinks are created directly in cold tier bricks( in the backend). Earlier, cold tier was avoided for namespace operations and only hot tier was used while processing changelogs. Now, cold tier is HASH subvolume in a Tiering volume. So, carry out namespace operation only in cold tier subvolume and avoid hot tier subvolume to avoid any races. Earlier, XSYNC was used(and changeloghistory avoided) during initial sync in order to avoid race while processing historychangelog in Hot tier. This is no longer required as there is no race from Hot tier. Also, avoid both live and history changelog ENTRY operations from Hot tier to avoid any race with cold tier. Change-Id: Ia8fbb7ae037f5b6cb683f36c0df5c3fc2894636e BUG: 1287519 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com> Reviewed-on: http://review.gluster.org/12844 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* fuse: pass default SElinux mount options on to the kernelNiels de Vos2015-12-031-0/+5
| | | | | | | | | | | | | | | | In order to set default SElinux contexts on a Gluster mount, the standard SElinux mount options need to be passed to the kernel. The mount(8) manual page lists "context", "fscontext", "defcontext" and "rootcontext" as valid options. BUG: 1287763 Change-Id: I015fe27e4c6ff36a030e3480b23141aca2d91fc2 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/12858 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Reviewed-by: Manikandan Selvaganesh <mselvaga@redhat.com>
* snapshot/clone : Fix tier pause failure for snapshot cloneAvra Sengupta2015-12-024-21/+37
| | | | | | | | | | | | | | | | | | | | On a tiered volume, snapshot clone fails while trying to pause tier, as we pass volname(snap) to the brick_op_phase module, which tries to look for the snap volume amongst regular volumes, and obviously doesn't find it and fail. Well as snapshot volumes are read only volume, and will not have tiering daemon acting upon them, there is really no need to pause tiereing while taking clone of snapshot volumes. Hence removing the code to pause and resume tiering during clone create. Change-Id: I2266aba589a830a13a806c0d8a56fd8855143ccd BUG: 1279327 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/12548 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>