summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* rpc/clnt: Don't let consumers manage "connected" stateRaghavendra G2018-06-0410-99/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The state management of "connected" in rpc is ad-hoc as far as the responsibility goes. Note that there is nothing wrong with functionality itself. rpc layer manages this state in disconnect codepath and has exposed an api to manage this one from consumers. Note that rpc layer never sets "connected" to true by itself, which forces the consumers to use this api to get a working rpc connection. The situation is best captured from a comment in code from Jeff Darcy in glusterfsd/src/gf-attach.c: -/* - * In a sane world, the generic RPC layer would be capable of tracking - * connection status by itself, with no help from us. It might invoke our - * callback if we had registered one, but only to provide information. Sadly, - * we don't live in that world. Instead, the callback *must* exist and *must* - * call rpc_clnt_{set,unset}_connected, because that's the only way those - * fields get set (with RPC both above and below us on the stack). If we don't - * do that, then rpc_clnt_submit doesn't think we're connected even when we - * are. It calls the socket code to reconnect, but the socket code tracks this - * stuff in a sane way so it knows we're connected and returns EINPROGRESS. - * Then we're stuck, connected but unable to use the connection. To make it - * work, we define and register this trivial callback. - */ Also, consumers of rpc know about state of connection only through the notifications sent by rpc-clnt. So, consumers don't have any extra information to manage the state and hence letting them manage the state is counter intuitive. This patch cleans that up and instead moves the responsibility of state management of rpc layer into itself. Change-Id: I31e641a60795fc480ca753917f4b2579f1e05094 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Fixes: bz#1585585
* posix/ctime: Fix fops racing in updating mtime/atimeKotresh HR2018-06-031-11/+31
| | | | | | | | | | | | | | | | In distributed systems, there could be races with fops updating mtime/atime which could result in different mtime/atime for same file. So updating them only if time is greater than the existing makes sure, only the highest time is retained. If the mtime/atime update comes from the explicit utime syscall, it is allowed to set to previous time. Thanks Xavi for helping in rooting the issue. fixes: bz#1584981 Change-Id: If1230a75b96d7f9a828795189fcc699049e7826e Signed-off-by: Kotresh HR <khiremat@redhat.com>
* dht: Delete MDS internal xattr from dict in dht_getxattr_cbkMohit Agrawal2018-06-032-31/+4
| | | | | | | | | | | | | | Problem: At the time of fetching xattr to heal xattr by afr it is not able to fetch xattr because posix_getxattr has a check to ignore if xattr name is MDS Solution: To ignore same xattr update a check in dht_getxattr_cbk instead of having a check in posix_getxattr BUG: 1584098 Change-Id: I86cd2b2ee08488cb6c12f407694219d57c5361dc fixes: bz#1584098 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* changed 'sometime' messsages to 'some time'Levi Baber2018-06-014-10/+10
| | | | | | Change-Id: I0936229fc84c011db7791218bb566c971fdea174 fixes: bz#1584864 Signed-off-by: Levi Baber <baber@iastate.edu>
* features/shard: Fix missing unlock in shard_fsync_shards_cbk()Vijay Bellur2018-06-011-0/+1
| | | | | | | updates: bz#789278 Change-Id: I745a98e957cf3c6ba69247fcf6b58dd05cf59c3c Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* call-stub: Add a missing breakVijay Bellur2018-06-011-0/+1
| | | | | | | updates: bz#789278 Change-Id: Id411e69505209c08f33bb77948ee81936dfaef79 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* libgfchangelog: Remove duplicate includedir definition for changelog.hAnoop C S2018-06-011-1/+0
| | | | | | | | | | includedir for changelog.h is already defined in Makefile.am under libglusterfs/src since it was moved from xlators/features/changelog/lib/src. Therefore removing the duplicate definition. Change-Id: Iaff2e02fca45715820caa35b41efc2f6b656203a updates: bz#1193929 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* performance/io-cache: fix a missing unlockVijay Bellur2018-05-311-1/+1
| | | | | | | | Fixes: bz789278 Change-Id: If8ca1fef8a10f1e7270390b61121f8a20a76b1d0 updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: address test failures with brick mux enabledAtin Mukherjee2018-05-315-2/+22
| | | | | | | | | | | | | | | | | | | | | | This patch addresses following: 1. On volume stop, for the last brick, pmap_registry_remove () is invoked by glusterd. 2. If a brick process is sigkilled, remove all the associated brick instances from the portmap. 3. Bump up PROCESS_UP_TIMEOUT to 45. 4. gf_attach to kill a brick takes more time in mux (which is an issue that needs a fix), but in the interim, give br-state-check.t more time to complete (there are 2 kill_bricks, each taking 120 seconds, and the test usually passes in 30 odd seconds, hence bumping this up to 350 seconds) 5. The test bug-1559004-EMLINK-handling.t is taking ~950 seconds at times on master without mux, in mux cases, when it fails, it is almost at the last iteration, hence bumping the timeout for this test case to reduce regression error rates Updates: bz#1577672 Change-Id: I1922675e112baca4c125c4c094eaa42a11e34e67 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* protocol/client: Don't send fops till SETVOLUME is completeRaghavendra G2018-05-312-3/+9
| | | | | | | | | | | | | | | | | An earlier commit set conf->connected just after rpc layer sends RPC_CLNT_CONNECT event. However, success of socket level connection connection doesn't indicate brick stack is ready to receive fops, as an handshake has to be done b/w client and server after RPC_CLNT_CONNECT event. Any fop sent to brick in the window between, * protocol/client receiving RPC_CLNT_CONNECT event * protocol/client receiving a successful setvolume response can end up accessing an uninitialized brick stack. So, set conf->connected only after a successful SETVOLUME. Change-Id: I139a03d2da6b0d95a0d68391fcf54b00e749decf fixes: bz#1583937 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* cluster:dht: Corrected ret code checkN Balachandran2018-05-301-1/+1
| | | | | | | | syncop functions return -op_errno. Change-Id: Ifdb1bd1d1d11972b4306a2336e6737d6236a2fb1 fixes: bz#1580238 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* core/various: python3 compat, prepare for python2 -> python3Kaleb S. KEITHLEY2018-05-3018-45/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | see https://review.gluster.org/#/c/19788/ and https://review.gluster.org/#/c/19871/ Selected small fixes from 2to3 utility. Specifically apply, basestring, funcattrs, idioms, numliterals, set_literal, types, urllib, zip Note: these 2to3 fixes report no changes are necessary: exec, execfile, exitfunc, filter, getcwdu, intern, itertools, metaclass, methodattrs, ne, next, nonzero, operator, paren, raw_input, reduce, reload, renames, repr, standarderror, sys_exc, throw, tuple_params, xreadlines. Any 2to3 fixes not in the above two lists have more extensive changes which will follow in separate patches. most unicode changes suggested by 2to3 will need to be applied at the same time as changing the shebangs from python2 to python3. Prashanth notes that unicode strings in py2 need 'u' prefix; unicode strings in py3 3.0, 3.1, and 3.2 a 'u' prefix will throw an error, but in py3 3.3+ it is legal (or just ignored). All Linux dists we care about have 3.3 or later so we can leave 'u' prefixes on unicode strings. Change-Id: I49bba2f328b0ee24b9a8115a7183be979981563e updates: #411 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* Core: The lock contention on gf_client_dump_inodes_to_dicthari gowtham2018-05-301-1/+1
| | | | | | | | | | | | | | Problem: For a distributed replicated volume, in the inode status command the lock on gf_client_dump_inodes_to_dict is held by the first brickop. while this is being processed, if the second brickop comes. It fails to get the lock and the whole brick op fails. Fix: Instead of using a TRY_LOCK which errors out if the lock is busy, Use LOCK which will wait till the lock is acquired. Change-Id: I768a0a1b60f28c4f7f94549e18ee3765b69cc528 fixes: bz#1579769 Signed-off-by: hari gowtham <hgowtham@redhat.com>
* cloudsync: Adding s3 plugin for cloudsyncSusant Palai2018-05-3014-16/+743
| | | | | | | | | | | | | | | | | | This is a plugin which provides an interface to retrive files from amazon-s3 which are archived in to s3. Users need to give the above information for cloudsync to retrieve the file from s3. TODO: 1- A separate commit in to developer-guide will detail about the usage of this plugin in more detail. 2- Need to create target file in aws-bucket with "gfid" names. Helps avoiding name collisions. Change-Id: I2e4a586f4e3f86164de9178e37673a07f317e7d9 Updates: #387 Signed-off-by: Susant Palai <spalai@redhat.com>
* feature/cloudsync: Dev guide to write a Cloudsync PluginSusant Palai2018-05-301-0/+164
| | | | | | Updates: #387 Change-Id: I50ef84e5e67a648384394dfad003884d25a4c746 Signed-off-by: Susant Palai <spalai@redhat.com>
* thin-arbiter : Provide scripts and service file to start thin-arbiter processAshish Pandey2018-05-304-66/+138
| | | | | | | | | | | | | | | | | | | | | 1 - setup-thin-arbiter.sh To setup directory path for thin-arbiter. This is the path where replica id file will be placed and used by TA process. By default it will be /mnt/thin-arbiter. It is better to use default path and once set it should not be changed. 2 - gluster-ta-volume.service This is the Unit file used by systemd to start and keep the thin-arbiter process running. 3 - thin-arbiter.vol This is the default volume file for thin-arbiter. It will be used to start thin-arbiter process. This should not be modified by user except the directory path which can be modified using [1]. Change-Id: I68f2164f24adfa326c1d1a7a98c6ac4ff04ed553 fixes: bz#1579786 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* dht: Excessive 'dict is null' logs in dht_revalidate_cbkMohit Agrawal2018-05-291-2/+4
| | | | | | | | | | | | | Problem: In case of error(ESTALE/ENOENT) dht_revalidate_cbk throws "dict is null" error because xattr is not available Solution: To avoid the logs update condition in dht_revalidate_cbk and dht_lookup_dir_cbk BUG: 1583565 Change-Id: Ife6b3eeb6d91bf24403ed3100e237bb5d15b4357 fixes: bz#1583565 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* performance/open-behind: open pending fds before permission changeRaghavendra G2018-05-291-1/+60
| | | | | | | | | | | setattr, posix-acl and selinux changes on a file can revoke permission to open the file after permission changes. To prevent that, make sure the pending fd is opened before winding down setattr or setxattr (for posix-acl and selinux) calls. Change-Id: Ib0b91795d286072e445190f9a1b3b1e9cd363282 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> fixes: bz#1405147
* Quota fsck scriptSanoj Unnikrishnan2018-05-291-0/+378
| | | | | | | | | | | | | | script can be used to for 3 purposes 1) Extract marker xattr from the backend with a crawl (for analysis) 2) Report anomalies in accounting by comparing stat based accounting with marker translator's accounting 3) Fix anomalies in the FS by marking the anamolous directories dirty and having them heal in a bottom up fashion over the directory tree. Change-Id: Ib4d4a6d1886d7332c80d5a93f7afccaa0f52ab58 fixes: #390 Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com> Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
* rpc: conditionally cleanup event slotMilind Changire2018-05-291-0/+8
| | | | | | | | | | | | | | | Problem: socket_server_event_handler() may call rpc_transport_unref() for a socket which may fail registration with the event sub-system. This causes an assert to fail in event_unregister_epoll_common() Solution: Conditionally cleanup event slot only if slot index >= 0 Change-Id: I6ca7c133712e894adc335c7763879691b7e4b213 fixes: bz#1582704 BUG: 1582704 Signed-off-by: Milind Changire <mchangir@redhat.com>
* performance/read-ahead: throwaway read-ahead cache of all fds on writes on ↵Raghavendra G2018-05-291-28/+32
| | | | | | | | | | | | | | | | | | any fd This is to make sure applications that read and write on different fds of the same file work. This patch also fixes two other issues: 1. while iterating over the list of open fds on an inode, initialize tmp_file to 0 for each iteration before fd_ctx_get to make sure we don't carry over the history from previous iterations. 2. remove flushing of cache in flush and fsync as by themselves, they don't modify the data Change-Id: Ib9959eb73702a3ebbf90badccaa16b2608050eff Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Updates: bz#1512691
* Revert "performance/write-behind: fix flush stuck by former failed writes"Raghavendra G2018-05-291-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 9340b3c7a6c8556d6f1d4046de0dbd1946a64963. operations/writes across different fds of the same file cannot be considered as independent. For eg., man 2 fsync states, <man 2 fsync> fsync() transfers ("flushes") all modified in-core data of (i.e., modified buffer cache pages for) the file referred to by the file descriptor fd to the disk device </man> This means fsync is an operation on file and fd is just a way to reach file. So, it has to sync writes done on other fds too. Patch 9340b3c7a6c, prevents this. The problem fixed by patch 9340b3c7a6c - a flush on an fd is hung on a failed write (held in cache for retrying) on a different fd - is solved in this patch by making sure __wb_request_waiting_on considers failed writes on any fd as dependent on flush/fsync on any fd (not just the fd on which writes happened) opened on the same file. This means failed writes on any fd are either synced or thrown away on witnessing flush/fsync on any fd of the same file. Change-Id: Iee748cebb6d2a5b32f9328aff2b5b7cbf6c52c05 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Updates: bz#1512691
* glusterd: glusterd is releasing the locks before timeoutSanju Rakonde2018-05-287-0/+80
| | | | | | | | | | | | | | | | | | | Problem: We introduced lock timer in mgmt v3, which will realease the lock after 3 minutes from command execution. Some commands related to heal/profile will take more time to execute. For these comands timeout is set to 10 minutes. As the lock timer is set to 3 minutes glusterd is releasing the lock after 3 minutes. That means locks are released before the command is completed its execution. Solution: Pass a timeout parameter from cli to glusterd, when there is a change in default timeout value(i.e, default timeout value can be changed through command line or for the commands related to profile/heal we will change the default timeout value to 10 minutes.) glusterd will set the lock timer timeout according to the timeout value passed. Change-Id: I7b7a9a4f95ed44aca39ef9d9907f546bca99c69d fixes: bz#1577731 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* performance/quick-read: Use generation numbers to avoid updating the cache ↵Raghavendra G2018-05-282-27/+51
| | | | | | | | | | | | | | | | | | | | | with stale data Thanks to Pranith for the example. Following is the race we are trying to solve with this patch. 1) We have a file with content 'abc' 2) lookup and writev which replaces 'abc' with 'def' comes. Lookup fetches abc but yet to update the cache, and then immediately writev is wound which zeros out the cache. Now lookup_cbk updates the buffer with 'abc' even though on disk it is 'def'. Now writev completes and returns to application. 3) application does a readv which will be fetched from quick-read as 'abc'. Change-Id: I9a9cab9c99652aa6d17230a4fe4dc034ec502b1b BUG: 1390050 Updates: bz#1390050 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/dht: Increase failure count for lookup failure in remove-brick opSusant Palai2018-05-281-3/+31
| | | | | | | | | | | | | | | | | | An entry from readdirp might get renamed just before migration leading to lookup failures. For such lookup failure, remove-brick process does not see any increment in failure count. Though there is a warning message after remove-brick commit for the user to check in the decommissioned brick for any files those are not migrated, it's better to increase the failure count so that user can check in the decommissioned bricks for files before commit. Note: This can result in false negative cases for rm -rf interaction with remove-brick op, where remove-brick shows non-zero failed count, but the entry was actually deleted by user. Fixes :bz#1580269 Change-Id: Icd1047ab9edc1d5bfc231a1f417a7801c424917c fixes: bz#1580269 Signed-off-by: Susant Palai <spalai@redhat.com>
* libgfapi: Fix lookup on rootKotresh HR2018-05-283-2/+94
| | | | | | | | | | | | | | | | | | | Lookup on root was sending "/" as the path. This will break the basename calculation in loc_copy and hence lookup on root was failing if the loc_copy was involved in the stack. With ctime, a first lookup on root initiates a metadata self heal because of ctime xattr not being same on all afr subvolumes. This results in loc_copy and hence the failure of lookup. Fix would be to send path with "." for the root. fixes: bz#1582516 Change-Id: Iafe4b99f249a4f5034ad34c1d30590de0e35aa0d Signed-off-by: Kotresh HR <khiremat@redhat.com>
* tests: run-tests-in-vagrant.sh should return test statusNiels de Vos2018-05-281-5/+17
| | | | | | | | | | | The ./run-tests-in-vagrant.sh script does not return the correct exit status. Even if the tests in the Vagrant VM fail, the script returns success. This throws off the expectations that any regular testers (or CI) have. BUG: 1546103 Change-Id: I7f00903f9fe4ef3be8ba80db0f9aa8d412502b86 Signed-off-by: Niels de Vos <ndevos@redhat.com>
* feature/locks: Unwind response based on clinet versionAshish Pandey2018-05-281-54/+88
| | | | | | Change-Id: I6fc7755cca0d6f61cb775363618036228925842c fixes: bz#1570538 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* glusterd: memory leak in geo-rep statusSanju Rakonde2018-05-281-2/+6
| | | | | | | Fixes: bz#1580352 Change-Id: I9648e73090f5a2edbac663a6fb49acdb702cdc49 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* tests/bug-1543279: mark it as badRaghavendra G2018-05-251-0/+2
| | | | | | | | | | | There seems to be races which are not fixed by commit 9704d203f0. Though the test itself is not bad, it is failing very frequently. So, till the issue is fixed, marking this test as bad. updates: bz#1543279 Change-Id: I4a5869da1586178914ffb9563414879e6beab183 Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
* add COMMITMENT file as part of GPL cureAmar Tumballi2018-05-254-2/+49
| | | | | | | | | | | | | This is part of more broader commitment Red Hat along with IBM, Google, and Facebook did in November 2017. More on this can be found in the blog @ https://www.redhat.com/en/blog/fostering-greater-open-source-development & https://www.redhat.com/en/about/gplv3-enforcement-statement fixes: bz#1569345 Change-Id: Ia78023540ab587ebe14048a67413029be309413d Signed-off-by: Amar Tumballi <amarts@redhat.com>
* api: missing __THROW on pub function declsKaleb S. KEITHLEY2018-05-252-5/+5
| | | | | | | | missing __THROW on pub function decls needed for C++ Change-Id: Ia0ff09d311741e4cdc8ef171e07bbd56c24b9260 updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* changelog: fix br-state-check.t failure for brick_muxMohit Agrawal2018-05-252-1/+39
| | | | | | | | | | | | | | | Problem: Sometime br-state-check.t crash while runnning for brick multiplex and command in test case is taking 2 minutes for detach a brick Solution: Update code in changelog xlator specific to wait on all connection before cleanup rpc threads and cleanup rpc object only in non brick mux scenario BUG: 1577672 Change-Id: I16e257c1e127744a815000b87bd8b7b8d9c51e1b fixes: bz#1577672 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* Fix a test case that can fail for certain buildsPoornima G2018-05-251-0/+1
| | | | | | | | | | If certain builds have readdir-ahead disabled by default, the test case fails, as it asumes readdir-ahead is enabled by default. Hence explicitly enabling readdir-ahead. Change-Id: Ib5bef266707c2c557aeb2cf2ffbf4d0c92025c46 fixes: bz#1582051 Signed-off-by: Poornima G <pgurusid@redhat.com>
* posix/ctime: Fix updating mtime to older timeKotresh HR2018-05-251-5/+11
| | | | | | | | | | | With ctime feature enabled, the mtime is not updated when it's set to time older than the existing one. Fixed the same. But the ctime is not allowed to change to older dates. fixes: bz#1581035 Change-Id: If520922df42d6ce084c8df3046c138f8367164e5 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* core: make glfs_iobuf_copy() consumable for general purpose.Susant Palai2018-05-245-47/+56
| | | | | | | | | Currently plugins for cloudsync will be using it to write back data downloaded from remote store/cloud. Change-Id: I59f10bebed21b19568c94cbf29e3d536d5570749 Updates: #387 Signed-off-by: Susant Palai <spalai@redhat.com>
* posix/ctime: Fix gfid heal on first lookupKotresh HR2018-05-243-27/+62
| | | | | | | | | | | | | | | With ctime feature enabled, the gfid is not healing on first lookup. The fresh file logic depends on ctime and it was fetching from backend instead of xattr with ctime feature enabled. Fixed the same. Also fixed a possible hang with inode lock Change-Id: I020875c0462b284d6fa0e68304a422fa3d6a3e73 fixes: bz#1580532 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* storage/posix: use proper FOP for unwinding readdir(p)Raghavendra Bhat2018-05-241-3/+8
| | | | | | | | | As of now, even for readdirp, posix is unwinding with readdir signature. Change-Id: I6440c8a253c5d78bbcc97043e4e6e208e3d47cd1 fixes: bz#1581345 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* posix/ctime: Fix atime update for hardlinkKotresh HR2018-05-241-8/+19
| | | | | | | | | | | | | With ctime feature enabled, atime is not being updated for a hardlink when the file is accessed. e.g., touch -a <hardlink_file> fails to update atime. This patch fixes the same. fixes: bz#1580529 Change-Id: I2201c88d502d0070300a1f5023af1b36951284ec Signed-off-by: Kotresh HR <khiremat@redhat.com>
* cluster/dht: Fix rebalance log msgN Balachandran2018-05-241-2/+2
| | | | | | | | | | Corrected the name of the xattr and fixed the code to log an error only if op_errno is not ENODATA or ENOATTR. Change-Id: I42c5b1d838eec586ac7bed2471eb1d27ff09a9ea fixes: bz#1580238 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* sdfs: enable by defaultAmar Tumballi2018-05-242-2/+26
| | | | | | | | also provide an option for pass-through to enable/disable xlator fixes: #421 Change-Id: Ie30a91ad09620db62ab07b797e23123fd1200d1f Signed-off-by: Amar Tumballi <amarts@redhat.com>
* ctime: Fix updating ctime in rename and unlinkKotresh HR2018-05-244-13/+33
| | | | | | | | | | | | 1. Successful rename was not updating ctime. Fixed the same. 2. Successful unlink when link count is more than 1 was not updating ctime. Fixed the same. 3. Copy ctime and flags during frame copy. fixes: bz#1580020 Change-Id: Ied47275a36aea60254b2add7a59128a9c83b3645 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* features/sdfs: implement readdirpRaghavendra G2018-05-241-3/+144
| | | | | | | | | | Since readdirp acts as a batched lookup for all dentries it reads, it has to synchronize with any entry operation within the directory being read. Change-Id: I923a6ebd21856dbaa5fa5db4a26a29b7b29b3159 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> fixes: #421
* rpc: Don't reset auth_value in disconnectKotresh HR2018-05-241-12/+48
| | | | | | | | | | | | | The auth_value was being reset to AUTH_GLUSTERFS_v2 during rpc disconnect. It shoud not be reset. The disconnect during portmap request can race with handshake. If handshake happens first and disconnect later, auth_value would set to default value and it never sets back to actual auth_value fixes: bz#1579276 Change-Id: Ib46c9e01a97f6defb3fd1e0423fdb4b899b4a361 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* cluster/ec: Fix pre-op xattrop managementXavi Hernandez2018-05-233-32/+66
| | | | | | | | | | | | | | | | | | | | Multiple pre-op xattrop can be simultaneously being processed. On the cbk it was checked if the fop was waiting for some specific data (like size and version) and, if so, it was assumed that this answer should contain that data. This is not true, since a fop can be waiting for some data, but it may come from the xattrop of another fop. This patch differentiates between needing some information and providing it. This is related to parallel writes. Disabling them fixed the problem, but also prevented concurrent reads. A change has been made so that disabling parallel writes still allows parallel reads. Fixes: bz#1578325 Change-Id: I74772ad6b80b7b37805da93d5ec3ae099e96b041 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* test: Marking test case bug-1309462.t as badShyamsundarR2018-05-231-1/+2
| | | | | | | | | Details in the bug Updates: bz#1581735 Change-Id: Id984e10b60daf274d5510e3ccbf7abf0cb19f368 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* features/cloudsync: Make plugins configurableSusant Palai2018-05-223-6/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch brings the configuration option for plugins. For new plugins, an entry has to be created in to cs_plugin structure e.g. struct cs_plugin plugins[] = { { .name = "amazons3", .library = "libamazons3.so", .description = "amazon s3 store." }, {.name = NULL}, }; Library field describes the name of the shared library for the plugin. To configure plugin type "feature.cloudsync-storetype" option need to be set to the remote-store type. e.g. gluster volume set VOLNAME cloudsync-storetype amazons3. This should be same as the ".name" field in cs_plugin structure. cs_init will pick this up in run time to load the plugin. Change-Id: I2cec10b206f71ac4e71d472631a3a5badf278b59 fixes: bz#1576842 Signed-off-by: Susant Palai <spalai@redhat.com>
* afr: fix bug-1363721.t failureRavishankar N2018-05-214-2/+63
| | | | | | | | | | | | | | | | | | | | | | Problem: In the .t, when the only good brick was brought down, writes on the fd were still succeeding on the bad bricks. The inflight split-brain check was marking the write as failure but since the write succeeded on all the bad bricks, afr_txn_nothing_failed() was set to true and we were unwinding writev with success to DHT and then catching the failure in post-op in the background. Fix: Don't wind the FOP phase if the write_subvol (which is populated with readable subvols obtained in pre-op cbk) does not have at least 1 good brick which was up when the transaction started. Note: This fix is not related to brick muliplexing. I ran the .t 10 times with this fix and brick-mux enabled without any failures. Change-Id: I915c9c366aa32cd342b1565827ca2d83cb02ae85 updates: bz#1577672 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* Fix for memory-leak in crypt xlatorGergo Huszty2018-05-212-235/+248
| | | | | | | | | | | | Crypt xlator occasionaly uses local storage in it's call frame. These frames are managed with common macroes, which does not take care about cleaning up such local storages. The fix is similar to the other xlators' solution. A crypt specific macro handles the cleaning of the local storage when it is allocated. Change-Id: Ibb5b91551fbe70905e9c8c688d999fe702433e35 fixes: bz#1564419 Signed-off-by: Gergo Huszty <gergo.huszty@nokia.com>
* posix: use the ctime framework to handle setattr ctime payloadCsaba Henk2018-05-181-5/+16
| | | | | | | | | | Work on #208 having been been merged, we have obtained means to associate arbitrary ctimes with files, so we can handle setattr ctime payload with proper semantics. Updates: #435 Change-Id: I7302a3ee2574ca9bba605c7a8586c16c452f82c1 Signed-off-by: Csaba Henk <csaba@redhat.com>