summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* core: FreeBSD has pthread_set_name_np() (versus pthread_setname_np())release-4.0Kaleb S. KEITHLEY2018-05-101-2/+8
| | | | | | | | | | And has had it since at least FreeBSD 9.0 Reported-by: Roman Serbski <mefystofel@gmail.com> Change-Id: I52cfde7f2f7a82d0e66465ac392ed7e201e1653b BUG: 1576815 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* doc: Added release notes for 4.0.2v4.0.2-1ShyamsundarR2018-04-241-0/+37
| | | | | | | fixes: bz#1559547 Change-Id: Iab5f0dee7c90c3906226b41eb2ce9ea191f495e0 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* server/auth: add option for strict authenticationv4.0.2Mohammed Rafi KC2018-04-246-12/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When this option is enabled, we will check for a matching username and password, if not found then the connection will be rejected. This also does a checksum validation of volfile The option is invalid when SSL/TLS is in use, at which point the SSL/TLS certificate user name is used to validate and hence authorize the right user. This expects TLS allow rules to be setup correctly rather than the default *. This option is not settable, as a result this cannot be enabled for volumes using the CLI. This is used with the shared storage volume, to restrict access to the same in non-SSL/TLS environments to the gluster peers only. Tested: ./tests/bugs/protocol/bug-1321578.t ./tests/features/ssl-authz.t - Ran tests on volumes with and without strict auth checking (as brick vol file needed to be edited to test, or rather to enable the option) - Ran tests on volumes to ensure existing mounts are disconnected when we enable strict checking Change-Id: I2ac4f0cfa5b59cc789cc5a265358389b04556b59 fixes: bz#1570432 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Signed-off-by: ShyamsundarR <srangana@redhat.com>
* shared storage: Prevent mounting shared storage from non-trusted clientMohammed Rafi KC2018-04-241-0/+21
| | | | | | | | | | | | | | gluster shared storage is a volume used for internal storage for various features including ganesha, geo-rep, snapshot. So this volume should not be exposed to the client, as it is a special volume for internal use. This fix wont't generate non trusted volfile for shared storage volume. Change-Id: I8ffe30ae99ec05196d75466210b84db311611a4c updates: bz#1570432 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
* libglusterfs: fix comparison of a NULL dict with a non-NULL dictXavi Hernandez2018-04-191-8/+8
| | | | | | | | | | | | | Function are_dicts_equal() had a bug when the first argument was NULL and the second one wasn't NULL. In this case it incorrectly returned that the dicts were different when they could be equal. backport of: > BUG: 1566732 BUG: 1569403 Change-Id: I0fc245c2e7d1395865a76405dbd05e5d34db3273 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* cluster/dht: Handle file migrations when brick downN Balachandran2018-04-181-5/+51
| | | | | | | | | | | | | | | | | | | The decision as to which node would migrate a file was based on the gfid of the file. Files were divided among the nodes for the replica/disperse set. However, if a brick was down when rebalance started, the nodeuuids would be saved as NULL and a set of files would not be migrated. Now, if the nodeuuid is NULL, the first non-null entry in the set is the node responsible for migrating the file. Change-Id: I72554c107792c7d534e0f25640654b6f8417d373 fixes: bz#1566822 Signed-off-by: N Balachandran <nbalacha@redhat.com> (cherry picked from commit 1f0765242a689980265c472646c64473a92d94c0) Change-Id: I3072ca1f2975eb7ad3c38798e65d60d2312fd057
* cluster/dht: Wind open to all subvolsN Balachandran2018-04-131-10/+5
| | | | | | | | | | | | dht_opendir should wind the open to all subvols whether or not local->subvols is set. This is because dht_readdirp winds the calls to all subvols. (cherry picked from commit c4251edec654b4e0127577e004923d9729bc323d) Change-Id: I67a96b06dad14a08967c3721301e88555aa01017 updates: bz#1566822 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* features/index: Choose different base file on EMLINK errorPranith Kumar K2018-04-102-18/+61
| | | | | | | Change-Id: I4648816af908539efdc2528608aa2ebf7f0d0e2f fixes: bz#1565654 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> (cherry picked from commit bb12f2109a01856e8184e13cf984210d20155b13)
* cluster/afr: Prevent ping-event handling on shdPranith Kumar K2018-04-091-0/+2
| | | | | | | | | | On shd, we shouldn't treat any brick down based on latency, otherwise self-heal will never happen fixes: bz#1562728 Change-Id: Ica07fcc4fae91a6bfd9c9a670e2be464704d94b7 BUG: 1562728 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* gfapi: fix a couple of minor issuesKaleb S. KEITHLEY2018-04-062-5/+0
| | | | | | | | | | | | | | | | | | | duplicatation of exported functions in gfapi.map. Only the newest one is needed. Both the legacy and current symbols are exported. glfs_realpath34() decl should not be in glfs.h. Period. Old applications were compiled with the then glfs_realpath() decl and linked with glfs_realpath@@GFAPI_3_4.0. New applications should only call glfs_realpath() and it will be linked to the new/current glfs_realpath(). master: https://review.gluster.org/19828 master: bz#1564235 Change-Id: Icd5b0c9e9b68f0c133f14447b09ace35f33dbab2 BUG: 1564461 fixes: bz#1564461 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* cluster/ec: send list-node-uuids request to all subvolumesXavi Hernandez2018-03-282-1/+2
| | | | | | | | | | | | | | | The xattr trusted.glusterfs.list-node-uuids was only sent to a single subvolume. This was returning null uuids from the other subvolumes as if they were down. This fix forces that xattr to be requested from all subvolumes. Backport of: > BUG: 1561406 Change-Id: If62eb39a6857258923ba625e153d4ad79018ea2f BUG: 1561721 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* rpcsvc: correct event-thread scalingMilind Changire2018-03-221-3/+4
| | | | | | | | | | | | | | | | | | | | Problem: Auto thread count derived from the number of attachs and detachs was reset to 1 when server_reconfigure() was called. Solution: Avoid auto-thread-count reset to 1. mainline: > BUG: 1547888 > Reviewed-on: https://review.gluster.org/19689 > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Signed-off-by: Milind Changire <mchangir@redhat.com> (cherry picked from commit 0c3d984287d91d3fe1ffeef297252d912c08a410) Change-Id: Ic00e86adb81ba3c828e354a6ccb638209ae58b3e BUG: 1558959 Signed-off-by: Milind Changire <mchangir@redhat.com>
* rpcsvc: enable ownthread feature for glusterfs4_0_fop_progMilind Changire2018-03-221-0/+1
| | | | | | | | | | | | | | | Ownthread feature needs enabling for glusterfs4_0_fop_prog mainline: > BUG: 1559075 > Reviewed-on: https://review.gluster.org/19755 > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Signed-off-by: Milind Changire <mchangir@redhat.com> (cherry picked from commit 286871f550b9356025f964ca8af85aabf083f01d) Change-Id: Idce63eb094ae0fdfcddbd52d0dee25aa0e074926 BUG: 1559244 Signed-off-by: Milind Changire <mchangir@redhat.com>
* cluster/ec: fix SHD crash for null gfid'sXavi Hernandez2018-03-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | When the self-heal daemon is doing a full sweep it uses readdirp to get extra stat information from each file. This information is obtained in two steps by the posix xlator: first the directory is read to get the entries and then each entry is stated to get additional info. Between these two steps, it's possible that the file is removed by the user, so we'll get an error, leaving stat info empty. EC's heal daemon was using the gfid blindly, causing an assert failure when protocol/client was trying to encode the gfid. To fix the problem a check has been added. If we detect a null gfid, we simply ignore it and continue healing. Backport of: > BUG: 1558016 Change-Id: I2e4acdcecd0b6951055e50d1c37d686a2186a228 BUG: 1559079 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* doc: Added release notes for 4.0.1 releasev4.0.1ShyamsundarR2018-03-211-0/+22
| | | | | | Change-Id: Ic5c18fb9b8979dca4446a2d2ede7d12c48ba66f6 BUG: 1555481 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* rpcsvc: scale rpcsvc_request_handler threadsMilind Changire2018-03-209-28/+148
| | | | | | | | | | | | | | | | | | | Scale rpcsvc_request_handler threads to match the scaling of event handler threads. Please refer to https://bugzilla.redhat.com/show_bug.cgi?id=1467614#c51 for a discussion about why we need multi-threaded rpcsvc request handlers. mainline: > Reviewed-on: https://review.gluster.org/19337 > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Signed-off-by: Milind Changire <mchangir@redhat.com> (cherry picked from commit 7d641313f46789ec0a7ba0cc04f504724c780855) Change-Id: Ib6838fb8b928e15602a3d36fd66b7ba08999430b BUG: 1550946 Signed-off-by: Milind Changire <mchangir@redhat.com>
* protocol/client: fix memory corruptionXavi Hernandez2018-03-206-92/+78
| | | | | | | | | | | | | | | | There was an issue when some accesses to saved_fds list were protected by the wrong mutex (lock instead of fd_lock). Additionally, the retrieval of fdctx from fd's context and any checks done on it have also been protected by fd_lock to avoid fdctx to become outdated just after retrieving it. Backport of: > BUG: 1553129 Change-Id: If2910508bcb7d1ff23debb30291391f00903a6fe BUG: 1554235 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* cluster/ec: Change default read policy to gfid-hashAshish Pandey2018-03-192-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Whenever we read data from file over NFS, NFS reads more data then requested and caches it. Based on the stat information it makes sure that the cached/pre-read data is valid or not. Consider 4 + 2 EC volume and all the bricks are on differnt nodes. In EC, with round-robin read policy, reads are sent on different set of data bricks. This way, it balances the read fops to go on all the bricks and avoid heating UP (overloading) same set of bricks. Due to small difference in clock speed, it is possible that we get minor difference for atime, mtime or ctime for different bricks. That might cause a different stat returned to NFS based on which NFS will discard cached/pre-read data which is actually not changed and could be used. Solution: Change read policy for EC as gfid-hash. That will force all the read to go to same set of bricks. >Change-Id: I825441cc519e94bf3dc3aa0bd4cb7c6ae6392c84 >BUG: 1554743 >Signed-off-by: Ashish Pandey <aspandey@redhat.com> Change-Id: I825441cc519e94bf3dc3aa0bd4cb7c6ae6392c84 BUG: 1557906 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* libglusterfs: move compat RPC/XDR #defines to eliminate warningsKaleb S. KEITHLEY2018-03-162-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Building with libtirpc (versus legacy glibc rpc) results in many warnings about xdr macros that are redefined in libtirpc headers because of the way compat.h and glusterfs.h are usually #included. And these xdr macros in libglusterfs/src/compat.h - which were copied from legacy glibc's rpc headers - are different than the same-name macros in libtirpc. I haven't checked to see that any of the macros are expanded (incorrectly) between the definition in compat.h and the redefinition in tirpc/rpc/xdr.h; the risk seems pretty minimal. Regardless it seems better, from a truth-and-beauty perspective to not have the old, incorrect definitions in the first place. Not to mention that any file that #includes compat.h and not glusterfs.h does not need these xdr macro definitions at all. They're really only needed when using really old glibc rpc, which would only be evident if including glusterfs.h and/or glusterfs-fops.h. (Which by the way, nothing currently #includes glusterfs-fops.h by itself. And maybe nothing ever should?) Change-Id: Ic11e4407d6ab7c498a8745a99379cbf4788a24e8 BUG: 1555309 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* glusterd: volume get fixes for client-io-threads & quorum-typeRavishankar N2018-03-165-7/+52
| | | | | | | | | | | | | | | | | | | | | 1. If a replica volume created on glusterfs-3.8 was upgraded to glusterfs-3.12, `gluster vol get volname client-io-threads` displayed 'on' even though it wasn't and the xlator wasn't loaded on the client-graph. This was due to removing certain checks in glusterd_get_default_val_for_volopt as a part of commit 47604fad4c2a3951077e41e0c007ceb979bb2c24. Fix it. 2. Also, as a part of op-version bump-up, client-io-threads was being loaded on the clients during volfile regeneration. Prevent it. 3. AFR assumes quorum-type to be auto in newly created replic 3 (odd replica in general) volumes but `gluster vol get quorum-type` displays 'none'. Fix it. Change-Id: I19e586361ed1065c70fb378533d3b4dac1095df9 BUG: 1552404 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit bd2c45fe3180fe36b042d5eabd348b6eaeb8d3e2)
* cluster/ec: avoid delays in self-healXavi Hernandez2018-03-155-48/+134
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Self-heal creates a thread per brick to sweep the index looking for files that need to be healed. These threads are started before the volume comes online, so nothing is done but waiting for the next sweep. This happens once per minute. When a replace brick command is executed, the new graph is loaded and all index sweeper threads started. When all bricks have reported, a getxattr request is sent to the root directory of the volume. This causes a heal on it (because the new brick doesn't have good data), and marks its contents as pending to be healed. This is done by the index sweeper thread on the next round, one minute later. This patch solves this problem by waking all index sweeper threads after a successful check on the root directory. Additionally, the index sweep thread scans the index directory sequentially, but it might happen that after healing a directory entry more index entries are created but skipped by the current directory scan. This causes the remaining entries to be processed on the next round, one minute later. The same can happen in the next round, so the heal is running in bursts and taking a lot to finish, specially on volumes with many directory levels. This patch solves this problem by immediately restarting the index sweep if a directory has been healed. Backport of: > BUG: 1547662 Change-Id: I58d9ab6ef17b30f704dc322e1d3d53b904e5f30e BUG: 1555198 Signed-off-by: Xavi Hernandez <jahernan@redhat.com>
* doc: Update release notes with bug fixed for upgradesv4.0.0-2ShyamsundarR2018-03-111-0/+2
| | | | | | Change-Id: Ia1df8e404aa53991a15fa46499a77dc16ef97677 BUG: 1539842 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* protocol: Fix 4.0 client, parsing older iatt in dictShyamsundarR2018-03-118-44/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a mixed mode cluster involving 4.0 and older 3.x bricks, if clients are newer, then the iatt encoded in the dictionary can be of the older iatt format, which a newer client will map incorrectly to the newer structure. This causes failures in FOPs that depend on this iatt for some functionality (seen in mkdir operations failing as EIO, when DHT hits its internal setxattr call). The fix provided is to convert the iatt in the dict, based on which RPC version is used to communicate with the server. IOW, this is the reverse of change in commit "b966c7790e" Tested using a mixed mode cluster (i.e bricks in 3.12 and 4.0 versions) and a mixed set of clients, 3.12 and 4.0 clients. There is no regression test provided, as this needs a mixed mode cluster to test and validate. >Change-Id: I454e54651ca836b9f7c28f45f51d5956106aefa9 >BUG: 1554053 >Signed-off-by: ShyamsundarR <srangana@redhat.com> Change-Id: I454e54651ca836b9f7c28f45f51d5956106aefa9 BUG: 1554077 Signed-off-by: ShyamsundarR <srangana@redhat.com> Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* protocol: Added iatt conversion to older formatShyamsundarR2018-03-114-0/+141
| | | | | | | | | | | | | | | | Added iatt conversion to an older format, when dealing with older RPC versions. This enables iatt structure conformance when dealing with older clients. This helps fix rolling upgrade from 3.x versions to 4.0 version of gluster by sending the right iatt in the dictionary when DHT requests the same. (cherry picked from commit b966c7790e35de353ae09ee48d4e2f55e0117f7e) Change-Id: Ieaf925f81f8c7798a8fba1e90a59fa9dec82856c BUG: 1551112 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* doc: Final edit of the release notes for 4.0.0v4.0.0ShyamsundarR2018-03-061-0/+3
| | | | | | Change-Id: I5bb23a616819d1f9774e02bf0982091daa5e3e68 BUG: 1539842 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* build: address linkage issuesKaleb S. KEITHLEY2018-03-0611-91/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have the following undefined symbol error from protocol/server.so: glusterfs_mgmt_pmap_signout glusterfs_autoscale_threads See https://review.gluster.org/19225 (bz#1532238) and https://review.gluster.org/19657 (bz#1550895) IMO this is a cleaner solution. I.e. moving the above two functions to libgfrpc (.../rpc/rpc-lib/...) I would also, for (foolish) consistency sake, like to see glusterfs_mgmt_pmap_signin() moved from glusterfsd to libgfrpc as well. This works on f28/rawhide, with its new, more restrictive run-time link semantics. The smoke and regression tests on earlier fedora and centos will confirm that it works on those platforms too. master: 1550895 master: https://review.gluster.org/19664 Change-Id: I9cfbd1cc15e7ebd9fc31b56ac791287fa2c584de BUG: 1551640 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* doc: Updated 4.0.0 release notesShyamsundarR2018-03-051-34/+34
| | | | | | | | Updated with content provided by others and during reviews Change-Id: Id555ccc9571b6bbc87099def1e134a4171fb0439 BUG: 1539842 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* cluster/afr: Fix dict-leak in pre-opPranith Kumar K2018-03-033-20/+20
| | | | | | | | | | | | | | | | At the time of pre-op, pre_op_xdata is populted with the xattrs we get from the disk and at the time of post-op it gets over-written without unreffing the previous value stored leading to a leak. This is a regression we missed in https://review.gluster.org/#/q/ba149bac92d169ae2256dbc75202dc9e5d06538e >BUG: 1550078 >Change-Id: I0456f9ad6f77ce6248b747964a037193af3a3da7 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >(cherry picked from commit e7b79c59590c203c65f7ac8548b30d068c232d33) BUG: 1550808 Change-Id: I0456f9ad6f77ce6248b747964a037193af3a3da7
* protocol/server: Insert dummy clnt-lk-version to avoid upgrade failureAnoop C S2018-03-021-0/+10
| | | | | | | | | | | | This is required as we check for 'clnt-lk-version' in SETVOLUME callback with older clients in place against newer servers. Change is similar to what we have done via https://review.gluster.org/#/c/19560/. (cherry picked from commit fecb0fc748806d4e6d61bcbef976acf473e55c82) Change-Id: If333c20cf9503f40687ec926c44c7e50222c05b5 BUG: 1551112 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* doc: Update 4.0.0 release notes for GD2v4.0.0rc1Kaushal M2018-02-261-69/+207
| | | | | | Change-Id: I8dce82bb3b7a1d48da2ad9a55bfa614b93e078ca BUG: 1539842 Signed-off-by: Kaushal M <kaushal@redhat.com>
* doc: Updated release notes for features lacking the sameShyamsundarR2018-02-251-155/+287
| | | | | | Change-Id: I95a31107d879e089a2477bca9eb543da7880de8d BUG: 1539842 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* doc/release-notes: add information on FIPS complianceRavishankar N2018-02-231-5/+15
| | | | | | Change-Id: Ib3d012c2b2a4a9281b9adb126a7d466086cc23f2 BUG: 1539842 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* Release notes 4.0: Fill up data for some topics in performancePoornima G2018-02-231-11/+29
| | | | | Change-Id: I04c41296f878d6e2d94344b621733f7c7f07c337 Signed-off-by: Poornima G <pgurusid@redhat.com>
* Release notes for bug 1502610Xavi Hernandez2018-02-231-0/+11
| | | | | | Change-Id: I6f983cea5f365795eb1ea205aad3edac04efa9c9 BUG: 1539842 Signed-off-by: Xavi Hernandez <jahernan@redhat.com>
* cluster/dht: Handle single dht child in dht_lookupN Balachandran2018-02-231-0/+13
| | | | | | | | | | | | | | | | | | | This patch limits itself to only handling the case where no file (data or linkto) exists on the subvol. Additional cases to be handled: 1. A linkto file was found on the only child subvol. This currently calls dht_lookup_everywhere which eventually deletes it. It can be deleted directly as it will not be pointing to a valid subvol. 2. Directory lookups - locking might be unnecessary in some cases. > Change-Id: I940ba34531f2aaee1d36fd9ca45ecfd46be662a4 > BUG: 1546620 > Signed-off-by: N Balachandran <nbalacha@redhat.com> Change-Id: I940ba34531f2aaee1d36fd9ca45ecfd46be662a4 BUG: 1548271 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* cluster/dht: Ignore ENODATA from getxattr for posix aclsN Balachandran2018-02-231-6/+8
| | | | | | | | | | | | | dht_migrate_file no longer prints an error if getxattr for posix acls fails with ENODATA/ENOATTR. > Change-Id: Id9ecf6852cb5294c1c154b28d609889ea3420e1c > BUG: 1546954 > Signed-off-by: N Balachandran <nbalacha@redhat.com> Change-Id: Id9ecf6852cb5294c1c154b28d609889ea3420e1c BUG: 1548264 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* cluster/dht: Fixed a typoN Balachandran2018-02-231-2/+2
| | | | | | | | | | | | Replaced "then" with "than" > Change-Id: I73090e8c1a639befd7c5458e8d63bd173248bc7d > BUG: 1547128 > Signed-off-by: N Balachandran <nbalacha@redhat.com> Change-Id: I73090e8c1a639befd7c5458e8d63bd173248bc7d BUG: 1547842 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* build: add --without-server optionNiels de Vos2018-02-2141-21/+186
| | | | | | | | | | | | | | | | With Gluster 4.0 we will not provide the server components for EL6 and older. At one point Gluster 4.x will get GlusterD2, which requires Golang tools in the distribution. EL6 does not contain these at the moment. With this change, it is possible to `./configure --without-server` which prevents building glusterd and the xlators for the bricks. Building RPMs can pass `--without server` and the glusterfs-server sub-package will not be created. Change-Id: I97f5ccf9f2c76e60d9af83915fc59fae57ad6d25 BUG: 1547635 Signed-off-by: Niels de Vos <ndevos@redhat.com>
* glusterd: import volumes in separate synctaskAtin Mukherjee2018-02-217-70/+356
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With brick multiplexing, to attach a brick to an existing brick process the prerequisite is to have the compatible brick to finish it's initialization and portmap sign in and hence the thread might have to go to a sleep and context switch the synctask to allow the brick process to communicate with glusterd. In normal code path, this works fine as glusterd_restart_bricks () is launched through a separate synctask. In case there's a mismatch of the volume when glusterd restarts, glusterd_import_friend_volume is invoked and then it tries to call glusterd_start_bricks () from the main thread which eventually may land into the similar situation. Now since this is not done through a separate synctask, the 1st brick will never be able to get its turn to finish all of its handshaking and as a consequence to it, all the bricks will fail to get attached to it. Solution : Execute import volume and glusterd restart bricks in separate synctask. Importing snaps had to be also done through synctask as there's a dependency of the parent volume need to be available for the importing snap functionality to work. >mainline patch : https://review.gluster.org/#/c/19357/ https://review.gluster.org/#/c/19536/ https://review.gluster.org/#/c/19539/ Change-Id: I290b244d456afcc9b913ab30be4af040d340428c BUG: 1543706 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit cb0339f9229fc5c05d7ef4cfcc4ca9c4569f3755)
* posix/afr: handle backward compatibility for rchecksum fopRavishankar N2018-02-2011-13/+89
| | | | | | | | | | Added a volume option 'fips-mode-rchecksum' tied to op version 4. If not set, rchecksum fop will use MD5 instead of SHA256. updates: #230 Change-Id: Id8ea1303777e6450852c0bc25503cda341a6aec2 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit 6daa6535692b2c68b493636a9bbfdcbc475b3d80)
* protcol/client: Insert dummy clnt-lk-version to avoid upgrade failureAnoop C S2018-02-191-0/+9
| | | | | | | | | | | | | | | | | | With https://review.gluster.org/#/c/12363/ being merged, we no longer send client's lk-version to server side and the corresponding check on server is also removed. But when clients are upgraded prior to servers, the check for lk-version at server side fails and is reported back to clients resulting in disconnection. Since we don't have lock-recovery (lk-version and grace-timeout) logic anymore in code base our best bet would be to add client's default lk-version i.e, 1, into the dictionary just to make server side check pass and continue with remaining SETVOLUME operations. Change-Id: I441b67bd271d1e9ba9a7c08703e651c7a6bd945b BUG: 1544366 Signed-off-by: Anoop C S <anoopcs@redhat.com> (cherry picked from commit c096bec4ec3f3ac33cc0787c60978944792e074e)
* rpc: Adds rpcbind6 programs to libgfrpc symbolsSheena Artrip2018-02-151-0/+2
| | | | | | | | | | | | | Building with --with-default-ipv6 causes shared components of gluster calling the rpcbind6 functions to fail. Adding the symbols in the list is all that is necessary. Building without ipv6 keeps the same behavior. No test cases as this is a build-specific fix. Change-Id: I248d3291bf17326b07d152d9b79cdcfaf9068f0d BUG: 1545724 Signed-off-by: Sheena Artrip <sheenobu@fb.com>
* build: Remove unwanted autoconf messages for libtirpcAnoop C S2018-02-151-2/+0
| | | | | | | | | | | | | | AC_MSG_RESULT is normally used when it is preceded by AC_MSG_CHECKING during explicit checking of certain requirements. With PKG_CHECK_MODULES being used for checking the presence of libtirpc itself generates the following message: checking for TIRPC... yes Change-Id: I3f088a45ef2ced6f6fd9e1524e758c812deecb8f BUG: 1538723 Signed-off-by: Anoop C S <anoopcs@redhat.com> (cherry picked from commit ec2c95f310fdd30531b04f85840860aae2c8dff4)
* glusterd: fix tier-enabled flag op-version checkAtin Mukherjee2018-02-151-2/+2
| | | | | | | | | | | | | | tier-enabled flag in volinfo structure was introduced in 3.10, however while writing this value to the glusterd store was done with a wrong op-version check which results into volume checksum failure during upgrades. >Change-Id: I4330d0c4594eee19cba42e2cdf49a63f106627d4 >BUG: 1544600 >Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Change-Id: I4330d0c4594eee19cba42e2cdf49a63f106627d4 BUG: 1544638 Signed-off-by: hari gowtham <hgowtham@redhat.com>
* tests/dht: Non-root can delete stale linkto filesN Balachandran2018-02-121-0/+51
| | | | | | | | | | | | | Test to check that non-root users can delete stale linkto files > Change-Id: Ic9bc76bc485cab839927af60cfce78a058eee2e4 > BUG: 1542318 > Signed-off-by: N Balachandran <nbalacha@redhat.com> Change-Id: Ic9bc76bc485cab839927af60cfce78a058eee2e4 BUG: 1543487 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* Release notes for #368Pranith Kumar K2018-02-111-10/+5
| | | | | | BUG: 1539842 Change-Id: I9d4106f478e7244146998752ddf4f280225d339b Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* doc: updated the release-notesAmar Tumballi2018-02-111-43/+90
| | | | | Change-Id: I481a0041393acf556f4c6ab15ee74e4c8e3dea50 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* core: move logs which are only developer relevant to DEBUG levelAmar Tumballi2018-02-095-6/+6
| | | | | | Change-Id: I8b38e231b6160db8075f73773d4e7dc115a90d95 BUG: 1542829 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* cluster/dht: Unlink linkto files as rootN Balachandran2018-02-091-3/+7
| | | | | | | | | | | | | | | Non-privileged users cannot delete linkto files. However the failure to unlink a stale linkto causes DHT to fail the lookup with EIO and hence prevent access to the file. > Change-Id: Id295362d41e52263790694602f36f1219f0646a2 > BUG: 1542318 > Signed-off-by: N Balachandran <nbalacha@redhat.com> Change-Id: Id295362d41e52263790694602f36f1219f0646a2 BUG: 1543487 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* glusterd: process pmap sign in only when port is marked as freeAtin Mukherjee2018-02-091-0/+15
| | | | | | | | | | | | | | | | | | | Because of some crazy race in volume start code path because of friend handshaking with volumes with quorum enabled we might end up into a situation where glusterd would start a brick and get a disconnect and then immediately try to start the same brick instance based on another friend update request. And then if for the very first brick even if the process doesn't come up at the end sign in event gets sent and we end up having two duplicate portmap entries for the same brick. Since in brick start we mark the previous port as free, its better to consider a sign in request as no op if the corresponding port type is marked as free. >mainline patch : https://review.gluster.org/#/c/19263/ Change-Id: I995c348c7b6988956d24b06bf3f09ab64280fc32 BUG: 1543711 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit 9d708a3739c8201d23f996c413d6b08f8b13dd90)