summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* protocol/server: Implementation of compound fopv3.9devAnuradha Talur2016-05-0110-246/+3339
| | | | | | | | | | | Change-Id: I981258afa527337dd2ad33eecba7fc8084238e6d BUG: 1303829 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/14137 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>
* WORM/Retention Translator: Implementation of file level WORMkarthik-us2016-05-018-41/+1098
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To activate the file level worm feature, the features.read-only and features.worm options should be switched "off" on the volume and the features.worm-file-level should be switched "on". Both read-only and worm or worm-file-level cannot be switched "on" together. The files which are created when the worm-file-level option is set on the volume will have their own retention profile. If both worm and worm-file-level are "on" at that time the worm which is the volume level worm will have priority over file level worm. If worm-file level is switched "off" after some time and the read-only option is switched "on" then read-only will have priority. The current implementation allows the users to manually transmit a file to a WORM-Retained state by removing all the write bits of the file using the chmod command. The file will have a retention profile which contains the state of the file, mode of retention, and the default retention time. The file will be made WORM-Retained for a default of 120 seconds during which it will be immutable and undeletable and it sets the atime of the file to the time till which it is retained. After that period if any fop request comes for that file, will make the transition from WORM-Retained state to WORM state, where the file will be immutable but deletable and, it will reset the atime to the actual atime of the file. If a WORM file needs to be made undeletable again, it can be done by using the chmod command with all the write bits removed. There are two modes of retention: 1. Relax: where the retention time of a WORM-Retained file can be increased or decreased. 2. Enterprise: where the retention time of a WORM-Retained file can be increased but not be decreased. Whenever a utime change(touch -a, -t, ...)request comes for a file it checks the mode of retention before setting the utimes. This is done only if the file is WORM-Retained but for a WORM file it will change the utimes. Lazy auto commit: Whenever a file gets created it will store the creation time of the file or if a file already exists then any of the next unlink, link, truncate or rename fops will set the current time as the start time in an xattr. The next rename/unlink/truncate/link call will check for the auto commit period and if is is expired, then it will automatically do the state transition. If it is a normal file then it gets converted to WORM-Retained state. If it is a WORM-Retained file and its retention period is expired, then it gets converted to WORM state. Added the volume set options for the WORM translator. It allows the users to change the default values of auto-commit-period, default-retention-period, retention-mode. To make use of the file-level WORM first we have to set the 'worm-file' option to 'on'. The files which are created when the worm-file option is set on the volume will get WORM-Retained. Other files will work as usual and will not be WORMed. The auto-commit-period, retention-mode, and the default-retention-period values for the file will be set to the values which are set on the volume when the file is created. Added the tests to check the basic functionalities of the WORM/Retention feature. Change-Id: I77bd9777f9395a944d76b5cc35a5b48a3c14d148 BUG: 1326308 Signed-off-by: karthik-us <ksubrahm@redhat.com> Reviewed-on: http://review.gluster.org/13429 Reviewed-by: Niels de Vos <ndevos@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>
* dht/rebalance: add lock migration fop to dht_migrate_fileSusant Palai2016-05-012-63/+112
| | | | | | | | | | | Change-Id: Id0e7400c8ae950c90d42a3ddf8b558a14959a1f8 BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14074 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>
* cluster/dht: handle EREMOTE in dht lk/flushSusant Palai2016-05-013-7/+125
| | | | | | | | | | | | | | | | With lock-migration, we need to send requests to destination brick post migration. Once, the source brick marks the lock structure to be already migrated, the requests will be redirected to destination brick by dht_lk2/flush2. Change-Id: I50b14011c5ab68c34826fb7ba7f8c8d42a68ad97 BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/13493 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>
* glusterd: volume set changes for lock migrationSusant Palai2016-05-014-3/+118
| | | | | | | | | | | Change-Id: I48c6f9cdda47503615ba65882acd5eedf0a70c89 BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14024 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>
* posix/lock: add setactivelk () fopSusant Palai2016-05-011-0/+119
| | | | | | | | | | | Change-Id: Ic7ad7362ac0e8bb0f8861698767c9ab7da539403 BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14014 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>
* protocol: add setactivelk () fopSusant Palai2016-05-0110-2/+413
| | | | | | | | | | | Change-Id: I60fe2d59c454095febce4c0fbef87a2dad9636e4 BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14013 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>
* io-threads: add setactivelk () fopSusant Palai2016-05-011-0/+1
| | | | | | | | | | | Change-Id: I74225a39348f6bb2fbdd1513676a70019227e45f BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14012 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>
* core: add setactivelk () fopSusant Palai2016-05-0114-1/+196
| | | | | | | | | | | Change-Id: Ic2ba77a1fdd27801a6e579e04e6c0dd93cd7127b BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14011 Reviewed-by: Niels de Vos <ndevos@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>
* posix/lock: add getactivelk () fopSusant Palai2016-05-013-0/+123
| | | | | | | | | | | Change-Id: I99e41a80854d6f90572df755e14757099ae1236f BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/13995 Reviewed-by: Niels de Vos <ndevos@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>
* protocol: add getactivelk () fopSusant Palai2016-05-0111-2/+436
| | | | | | | | | | | Change-Id: Ie38198db990f133fe163ba160cdf647e34f83f4f BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/13994 Reviewed-by: Niels de Vos <ndevos@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>
* io-threads: add getactivelk () fopSusant Palai2016-05-011-0/+1
| | | | | | | | | | | Change-Id: Iaef97ea02dfc54e1a0f23ab972f58b0687b4709c BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/13993 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>
* core: add getactivelk () fopSusant Palai2016-05-0115-0/+258
| | | | | | | | | | | Change-Id: Ifd0ff278dcf43da064021f5c25e5dcd34347fcde BUG: 1326085 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/13970 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>
* quota: mark tests/basic/quota.t as bad_testSusant Palai2016-05-011-0/+1
| | | | | | | | | | | | | | | | tests/basic/quota.t regularly leaves a core behind. Some of the failed tests: * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16439/consoleFull * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16440/console Change-Id: Iacf42c40f768dd2939994bbb87cc7ef366ee495f BUG: 1332045 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14136 Reviewed-by: Niels de Vos <ndevos@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>
* quota: mark inode-quota-enforcing.t as bad_testSusant Palai2016-05-011-0/+2
| | | | | | | | | | | | | | | | | | tests/basic/inode-quota-enforcing.t regularly leaves a core behind. Some of the failed tests: * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16387/console * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16390/console Change-Id: I6c9c8f3503f033a3a10d585efa2de13caf4ac610 BUG: 1332021 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14135 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@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>
* quota: mark quota-ancestry-building.t as bad_testSusant Palai2016-05-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | tests/basic/quota-ancestry-building.t regularly fails like this: ./tests/basic/quota-ancestry-building.t (Wstat: 0 Tests: 34 Failed: 6) Failed tests: 14-19 Files=1, Tests=34, 43 wallclock secs ( 0.05 usr 0.01 sys + 2.28 cusr 2.91 csys = 5.25 CPU) Result: FAIL ./tests/basic/quota-ancestry-building.t: 2 new core files End of test ./tests/basic/quota-ancestry-building.t Some of the failed tests: * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16385/console * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16386/console Change-Id: Ibbae908b4f752e195e7a7bdd10b102d7bcec312b BUG: 1332020 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14134 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>
* disperse: mark bug-1304988.t as bad_testSusant Palai2016-05-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tests/bugs/disperse/bug-1304988.t regularly fails like this: [07:25:34] Running tests in file ./tests/bugs/disperse/bug-1304988.t tar: Removing leading `/' from member names ./tests/bugs/disperse/bug-1304988.t .. 1..9 ok 1, LINENUM:19 ok 2, LINENUM:20 ok 3, LINENUM:21 ok 4, LINENUM:22 ok 5, LINENUM:23 ok 6, LINENUM:24 Started rename 26042 ok 7, LINENUM:33 ok 8, LINENUM:34 not ok 9 Got "in progress ::" instead of "completed", LINENUM:37 FAILED COMMAND: completed rebalance_status_field patchy rebalance done... Failed 1/9 subtests Test Summary Report ------------------- ./tests/bugs/disperse/bug-1304988.t (Wstat: 0 Tests: 9 Failed: 1) Failed test: 9 Files=1, Tests=9, 374 wallclock secs ( 0.02 usr 0.00 sys + 34.12 cusr 15.33 csys = 49.47 CPU) Result: FAIL End of test ./tests/bugs/disperse/bug-1304988.t Some of the failed tests: * https://build.gluster.org/job/rackspace-regression-2GB-triggered/20261/console * https://build.gluster.org/job/rackspace-regression-2GB-triggered/20262/console * https://build.gluster.org/job/rackspace-regression-2GB-triggered/20263/console Change-Id: I0350a720f57f536d283c088e040680bbbe9f8f34 BUG: 1332022 Signed-off-by: Susant Palai <spalai@redhat.com> Reviewed-on: http://review.gluster.org/14133 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>
* tests: Add test cases for add/replace brick with granular entry shKrutika Dhananjay2016-05-012-0/+155
| | | | | | | | | | | | | | Most of the tests borrowed from Anuradha's original replace-brick and add-brick tests under tests/basic/afr/. Change-Id: I874c04a6af3223e07aa6099b818ff502b6ba2a15 BUG: 1269461 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14130 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> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* protocol/client : Implementation of compound fopAnuradha Talur2016-04-308-4/+1852
| | | | | | | | | | | Change-Id: Iade71daf3bc70e60833d693ac55151c9cf691381 BUG: 1303829 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/14114 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>
* protocol/client : Refactoring functionsAnuradha Talur2016-04-306-1146/+3040
| | | | | | | | | | | | | | | | | These changes are made to accommodate compound fops. The new functions that are added pack the arguments required to perform the fops. These will be used both by normal fops and compound ones. Change-Id: I44d9cef8ff1d33aa2f5661689c8e9386d87b2007 BUG: 1303829 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/13963 Tested-by: Pranith Kumar Karampuri <pkarampu@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: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tier/migrator: Fetch the next query file for the next cycleJoseph Fernandes2016-04-302-0/+25
| | | | | | | | | | | | | | | | | | | | | | | Problem: When we spawn promote and demote thread, query files are build. And only query file with index 0 is picked for migration as the first query file. This may not be suitable for scenarios, where the file in the query are too big to move in the first cycle, as a result file in the other query files always get missed. We need to shuffle so that other query files also get a chance. Fix: Remember the previous first query file and shift it by one index, before the migration starts. Change-Id: I704947bcf4bab6b20b1179a6d9ae4a15a3d51bd9 BUG: 1330353 Signed-off-by: Joseph Fernandes <josferna@redhat.com> Reviewed-on: http://review.gluster.org/14068 Tested-by: Joseph Fernandes Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com> Tested-by: Dan Lambright <dlambrig@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* afr/index: changes for granular entry self-healRavishankar N2016-04-305-205/+610
| | | | | | | | | | | | | | | | Implements new indices type ENTRY_CHANGES where other xlators can add/delete names. Change-Id: I01c5568997085e11d22ba36a4376c70b78fb3827 BUG: 1269461 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/12482 Tested-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@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: Pranith Kumar Karampuri <pkarampu@redhat.com>
* Leases: Add a server side xlator to handle lease requestsPoornima G2016-04-2912-4/+2895
| | | | | | | | | | | | | | | | | Before this patch, there was an effort to implement leases in upcall xlator, these patches by Soumya and me can be found @ http://review.gluster.org/#/c/10084/ Change-Id: I926728c7ec690727a8971039b240655882d02059 BUG: 1319992 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/11643 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> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* Protocol: Add lease fopPoornima G2016-04-2912-14/+416
| | | | | | | | | | | | Change-Id: I64c361d3e4ae86d57dc18bb887758d044c861237 BUG: 1319992 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/11597 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: Pranith Kumar Karampuri <pkarampu@redhat.com>
* geo-rep: Fix gluster binary invocation while running as cronAravinda VK2016-04-294-9/+31
| | | | | | | | | | | | | | | When scheduler script was executed as cron, it was unable to detect the Gluster binaries. BUG: 1331658 Change-Id: Ic9c533586ed9a472765f69aa2f87d004c46d4340 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/14111 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* libglusterfs : packing functions for compound fopsAnuradha Talur2016-04-292-1/+74
| | | | | | | | | | | | | | Any xlator that wants to compound fops together can use these apis to get the job done. Change-Id: Ic40fceafecafe70173fd469060e834314826a92c BUG: 1303829 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/13694 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> 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>
* rpc: added structures to support compound fopsAnuradha Talur2016-04-291-0/+119
| | | | | | | | | | | | | Change-Id: Ida81e7b3145fb09afa37353244ff8721a4dc4c6a BUG: 1303829 Signed-off-by: Anuradha Talur <atalur@redhat.com> [ndevos: move definitions around to align with changes for bug 1328502] Reviewed-on: http://review.gluster.org/13331 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Entry self-heal performance enhancementsKrutika Dhananjay2016-04-2911-48/+417
| | | | | | | | | | | Change-Id: I52da41dff5619492b656c2217f4716a6cdadebe0 BUG: 1269461 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/12442 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> 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>
* glusterd: persist brickinfo->real_pathAtin Mukherjee2016-04-293-25/+39
| | | | | | | | | | | | | | | | | Since real_path was not persisted and gets constructed at every glusterd restart, glusterd will fail to come up if one of the brick's underlying file system is crashed. Solution is to construct real_path only once and get it persisted. Change-Id: I97abc30372c1ffbbb2d43b716d7af09172147b47 BUG: 1330481 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14075 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* dht/afr/client/posix: Fail mkdir without gfid-reqPranith Kumar K2016-04-296-10/+52
| | | | | | | | | | | | | | | Do not allow directory creations without gfids as after the directories are created, operations on them fail anyway. So it is better to fail mkdir. BUG: 1317361 Change-Id: I8f8e3b38bbded1960b7215bac0432500f7e78038 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13690 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* socket: Reap own-threadsKaushal M2016-04-292-0/+122
| | | | | | | | | | | | | | | | Dead own-threads are reaped periodically (currently every minute). This helps avoid memory being leaked, and should help prevent memory starvation issues with GlusterD. Change-Id: Ifb3442a91891b164655bb2aa72210b13cee31599 BUG: 1331289 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/14101 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: Jeff Darcy <jdarcy@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* glusterfsd: fix to return actual exit status on mount processPrasanna Kumar Kalever2016-04-291-5/+8
| | | | | | | | | | | | | | | | | | | | | | Problem: Currently, we always exit mount process with the pid as the exit number which is return value of the waitpid(), it is not the exit value of the child process Solution: Extract the actual exit code/status in case if the child terminated normally, that is, by calling exit(3) or _exit(2), or by returning from main() Change-Id: Iefec6e27b5a5a98a22f016e49967978853662e37 BUG: 1331042 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/14094 Tested-by: Prasanna Kumar Kalever <pkalever@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: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* quota/glusterd: enhance quota enable and disable processvmallika2016-04-299-43/+399
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously quota crawl was done from the single mount point, this is very slow process if there are huge number of files exists in the volume This RFE will now spawn crawl process for each brick in the volume, and files are looked in parallel independently for each brick. This improves the speed of crawling process for entire files-system This patch also fixes below problem * Previously, mountdir was created under '/tmp'. If someone tries to cleanup '/tmp'/ directory then it is very dangerous that we loose volume data So create a mount point under /var/run/gluster/tmp instead * Previously, file-system crawl is performed from all the nodes, which is a redundant operation and performance will degrade The problem is fixed with this patch Change-Id: Icabedeb44182139ace9c8106793803122388cab8 BUG: 1290766 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/12952 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: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: fix max pmap alloc to GF_PORT_MAXPrasanna Kumar Kalever2016-04-281-5/+5
| | | | | | | | | | | | | | This patch also mops the port max i.e 65535 hard coding Change-Id: Ia93656d75ceb4c6c4849f9e0ad1b260d5952d4c6 BUG: 1331253 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/14096 Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* rpc: split FOPs enum from glusterfs.hNiels de Vos2016-04-2814-205/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | Moving the enumeration of FOPs and some of the other parts that are defining the network protocol to the rpc/xdr/ section. These structures need some care when modifications are made, moving them out of the common glusterfs.h header helps with that. The protocol definition structures are generated in a new glusterfs-fops header. This file is present in rpc/xdr/src/ and libglusterfs/src/, it is a little ugly, but prevents the need to update all Makefile.am files with the additional -I option for finding the new header file. The generation of the .c and .h files from the .x descriptions needed small modifications to accommodate these changes. The build/xdrgen script was improved slightly for this. The .c and .h files are incorrectly in the $(top_srcdir), instead of $(top_builddir). This is an existing issue, and bug 1330604 has been filed to get that addressed. Change-Id: I98fc8cf7e4b631082c7b203b5a0a77111bec1fb9 BUG: 1328502 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14032 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: Jeff Darcy <jdarcy@redhat.com>
* protocol/client: Use loc->pargfid if loc->parent(->gfid) is not filledKrutika Dhananjay2016-04-281-8/+6
| | | | | | | | | | | Change-Id: Id73bf635ca94dcf7518b33e529ffca07daeeb1f4 BUG: 1269461 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14078 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> 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>
* glusterd: default value of nfs.disable, change from false to trueKaleb S KEITHLEY2016-04-281-6/+11
| | | | | | | | | | | | | revert gf_msg -> gf_msg_plain change, i.e. restore gf_msg() Change-Id: Ibdf9906c8a4bf92ba0969a08bb5a5c01dfd74680 BUG: 1092414 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14105 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> 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>
* gfapi: fill iatt in readdirp_cbk if entry->inode is nullMohammed Rafi KC2016-04-283-0/+56
| | | | | | | | | | | | | | | If any of dirent have inode as null in readdirp_cbk, which indicates that the stat information is not valid. So for such entries, we send explicit lookup to fill the stat information. Change-Id: I0604bce34583db0bb04b5aae8933766201c6ddad BUG: 1330567 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/14079 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: Niels de Vos <ndevos@redhat.com>
* build: remove unneeded include <sys/user.h> for FreeBSDNiels de Vos2016-04-281-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The include <sys/user.h> causes a conflicting definition of an RPC 'struct pmap': --- fuse-helpers.lo --- In file included from /usr/include/rpc/rpc.h:73:0, from ../../../../libglusterfs/src/glusterfs-fops.h:35, from /usr/home/jenkins/root/workspace/freebsd-smoke/libglusterfs/src/glusterfs.h:32, from /usr/home/jenkins/root/workspace/freebsd-smoke/xlators/mount/fuse/src/fuse-bridge.h:22, from /usr/home/jenkins/root/workspace/freebsd-smoke/xlators/mount/fuse/src/fuse-helpers.c:26: /usr/include/rpc/pmap_prot.h:89:8: error: redefinition of 'struct pmap' struct pmap { ^ In file included from /usr/include/vm/pmap.h:90:0, from /usr/include/sys/user.h:52, from /usr/home/jenkins/root/workspace/freebsd-smoke/xlators/mount/fuse/src/fuse-helpers.c:19: /usr/include/machine/pmap.h:299:8: note: originally defined here struct pmap { ^ It seems that building on FreeBSD still functions without any additional warnings or errors, even when the include is removed. Change-id I98fc8cf7e4b631082c7b203b5a0a77111bec1fb9 identified this issue, and this build-fix is needed for applying I98fc8cf7. BUG: 1198849 Change-Id: Ib8241b7dc47eb2c3593d2f8ea1d196178e63d02d Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14093 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: Jeff Darcy <jdarcy@redhat.com>
* common-ha: continuous grace_mon log messages in /var/log/messagesKaleb S KEITHLEY2016-04-284-33/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | messages are seen on RHEL6.x and RHEL7.1 and earlier versions of pacemaker. (And RHEL7.2 with RHEL7.1 pacemaker packages.) It's not possible to query attrd attributes in the older version, only set/update/clear them. The messages come from invalid attempts to query the attributes. However it is possible to query crm attributes. The fix here is to create a "shadow" crm attribute for the attrd attribute. Changes are made to both, queries are made on the crm attribute. (Resource Agents "follow" the attrd attribute using constraint locations, so we must keep the attrd attribute.) Change-Id: I84ac1a80673e528d98b67b7d5062e21dcf744d4a BUG: 1324509 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/13919 Reviewed-by: Niels de Vos <ndevos@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> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com>
* glusterd: try to connect on GF_PMAP_PORT_FOREIGN aswellPrasanna Kumar Kalever2016-04-272-8/+11
| | | | | | | | | | | | | | | | | | | | | | | This patch fix couple of things mentioned below: 1. previously we use to try to connect on only GF_PMAP_PORT_FREE in the pmap_registry_alloc(), it could happen that some foreign process would have freed the port by this time ?, hence it is worth giving a try on GF_PMAP_PORT_FOREIGN ports as well instead of wasting them all. 2. fix pmap_registry_remove() to mark the port asGF_PMAP_PORT_FREE 3. added useful comments on gf_pmap_port_type enum members Change-Id: Id2aa7ad55e76ae3fdece21bed15792525ae33fe1 BUG: 1322805 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/14080 Tested-by: Prasanna Kumar Kalever <pkalever@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: Atin Mukherjee <amukherj@redhat.com>
* Swap order of GF_EVENT_SOME_CHILD_DOWN enumRavishankar N2016-04-271-1/+1
| | | | | | | | | | | | | | | | GF_EVENT_SOME_CHILD_DOWN value seems to be mismatching between master and 3.7. Fix the master since 3.7 is a release branch and GF_EVENT_SOME_CHILD_DOWN was added newly and hence should be in the end in the enum list. Signed-off-by: Ravishankar N <ravishankar@redhat.com> Change-Id: I1f758550d6300f6750d1574302096d8e7f493549 BUG: 1330974 Reviewed-on: http://review.gluster.org/14092 Tested-by: Ravishankar N <ravishankar@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* features/trash: wind mkdir with special pidAnoop C S2016-04-274-16/+48
| | | | | | | | | | | | | | | | | | | | | | | Recent changes done w.r.t handling of mkdir calls in posix translator resulted in crashing the brick process from trash translator. This was due to the changes made in posix translator to return EPERM for every mkdir calls without 'gfid-req' set in dictionary. In order to avoid gfid mismatches during directory creation from brick side trash translator does not set 'gfid-req'. This patch is to have an exemption for trash based on a special pid set for those mkdir calls originating from trash translator and to reset it in callback. This patch also includes a small optimization to the existing test case for trash feature. Change-Id: I59f084ac875e54342ecf2bffa6e43ebd84814153 BUG: 1317361 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: http://review.gluster.org/13776 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>
* libglusterfs: Add debug and trace logs for stack traceRaghavendra Talur2016-04-273-8/+54
| | | | | | | | | | | | | | | | | It has become very difficult to identify the xlator which returned negative op_ret. Being able to just change the log level and visualize the stack is helpful in such cases. Change-Id: I6545b4802c1ab4d0d230d5e9e036afb2384882e1 BUG: 1330052 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13448 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/afr: Do not fsync when durability is offPranith Kumar K2016-04-272-0/+47
| | | | | | | | | | | | BUG: 1329501 Change-Id: Id402c20f2fa19b22bc402295e03e7a0ea96b0c40 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14048 Reviewed-by: Ravishankar N <ravishankar@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>
* rpc: fix gf_process_reserved_portsPrasanna Kumar Kalever2016-04-273-15/+13
| | | | | | | | | | | | | | | this patch also does minor code cleanups. Change-Id: I0d005bd0f9baaaae498aa1df4faa6fcb65fa7a6e BUG: 1198849 Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Reviewed-on: http://review.gluster.org/13997 Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* packaging: %postun libs ldconfig: relative path `1' used to build cacheKaleb S KEITHLEY2016-04-271-3/+7
| | | | | | | | | | | | | | | | | %postun libs isn't 'closed' by the following %postun server on RHEL6 due to the %ifdef...%endif But -server has /usr/lib*/libgfdb.so.x, so we should be running /sbin/ldconfig! Which conveniently fixes the closing issue. Change-Id: Icc365eefc5453c40e02b59288a4e8023b82baa7b BUG: 1330583 Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/14081 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>
* gfapi: set need_lookup flag on response listMohammed Rafi KC2016-04-271-1/+1
| | | | | | | | | | | | | | | | | | | We set need_lookup flag for entries returned by readdirp to force lookup. Currently we are setting on the previously stored list, rather than response list returned by readdirp. This patch will iterate over current list returned by readdirp and will set need_lookup flag. Change-Id: Ibd6fcbc188f4c87f40ece7a9dcda27645401c240 BUG: 1330476 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/14073 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* Rename enum _gf_client_pid to _gf_special_pidAnoop C S2016-04-272-5/+4
| | | | | | | | | | | | | | | | | | Till now _gf_client_pid enum has been used to define special PIDs used by glusterfs clients like shd, quotad etc. In order to have this enum capable of holding all other special PIDs including the one used by trash translator, _gf_client_pid is being renamed to _gf_special_pid. Change-Id: Id123127771f18aa55d39f335801a54810848d7bc BUG: 1330616 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: http://review.gluster.org/14083 Reviewed-by: Joseph Fernandes Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> 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>
* snapshot: svc_stat collides with define from /usr/include/rpc/svc.hNiels de Vos2016-04-272-203/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Compiling fails with this error: snapview-client.c:559:24: error: macro "svc_stat" passed 4 arguments, but takes just 1 dict_t *xdata) ^ snapview-client.c:560:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token { ^ snapview-client.c:2412:26: error: ‘svc_stat’ undeclared here (not in a function) .stat = svc_stat, ^ svc_* is the common prefix for (SUN)RPC functions provided by system headers. svc_stat() seems to be an existing function name. This happens because change-id I98fc8cf7e4b631082c7b203b5a0a77111bec1fb9 causes <rpc/rpc.h> included through "glusterfs.h". Prepending gf_ for all svc_* functions works around the symbol collision. Change-Id: Idc86b719c48675a5154c54d844c1899d14d46e2a BUG: 1328502 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14035 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>