summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* doc: Release notes for 3.13.1v3.13.1ShyamsundarR2017-12-201-0/+29
| | | | | | Change-Id: I8398627b87dd08f1bfaa8f11dfb8f20889c9ec6d BUG: 1523780 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* write-behind: Allow trickling-writes to be configurableCsaba Henk2017-12-202-1/+15
| | | | | | | | | | | | | | This is the undisputed/trivial part of Shreyas' patch he attached to https://bugzilla.redhat.com/1364740 (of which the current bug is a clone). We need more evaluation for the page_size and window_size bits before taking them on. Change-Id: Iaa0b9a69d35e522b77a52a09acef47460e8ae3e9 BUG: 1428060 Co-authored-by: Shreyas Siravara <sshreyas@fb.com> Signed-off-by: Csaba Henk <csaba@redhat.com>
* rpc-transport/rdma: Add a mutex for the list of RDMA Memory Region(MR) accessYi Wang2017-12-202-38/+72
| | | | | | | | | | | | | | | | | | | | Problem: gf_rdma_device_t->all_mr is a __gf_rdma_arena_mr(includes MR content) kind of list in the rdma rpc-transport. The rdma rpc-transport will add/delete items to the list when MRs register, deregister, and free. Because gf_rdma_device_t->all_mr is used by different threads and it is not mutex protected, rdma transport maybe access obsolete items in it. Solution: Add a mutex protection for the gf_rdma_device_t->all_mr. > Change-Id: I2b7de0f7aa516b90bb6f3c6aae3aadd23b243900 > BUG: 1522651 > Signed-off-by: Yi Wang <wangyi@storswift.com> (cherry picked from commit 8483ed87165c1695b513e223549d33d2d63891d9) Signed-off-by: Yi Wang <wangyi@storswift.com> Change-Id: I2b7de0f7aa516b90bb6f3c6aae3aadd23b243900 BUG: 1527699
* feature/bitrot: remove internal xattrs from lookup cbkRavishankar N2017-12-192-7/+21
| | | | | | | | | | | | | | | | | | | | | | Problem: afr requests all xattrs in lookup via the list-xattr key. If bitrot is enabled and later disabled, or if the bitrot xattrs were present due to an older version of bitrot which used to create the xattrs without enabling the feature, the xattrs (trusted.bit-rot.version in particular) was not getting filtered and ended up reaching the client stack. AFR, on noticing different values of the xattr across bricks of the replica, started triggering spurious metadata heals. Fix: Filter all internal xattrs in bitrot xlator before unwinding lookup, (f)getxattr. Thanks to Kotresh for the help in RCA'ing. Change-Id: I5bc70e4b901359c3daefc67b8e4fa6ddb47f046c BUG: 1527275 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit d341f20230b9921391aff22337eaf9be82f44d88)
* core/memacct: save allocs in mem_acct_rec listN Balachandran2017-12-114-1/+61
| | | | | | | | | | | | | | | | | | | | With configure --enable-debug, add all object allocations to a list in the corresponding mem_acct_rec. This allows us to see all objects of a particular type and allows for additional debugging in case of memory leaks. This is not compiled in by default and must be explicitly enabled. It is intended to be used by developers. > Change-Id: I7cf2dbeadecf994423d7e7591e85f18d2575cce8 > BUG: 1522662 > Signed-off-by: N Balachandran <nbalacha@redhat.com> (cherry picked from commit 47d01546a1826dc14a8331ea8700015f1cfdc4db) Change-Id: I7cf2dbeadecf994423d7e7591e85f18d2575cce8 BUG: 1523456 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* cluster/dht: don't overfill the buffer in readdir(p)Raghavendra G2017-12-111-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | Superflous dentries that cannot be fit in the buffer size provided by kernel are thrown away by fuse-bridge. This means, * the next readdir(p) seen by readdir-ahead would have an offset of a dentry returned in a previous readdir(p) response. When readdir-ahead detects non-monotonic offset it turns itself off which can result in poor readdir performance. * readdirp can be cpu-intensive on brick and there is no point to read all those dentries just to be thrown away by fuse-bridge. So, the best strategy would be to fill the buffer optimally - neither overfill nor underfill. >Change-Id: Idb3d85dd4c08fdc4526b2df801d49e69e439ba84 >BUG: 1492625 >Signed-off-by: Raghavendra G <rgowdapp@redhat.com> (cherry picked from commit e785faead91f74dce7c832848f2e8f3f43bd0be5) Change-Id: Idb3d85dd4c08fdc4526b2df801d49e69e439ba84 BUG: 1522710 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/dht: make rebalance use truncate incaseSusant Palai2017-12-113-71/+99
| | | | | | | | | | | | | .. the brick file system does not support fallocate. > Change-Id: Id76cda2d8bb3b223b779e5e7a34f17c8bfa6283c > BUG: 1488103 > Signed-off-by: Susant Palai <spalai@redhat.com> Change-Id: Id76cda2d8bb3b223b779e5e7a34f17c8bfa6283c BUG: 1520232 Signed-off-by: Susant Palai <spalai@redhat.com>
* glusterd: Free up svc->conn on volume deleteAtin Mukherjee2017-12-071-0/+5
| | | | | | | | | | | | | Daemons like snapd, tierd and gfproxyd are maintained on per volume basis and on a volume delete we should destroy the rpc connection established for them. >mainline patch : https://review.gluster.org/#/c/18957/ Change-Id: Id1440e39da07b990fdb9b207df18da04b1ca8014 BUG: 1523046 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 36ce4c614a3391043a3417aa061d0aa16e60b2d3)
* doc: Added final release notes for 3.13.0v3.13.0ShyamsundarR2017-12-011-84/+242
| | | | | | Change-Id: I1f2d42f6c24ba55414888bcaf938a905e34ecb4d BUG: 1510012 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* posix: Change GD_OP_VERSION to 3_13_0 from 3_12_0 for storage.reserveMohit Agrawal2017-12-011-1/+1
| | | | | | | | | | | Problem: Change GD_OP_VERSION to 3_13_0 from 3_12_0 for option storage.reserve Solution: Actually feature was merged in 3.13.0 branch so GD_OP_VERSION needs to change from 3_12_0 to 3_13_0 BUG: 1518512 Change-Id: I6f753978fd607919efcc60f73c37feaadc4f32ef Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* release-notes: add details for max-port rangeAtin Mukherjee2017-11-301-0/+6
| | | | | | Change-Id: I9801706f67332d6079e8ec58f9e08b332b35804a BUG: 1510012 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* release-notes: Add release notes for DISCARD FOP on ECSunil Kumar Acharya2017-11-301-0/+7
| | | | | | BUG: 1518744 Change-Id: Id7508eee3c0891d6e03cc2805facdc682a31f53d Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
* Disable gfid2path by default on NetBSDEmmanuel Dreyfus2017-11-301-0/+11
| | | | | | | | | | | | | | | NetBSD storage of extended attributes for UFS1 badly scales when the list of extended attributes names rises. gfid2path can add as many extended attributes names as we have files, hence we keep it disabled for performance sake. > Change-Id: Id77b5f5ceb4d5eba1b3362b4b9fc693450ffbc2b > Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> > BUG: 1129939 Change-Id: I17c12251d80dbb41b7d4864d5739d1ad3d6877a0 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> BUG: 1513259
* cluster/ec: EC DISCARD doesn't punch hole properlySunil Kumar Acharya2017-11-292-3/+13
| | | | | | | | | | | | | | | | | | Problem: DISCARD operation on EC volume was punching hole of lesser size than the specified size in some cases. Solution: EC was not handling punch hole for tail part in some cases. Updated the code to handle it appropriately. >BUG: 1516206 >Change-Id: If3e69e417c3e5034afee04e78f5f78855e65f932 >Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com> BUG: 1518257 Change-Id: If3e69e417c3e5034afee04e78f5f78855e65f932 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
* features/locks: Fix memory leaksXavier Hernandez2017-11-285-5/+11
| | | | | | | | | Backport of: > BUG: 1515161 Change-Id: Ic1d2e17a7d14389b6734d1b88bd28c0a2907bbd6 BUG: 1517692 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* cluster/afr: Fix for arbiter becoming sourcekarthik-us2017-11-274-6/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: When eager-lock is on, and two writes happen in parallel on a FD we were observing the following behaviour: - First write fails on one data brick - Since the post-op is not yet happened, the inode refresh will get both the data bricks as readable and set it in the inode context - In flight split brain check see both the data bricks as readable and allows the second write - Second write fails on the other data brick - Now the post-op happens and marks both the data bricks as bad and arbiter will become source for healing Fix: Adding one more variable called write_suvol in inode context and it will have the in memory representation of the writable subvols. Inode refresh will not update this value and its lifetime is pre-op through unlock in the afr transaction. Initially the pre-op will set this value same as read_subvol in inode context and then in the in flight split brain check we will use this value instead of read_subvol. After all the checks we will update the value of this and set the read_subvol same as this to avoid having incorrect value in that. Change-Id: I2ef6904524ab91af861d59690974bbc529ab1af3 BUG: 1516313 Signed-off-by: karthik-us <ksubrahm@redhat.com> (cherry picked from commit 19f9bcff4aada589d4321356c2670ed283f02c03)
* cluster/afr: Print heal info summary output in stream fashionkarthik-us2017-11-271-0/+1
| | | | | | | | | | | | | | | Problem: The heal info summary was printing the output at the end after crawling for pending heal entries completes on all the bricks. Fix: Printing the output immediately after the crawl on individual brick completes, so that it won't give the impression of CLI being hung. Change-Id: Ieaf5718736a7ee6837bac02bd30a95836e605dab BUG: 1514419 Signed-off-by: karthik-us <ksubrahm@redhat.com> (cherry picked from commit 77e3bc671aab2fda68ada53f38ec368b20675f59)
* doc: Added initial version of the release notes for 3.13.0v3.13.0rc0ShyamsundarR2017-11-221-0/+251
| | | | | | | | | | Change-Id: I1b6600cd519578faffe2f67ac0ee3e2555c3cb31 BUG: 1510012 Signed-off-by: ShyamsundarR <srangana@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: karthik-us <ksubrahm@redhat.com> [ndevos: added "memory pool in statedump" and "glfs_mem_header" notes] [ksubrahm: added notes for "Addition of summary option to heal info"]
* features/worm: new config option to manage deletion of Worm files.Vishal Pandey2017-11-225-1/+28
| | | | | | | | | | | | | | | | | | | | Add a new configuration option worm-files-deletable to file-level Worm in order to control behaviour of Worm files upon deletion. Steps to Test: 1. Add all the configuration options to a volume to activate file-level-worm 2. Option features.worm-files-deletable is set to 1 by default. 3. Create a new file and wait for the retention time to expire. 4. After retention time expires, do an truncate, rename, unlink, link or write to send the file in Worm state. 5. After that do `rm -f filename`. 6. The file is successfully removed. 7. Repeat from step 2 by setting features.worm-files-deletable 0. This time deletion should not be successful. Change-Id: Ibc89861ee296e065330b93a9f9606be5da40af31 BUG: 1508898 Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
* afr: add checks for allowing lookupsRavishankar N2017-11-216-116/+164
| | | | | | | | | | | | | | | | | | | | | | | Problem: In an arbiter volume, lookup was being served from one of the sink bricks (source brick was down). shard uses the iatt values from lookup cbk to calculate the size and block count, which in this case were incorrect values. shard_local_t->last_block was thus initialised to -1, resulting in an infinite while loop in shard_common_resolve_shards(). Fix: Use client quorum logic to allow or fail the lookups from afr if there are no readable subvolumes. So in replica-3 or arbiter vols, if there is no good copy or if quorum is not met, fail lookup with ENOTCONN. With this fix, we are also removing support for quorum-reads xlator option. So if quorum is not met, neither read nor write txns are allowed and we fail the fop with ENOTCONN. Change-Id: Ic65c00c24f77ece007328b421494eee62a505fa0 BUG: 1515572 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit bd44d59741bb8c0f5d7a62c5b1094179dd0ce8a4)
* cluster/dht: Don't set ACLs on linkto fileN Balachandran2017-11-211-0/+11
| | | | | | | | | | | | | | | | The trusted.SGI_ACL_FILE appears to set posix ACLs on the linkto file that is a target of file migration. This can mess up file permissions and cause linkto identification to fail. Now we remove all ACL xattrs from the results of the listxattr call on the source before setting them on the target. > BUG: 1514329 > Signed-off-by: N Balachandran <nbalacha@redhat.com> Change-Id: I56802dbaed783a16e3fb90f59f4ce849f8a4a9b4 BUG: 1515045 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* cluster/afr: Print heal info split-brain output in stream fashionkarthik-us2017-11-171-0/+3
| | | | | | | | | | | | | | | | | Problem: When we trigger the heal info split-brain command the o/p is not streamed as it is received, but dumped at the end for all the bricks together. This gives a perception that the command is hung. Fix: When we get a split brain entry while crawling throught the pending heal entries, flush that immediately so that it prints the output in a stream fashion and doesn't look like the cli is hung. Change-Id: I7547e86b83202d66616749b8b31d4d0dff0abf07 BUG: 1514419 Signed-off-by: karthik-us <ksubrahm@redhat.com> (cherry picked from commit 05f9c13f4d69e4113f5a851f4097ef35ba3f33b2)
* cluster/ec: Fix op-version for disperse.other-eager-lockXavier Hernandez2017-11-162-2/+2
| | | | | | | | | | | | | The op-version used for the new option was wrong. It has been set to 3.13.0. >Change-Id: I88fbd7834e4a8018c8906303e734c251e90be8cf >BUG: 1502610 >Signed-off-by: Xavier Hernandez <jahernan@redhat.com> Change-Id: I88fbd7834e4a8018c8906303e734c251e90be8cf BUG: 1512460 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* cluster/ec: create eager-lock option for non-regular filesXavier Hernandez2017-11-168-13/+57
| | | | | | | | | | | | | A new option is added to allow independent configuration of eager locking for regular files and non-regular files. >Change-Id: I8f80e46d36d8551011132b15c0fac549b7fb1c60 >BUG: 1502610 >Signed-off-by: Xavier Hernandez <jahernan@redhat.com> Change-Id: I8f80e46d36d8551011132b15c0fac549b7fb1c60 BUG: 1512460 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* cli: gluster help changesN Balachandran2017-11-167-76/+387
| | | | | | | | | | | | | gluster cli help now shows only the top level help commands. gluster <component> help will now show help commands for <component>. > BUG: 1474768 > Signed-off-by: N Balachandran <nbalacha@redhat.com> (cherry picked from commit 89dc54f50c9f800ca4446ea8fe736e4860588845) Change-Id: I263f53a0870d80ef4cfaad455fdaa47e2ac4423b BUG: 1509789 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* tests: fix bug-1483058-replace-brick-quorum-validation.t spurious failureAtin Mukherjee2017-11-143-1/+19
| | | | | | | | | >mainline patch : https://review.gluster.org/#/c/18710/ Change-Id: I04c35305bfb663eabbf715eee78695adfd4a2d20 BUG: 1512435 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 76a83f98b78a0bdf29bbb0f8e4c9ab74dae52be4)
* glusterd: display gluster volume status, when quorum type is serverSanju Rakonde2017-11-141-0/+6
| | | | | | | | | | | | | | Problem: when server-quorum-type is server, after restarting glusterd in the node which is up, gluster volume status is giving incorrect information. Fix: check whether server is blank, before adding other keys into the dictionary. Change-Id: I926ebdffab330ccef844f23f6d6556e137914047 BUG: 1511768 Signed-off-by: Sanju Rakonde <srakonde@redhat.com> (cherry picked from commit 046c7e3199fca715592762e271e6061ac99b0c4b)
* glusterd: restart the brick if qorum status is NOT_APPLICABLE_QUORUMAtin Mukherjee2017-11-141-1/+2
| | | | | | | | | | | | | | If a volume is not having server quorum enabled and in a trusted storage pool all the glusterd instances from other peers are down, on restarting glusterd the brick start trigger doesn't happen resulting into the brick not coming up. > mainline patch : https://review.gluster.org/#/c/18669/ Change-Id: If1458e03b50a113f1653db553bb2350d11577539 BUG: 1511293 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 635c1c3691a102aa658cf1219fa41ca30dd134ba)
* cli: correct rebalance status elapsed checkN Balachandran2017-11-091-1/+5
| | | | | | | | | | | | Check that elapsed time has crossed 10 mins for at least one rebalance process before displaying the estimates. > BUG: 1479528 > Signed-off-by: N Balachandran <nbalacha@redhat.com> (cherry picked from commit 56aef68530b3bab27730aa62e4fbc513d3dba65f) Change-Id: Ib357a6f0d0125a178e94ede1e31514fdc6ce3593 BUG: 1511274 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* libglusterfs: Correct opversion to reflect 3.13ShyamsundarR2017-11-061-3/+1
| | | | | | Change-Id: I55c7be68d2aa498d7f7931eb204d678b23e4979c BUG: 1510022 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* glusterd: Changed default op-version for some optionsShyamsundarR2017-11-062-6/+6
| | | | | | | | | | As 3.13 is branched at a point that includes the features that are changed with this commit, their minimum supported op-versions should also change to 3.13. Change-Id: I7ef8eccc13a16f93939c1edbff9508d1e167c5e4 BUG: 1510019 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* core: remove experimental xlators and associated testsKaleb S. KEITHLEY2017-11-0657-6107/+2
| | | | | | | | | | | | experimental xlators removed from 3.13 > Cherry picked from 4231c40973c60999f5ef759db450d25e129ef6ba: > Reviewed-on: https://review.gluster.org/17953 > Reviewed-by: jiffin tony Thottan <jthottan@redhat.com> Signed-off-by: ShyamsundarR <srangana@redhat.com> Change-Id: I34419ce22ca09b7626b8f9382c377a614fd9fed8 BUG: 1510022
* Update rfc.sh for release-3.13v3.13.0betaShyamsundarR2017-11-011-1/+1
| | | | Signed-off-by: ShyamsundarR <srangana@redhat.com>
* xlator/tier: flood of -Wformat-truncation warnings with gcc-7.1v4.0dev1Kaleb S. KEITHLEY2017-11-011-8/+9
| | | | | | | | | | | | | | | | Starting in Fedora 26 which has gcc-7.1.x, -Wformat-trunction is enabled with -Wformat, resulting in a flood of new warnings. This many warnings is a concern because it makes it hard(er) to see other warnings that should be addressed. An example is at https://kojipkgs.fedoraproject.org//packages/glusterfs/3.12.0/1.fc28/data/logs/x86_64/build.log For more info see https://review.gluster.org/#/c/18267/ Change-Id: Id7ef8e0dedd28ada55f72c03d91facbe1c9888bd BUG: 1492849 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* nfs: Fix crash bug when mnt3_resolve_subdir_cbk() failsShreyas Siravara2017-11-011-0/+3
| | | | | | | | | | | | | | | Summary: When mnt3_resolve_subdir_cbk() fails (this can happen when racing operations), authorized_path is sometimes NULL. We try to run strlen() on this path and as a result we crash. This diff fixes that by checking if path is NULL before dereferencing it. Test Plan: Run with patch and observe that there is no crash. Prove test for auth code. BUG: 1365683 Change-Id: I2e2bdfdc61ae906788611e151d2c753b79b312df Signed-off-by: Shreyas Siravara <sshreyas@fb.com>
* cluster/ec: FORWARD_NULL coverity fixSunil Kumar Acharya2017-11-011-1/+3
| | | | | | | | | | Problem: frame could be NULL. Solution: Added check to verify frame. BUG: 789278 Change-Id: I55a64c936ae71ec8587a3f9dfa0fdee5d0ea5213 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
* cluster/ec: FORWARD_NULL coverity fixSunil Kumar Acharya2017-11-012-0/+5
| | | | | | | | | | Problem: cbk could be NULL. Solution: Assigned appropriate value to cbk. BUG: 789278 Change-Id: I2e4bba9a54f965c6a7bccf0b0cb6c5f75399f6e6 Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
* glusterd: fix brick restart parallelismAtin Mukherjee2017-11-016-32/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | glusterd's brick restart logic is not always sequential as there is atleast three different ways how the bricks are restarted. 1. through friend-sm and glusterd_spawn_daemons () 2. through friend-sm and handling volume quorum action 3. through friend handshaking when there is a mimatch on quorum on friend import. In a brick multiplexing setup, glusterd ended up trying to spawn the same brick process couple of times as almost in fraction of milliseconds two threads hit glusterd_brick_start () because of which glusterd didn't have any choice of rejecting any one of them as for both the case brick start criteria met. As a solution, it'd be better to control this madness by two different flags, one is a boolean called start_triggered which indicates a brick start has been triggered and it continues to be true till a brick dies or killed, the second is a mutex lock to ensure for a particular brick we don't end up getting into glusterd_brick_start () more than once at same point of time. Change-Id: I292f1e58d6971e111725e1baea1fe98b890b43e2 BUG: 1506513 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* cluster/ec: MISSING_BREAK coverity fixSunil Kumar Acharya2017-10-311-0/+3
| | | | | | | | | | Problem: switch case syntax issue. Solution: syntax fixed. BUG: 789278 Change-Id: I76da72c3ab6ffc5db671686a71d6a596beaf496e Signed-off-by: Sunil Kumar Acharya <sheggodu@redhat.com>
* snapshot: fix coverity issue 'DEADCODE'Sunny Kumar2017-10-311-11/+1
| | | | | | | | | | | | | | Problem : Unreachable code at glusterd-snapshot.c:6718 Unreachable code at glusterd-snapshot.c:7352 FIx : Remove unreachable code At glusterd-snapshot.c:6718 in if condition the value of "snap" must be "NULL" to call glusterd_snap_remove() which is not possible here. Change-Id: Id865bde7c1474a9b9ed11c0ed614676b4e2443c6 BUG: 789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* extras/hooks: Honour all input arguments to scriptsAnoop C S2017-10-314-28/+70
| | | | | | | | | | | | | | | | | Some of the hook scripts were not honouring the arguments with which they are invoked during various volume operations. So make sure that we consider everything while parsing the command line arguments to avoid following warnings: . . . ame: unrecognized option '--first=no' ame: unrecognized option '--version=1' ame: unrecognized option '--volume-op=start' . . . Change-Id: I5b08e5e7f32908c8509e97098a042096b507783e BUG: 1503983 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* glusterd: delete source brick only once in reset-brick commit forceAtin Mukherjee2017-10-312-1/+25
| | | | | | | | | | | While stopping the brick which is to be reset and replaced delete_brick flag was passed as true which resulted glusterd to free up to source brick before the actual operation. This results commit force to fail failing to find the source brickinfo. Change-Id: I1aa7508eff7cc9c9b5d6f5163f3bb92736d6df44 BUG: 1507466 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* Xlators/features: Coverity Issue "NEGATIVE_RETURNS" in ↵Subha sree Mohankumar2017-10-311-5/+20
| | | | | | | | | | | | | | | | worm_truncate,worm_ftruncate,worm_link,worn_unlink and worm_rename. Issue :Event negative_returns: "op_errno" is passed to a parameter that cannot be negative. Fix : In functions worm_link,worm_unlink,worm_truncate,worm_ftruncate and worm_rename, added an condition to check the whether value of "op_errno" is negative or not.If the value is negative, then it is set to EROFS. Change-Id: Ie65601b6cc9799f587cc574408281dab50a58afb BUG: 789278 Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
* snapshot/scheduler: handle the exception when SELinux is absentRishabh Dave2017-10-311-2/+7
| | | | | | | | | When SELinux is absent on an given system, snapshot_scheduler.py raises an exception; handle it and report it in the log. Change-Id: I21bc179e090d34f8061063e6d662521ee5046cce BUG: 1502253 Signed-off-by: Rishabh Dave <rishabhddave@gmail.com>
* gfapi: Register/Unregister Upcall events' callbackSoumya Koduri2017-10-3110-95/+713
| | | | | | | | | | | | | | | | | Polling continuously for upcall events is not optimal. Hence new APIs have been added to allow applications to register and unregister upcall events it is interested in along with callback function to be invoked in case of any such upcalls sent by backend server. @TODO: Make changes in upcall xlator so that events are sent to only those clients which either registered callbacks or started polling. Shall be addressed in separate patch. Updates: #315 Change-Id: I40473fd5cf689172ff2d7bb2869756b7fd5bc761 Signed-off-by: Soumya Koduri <skoduri@redhat.com>
* eventsapi: HTTPS support for WebhooksAravinda VK2017-10-313-29/+114
| | | | | | | | | | | | | | | | | First it tries to call URL with verify=True without specifying the cert path, it succeeds if a webhook is HTTP or HTTPS with CA trusted certificates(for example https://github..). If above call fails with SSL error then it tries to get the server certificate and calls URL again. If call fails with SSL error even after using the certificate, then verification will be disabled and logged in the log file. All other errors will be catched and logged as usual. BUG: 1506903 Change-Id: I86a3390ed48b75dffdc7848022af23a1e1d7f076 Signed-off-by: Aravinda VK <avishwan@redhat.com>
* glusterd: clean up portmap on brick disconnectAtin Mukherjee2017-10-314-11/+46
| | | | | | | | | | | | | | | | | | | | GlusterD's portmap entry for a brick is cleaned up when a PMAP_SIGNOUT event is initiated by the brick process at the shutdown. But if the brick process crashes or gets killed through SIGKILL then this event is not initiated and glusterd ends up with a stale port. Since GlusterD's portmap traversal happens both ways, forward for allocation and backward for registry search, there is a possibility that glusterd might end up running with a stale port for a brick which eventually will end up with clients to fail to connect to the bricks. Solution is to clean up the port entry in case the process is down as part of the brick disconnect event. Although with this the handling PMAP_SIGNOUT event becomes redundant in most of the cases, but this is the safeguard method to avoid glusterd getting into the stale port issues. Change-Id: I04c5be6d11e772ee4de16caf56dbb37d5c944303 BUG: 1503246 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: persist brickinfo's port change into glusterd's storeGaurav Yadav2017-10-315-10/+62
| | | | | | | | | | | | | | | | | | Problem: Consider a case where node reboot is performed and prior to reboot brick was listening to 49153. Post reboot glusterd assigned 49152 to brick and started the brick process but the new port was never persisted. Now when glusterd restarts glusterd always read the port from its persisted store i.e 49153 however pmap signin happens with the correct port i.e 49152. Fix: Make sure when glusterd_brick_start is called, glusterd_store_volinfo is eventually invoked. Change-Id: Ic0efbd48c51d39729ed951a42922d0e59f7115a1 BUG: 1506589 Signed-off-by: Gaurav Yadav <gyadav@redhat.com>
* write once read many: file appendable in worm stateVishal Pandey2017-10-302-10/+8
| | | | | | | | | | | | | | | | | | | | Issue: A new file is appendable even when file level worm is 1. Fix: Do a state transition in writev function in worm.c file. Steps To Test: 1- Activate file level worm. 2- Create a new file. 3- Leave file dormant for auto commit period. 4- Try and append some content to the file. 5- check the file if new content has been appended or not. 6- check if file has been transitioned to Worm Retention state. Change-Id: I52d50ad888cb0c39ad54be9352ccb07d48b8d71a BUG: 1505807 Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
* cluster/afr: Honor default timeout of 5min for analyzing split-brain fileskarthik-us2017-10-301-1/+5
| | | | | | | | | | | | | | | | | | | Problem: After setting split-brain-choice option to analyze the file to resolve the split brain using the command "setfattr -n replica.split-brain-choice -v "choiceX" <path-to-file>" should allow to access the file from mount for default timeout of 5mins. But the timeout was not honored and was able to access the file even after the timeout. Fix: Call the inode_invalidate() in afr_set_split_brain_choice_cbk() so that it will triger the cache invalidate after resetting the timer and the split brain choice. So the next calls to access the file will fail with EIO. Change-Id: I698cb833676b22ff3e4c6daf8b883a0958f51a64 BUG: 1503519 Signed-off-by: karthik-us <ksubrahm@redhat.com>