summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* build: use libtirpc by default, even if ipv6 is not the defaultNiels de Vos2018-02-081-1/+8
| | | | | | | | | | | | | | | | | An error sneaked in with Change-Id I86f847dfd. The check for requiring libtirpc-devel should be done regardless of the ipv6-default. Even if IPv6 is not the default, libtirpc-devel should be used unless it is explicitly requested by a --without option. libtirpc can not be used on EL6 and EL7 yet. The EL7 version does not provide xdr_sizeof(), in addition to that, EL6 does not have xdr_uint32_t() and xdr_uint64_t(). BUG: 1538723 Change-Id: I4a8292de2eddad16137df5998334133fc1e11261 Fixes: 0c57232ae07f48bd6483bfe88a182f832377ef52 Signed-off-by: Niels de Vos <ndevos@redhat.com> (cherry picked from commit 7631b22a5960363518ad13da8661c76a1ffec253)
* build: glibc has removed rpc headers and rpcgen in Fedora28, use libtirpcKaleb S. KEITHLEY2018-02-072-51/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Other Linux distributions are doing the same; some others have already done so. Switch to libtirpc(-devel) and unbundled rpcgen packages. For now rpcgen is still provided by the glibc-rpcgen RPM, but rpcsvc-proto's rpcgen subpackage is available now but will not be used until glibc-rpcgen is retired. (note, rpcsvc-proto's rpcgen is just named rpcgen-...rpm. I.e. not rpcsvc-proto-rpcgen.) Right now either one will satisfy the BuildRequires: rpcgen. Also, when a .spec file has BuildRequires: foo-devel it is not necessary to also have: BuildRequires: foo or even: BuildRequires: foo foo-devel The foo-devel package has a dependency on foo, which will install foo automatically. It's usually also not necessary to have a corresponding Requires: foo as the rpmbuild process will also automatically determine the install-time dependencies. And other minor glusterfs.spec.in cleanup of ipv6-default, including sorting the argument definitions because the comment says "keep them sorted" (Though nobody appears to have ever sorted them in the first place.) Change-Id: I86f847dfda0fef83e22c6e8b761342d652a2d9ba BUG: 1538723 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> (cherry picked from commit 0c57232ae07f48bd6483bfe88a182f832377ef52)
* glusterd/store: handle the case of fsid being set to 0Amar Tumballi2018-02-061-0/+19
| | | | | | | | | | | | | Generally this would happen when a system gets upgraded from an version which doesn't have fsid details, to a version with fsid values. Without this change, after upgrade, people would see reduced 'df ' output, causing lot of confusions. Debugging Credits: Nithya B <nbalacha@redhat.com> Change-Id: Id718127ddfb69553b32770b25021290bd0e7c49a BUG: 1541880 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* cluster/dht: avoid overwriting client writes during migrationSusant Palai2018-02-0612-12/+269
| | | | | | | | | | | | | | | | | | | | | | | | | For more details on this issue see https://github.com/gluster/glusterfs/issues/308 Solution: This is a restrictive solution where a file will not be migrated if a client writes to it during the migration. This does not check if the writes from the rebalance and the client actually do overlap. If dht_writev_cbk finds that the file is being migrated (PHASE1) it will set an xattr on the destination file indicating the file was updated by a non-rebalance client. Rebalance checks if any other client has written to the dst file and aborts the file migration if it finds the xattr. updates gluster/glusterfs#308 Change-Id: I73aec28bc9dbb8da57c7425ec88c6b6af0fbc9dd Signed-off-by: Susant Palai <spalai@redhat.com> Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Signed-off-by: N Balachandran <nbalacha@redhat.com> (cherry picked from commit 545a7ce6762a1b3a7b989b43a9d18b5b1b299df0)
* afr: capture the correct errno in post-op quorum checkRavishankar N2018-02-061-8/+8
| | | | | | | | | | If the post-op phase of txn did not meet quorm checks, use that errno to unwind the FOP rather than blindly setting ENOTCONN. Change-Id: I0cb0c8771ec75a45f9a25ad4cd8601103deddf0c BUG: 1542382 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit 440a048f24b006c80af3d7bcd0a1f13fe3459d87)
* afr: don't treat all cases all bricks being blamed as split-brainRavishankar N2018-02-065-9/+165
| | | | | | | | | | | | | | | | | | | | | | | | Problem: We currently don't have a roll-back/undoing of post-ops if quorum is not met. Though the FOP is still unwound with failure, the xattrs remain on the disk. Due to these partial post-ops and partial heals (healing only when 2 bricks are up), we can end up in split-brain purely from the afr xattrs point of view i.e each brick is blamed by atleast one of the others. These scenarios are hit when there is frequent connect/disconnect of the client/shd to the bricks while I/O or heal are in progress. Fix: Instead of undoing the post-op, pick a source based on the xattr values. If 2 bricks blame one, the blamed one must be treated as sink. If there is no majority, all are sources. Once we pick a source, self-heal will then do the heal instead of erroring out due to split-brain. Change-Id: I3d0224b883eb0945785ade0e9697a1c828aec0ae BUG: 1542380 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit 0e6e8216823c2d9dafb81aae0f6ee3497c23d140)
* cluster/afr: remove unnecessary child_up initializationXavier Hernandez2018-02-061-7/+0
| | | | | | | | | | | | | | | The child_up array was initialized with all elements being -1 to allow afr_notify() to differentiate down bricks from bricks that haven't reported yet. With current implementation this is not needed anymore and it was causing unexpected results when other parts of the code considered that if child_up[i] != 0, it meant that it was up. Backport of: > BUG: 1541038 Change-Id: I2a9d712ee64c512f24bd5cd3a48dcb37e3139472 BUG: 1541928 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* cluster/dht: Fixed leak in dht_populate_inode_for_dentryN Balachandran2018-02-062-6/+10
| | | | | | | | | | | | | | | | | Fixed an issue in dht_populate_inode_for_dentry where a layout is set in the inode without checking if it is already set. This overwrites the value each time without freeing the already existing layout. Also includes the changes in https://review.gluster.org/19471 which fix a leak introduced in the original patch. > Change-Id: I651bf539a0b82b4ddc4c355890c16a8e91f5f1fd > BUG: 1541264 > Signed-off-by: N Balachandran <nbalacha@redhat.com> Change-Id: I651bf539a0b82b4ddc4c355890c16a8e91f5f1fd BUG: 1541277 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* cluster/ec: Do lock conflict check correctly for wait-listPranith Kumar K2018-02-021-8/+15
| | | | | | | | | | | | | | Problem: ec_link_has_lock_conflict() is traversing over only owner_list but the function is also getting called with wait_list. Fix: Modify ec_link_has_lock_conflict() to traverse lists correctly. Updated the callers to reflect the changes. BUG: 1540882 Change-Id: Ibd7ea10f4498e7c2761f9a6faac6d5cb7d750c91 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* sdfs: crash fixesAmar Tumballi2018-02-012-8/+36
| | | | | | | | | | | | | | * from the patch which got tested in experimental branch, there was a code cleanup involved, which missed setting of a local variable, which led to crash immediately after enabling the feature. * added a sanity test case to validate all the fops of sdfs. Updates: #397 Change-Id: I7e0bebfc195c344620577cb16c1afc5f4e7d2d92 BUG: 1541117 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* build: Add new glusterfs4 source files to gitignoreAnoop C S2018-02-011-0/+2
| | | | | | Change-Id: I4e6439d0f1ab55528c0f7e23c437c7b62628b8e4 Signed-off-by: Anoop C S <anoopcs@redhat.com> (cherry picked from commit ff127dec90b80ac7d609087594ee5466acf76390)
* protocol: utilize the version 4 xdrv4.0.0rc0Amar Tumballi2018-02-018-152/+581
| | | | | | | updates #384 Change-Id: Id80bf470988dbecc69779de9eb64088559cb1f6a Signed-off-by: Amar Tumballi <amarts@redhat.com>
* gfapi : New APIs have been added to use lease feature in glusterSoumya Koduri2018-02-0111-29/+280
| | | | | | | | | | | Following APIs glfs_h_lease(), glfs_lease() added, so that gfapi applications can set and get lease which enables more efficient client side caching. Updates: #350 Change-Id: Iede85be9af1d4df969b890d0937ed0afa4ca6596 Signed-off-by: Poornima G <pgurusid@redhat.com> Signed-off-by: Soumya Koduri <skoduri@redhat.com> Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
* glusterd: optimize glusterd import volumes code pathAtin Mukherjee2018-01-311-5/+7
| | | | | | | | | | | | | In case there's a version mismatch detected for one of the volumes glusterd was ending up with updating all the volumes which is a overkill. >mainline patch : https://review.gluster.org/#/c/19358/ Change-Id: I6df792db391ce3a1697cfa9260f7dbc3f59aa62d BUG: 1540554 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> (cherry picked from commit bb34b07fd2ec5e6c3eed4fe0cdf33479dbf5127b)