summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Updating the glfs_setattr and glfs_fsetattr public APIs to use glfs_statArjun Sharma2019-02-272-61/+84
| | | | | | Change-Id: I0e86c8222c88b4c71087ec287ba81f8353d70822 updates: #389 Signed-off-by: Arjun <arjsharm@redhat.com>
* glusterd: remove experimental xlator options from glusterd-volume-set.cSanju Rakonde2019-02-261-20/+0
| | | | | | | | | | experimental xlators have been removed from the codebase. But we missed to remove the options related to experimental xlators from the codebase. This patch removes those options. fixes: bz#1683352 Change-Id: I3fa7e14c6cd8ebde5cebc8d2b0cb2409bf37c1ae Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* build: do not install service related files when building --without-serverNiels de Vos2019-02-261-1/+3
| | | | | | | | | | It seems that glusterfs-6 disables building the server (./configure --without-server) on el6 and hence the installed but unpackaged files should not get installed in the first place. Change-Id: I7bea08202dd59ac309de8bc861da920ed3600bc6 Fixes: bz#1680587 Signed-off-by: Niels de Vos <ndevos@redhat.com>
* glusterfind: revert shebangs to #!/usr/bin/python3Kaleb S. KEITHLEY2019-02-265-5/+5
| | | | | | | | | | | | | | | Using #!/usr/bin/env python is illegal in Fedora and RHEL packaging. (Debian and SUSE packaging will complain about it too but don't enforce it like Fedora packaging does. Yet.) We went through a giant exercise fixing these once already. The python needs to be python2/python3 clean. There is a build scriptlet that converts the shebangs back to /usr/bin/python on rhel7. Change-Id: If208a2557f7e5d727cda98c27905e249cf485d5b updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* leases-internal.c: minor reduction of work under lock.Yaniv Kaul2019-02-252-42/+43
| | | | | | | | | | | | Minor changes to reduce work done under a lock. Changed few CALLOC() to MALLOC(), and moved some time(NULL) outside the lock. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I4683d0d6e0b653a6adefff87b43ae717fd46843a
* eventsapi: Fix Python3 compatibility issuesAravinda VK2019-02-257-43/+52
| | | | | | | | | | | - Fixed Relative import and non-package import related issues. - socketserver import issues fix - Renamed installed directory name to `gfevents` from `events`(To avoid any issues with other global libs) Fixes: bz#1679406 Change-Id: I3dc38bc92b23387a6dfbcc0ab8283178235bf756 Signed-off-by: Aravinda VK <avishwan@redhat.com>
* fuse : fix memory leakSunny Kumar2019-02-251-0/+4
| | | | | | | | | | | | | | | | | | | | This patch fixes memory leak reported by ASan. Tracebacks: ERROR: LeakSanitizer: detected memory leaks Direct leak of 712 byte(s) in 1 object(s) allocated from: #0 0x7f35139dc848 in __interceptor_malloc (/lib64/libasan.so.5+0xef848) #1 0x7f35136efb29 in __gf_malloc ../libglusterfs/src/mem-pool.c:136 #2 0x7f3510591ce9 in fuse_thread_proc ../xlators/mount/fuse/src/fuse-bridge.c:5929 #3 0x7f351336d58d in start_thread (/lib64/libpthread.so.0+0x858d) SUMMARY: AddressSanitizer: 712 byte(s) leaked in 1 allocation(s). updates: bz#1633930 Change-Id: Ie5b4da6b338d8e5fc770c5b2da1238e3462468ac Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* geo-rep : fix incorrectly formatted authorized_keysSunny Kumar2019-02-251-2/+2
| | | | | | | | | | | | | Problem : While Geo-rep setup when creating an ssh authorized_keys the geo-rep setup inserts an extra space before the "ssh-rsa" label. This gets flagged by an enterprise customer's security scan as a security violation. Solution: Remove extra space in GSYNCD_CMD & TAR_CMD. Change-Id: I956f938faef0e0883703bbc337b1dc2770e4a921 fixes: bz#1679401 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* build: include gluster/__init__.* files for python packagingNiels de Vos2019-02-225-1/+15
| | | | | | | | | | | | | | | | The gluster/__init__.py file was originaly part of the glupy installation. This file is required to have the python-gluster package function correctly, it is expected to provide the 'gluster' namespace for other python packages (like from the libgfapi-python project). Because glupy does not exist anymore, this file is now added to in a new extras/python directory. Change-Id: I14fe959778ee3344d7d54ba342c7928a4d8080a2 Fixes: c3fcff9ccbfcec1be242fd5cf210c9995586b078 Fixes: 8293d21280fd6ddfc9bb54068cf87794fc6be207 Updates: bz#1642810 Signed-off-by: Niels de Vos <ndevos@redhat.com>
* packaging: Obsoleting glusterfs-gnfs for upgradeSahina Bose2019-02-221-0/+6
| | | | | | | fixes: bz#1672711 Change-Id: Iad7194e788a8eeecd617614e9f8a1fe3264a384d Signed-off-by: Sahina Bose <sabose@redhat.com> Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
* glusterd: fix get-state leakAtin Mukherjee2019-02-221-0/+2
| | | | | | Updates: bz#1193929 Change-Id: I95897fd4d3102b4fa2b8b2864116b1bf24491cf9 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* md-cache: Adapt integer data types to avoid integer overflowDavid Spisla2019-02-201-3/+3
| | | | | | | | | | | | | The "struct iatt" in iatt.h is using int64_t types for storing the atime, mtime and ctime. Therefore the struct 'struct md_cache' in md-cache.c should also use this types to avoid an integer overflow. This can happen e.g. if someone uses a very high default-retention-period in the WORM-Xlator. Change-Id: I605268d300ab622b9c8ab30e459dc00d9340aad1 fixes: bz#1678726 Signed-off-by: David Spisla <david.spisla@iternity.com>
* glusterfsd: Do not process PROFILE_NFS_INFO if graph is not readyhujianfei2019-02-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | Otherwise, gnfs will crash in following situation. Also see commit 2f9e555f. Reproducible Steps: 1. kill gnfs process 2. service glusterd restart;gluster volume profile [vol] info nfs dump trace info: /lib64/libglusterfs.so.0(_gf_msg_backtrace_nomem+0xc2)[0x7fcf5cb6a872] /lib64/libglusterfs.so.0(gf_print_trace+0x324)[0x7fcf5cb743a4] /lib64/libc.so.6(+0x35670)[0x7fcf5b1d5670] /usr/sbin/glusterfs(glusterfs_handle_nfs_profile+0x114)[0x7fcf5d066474] /lib64/libglusterfs.so.0(synctask_wrap+0x12)[0x7fcf5cba1502] /lib64/libc.so.6(+0x47110)[0x7fcf5b1e7110] Fixes: bz#1677559 Change-Id: Id68edb3e4646c39544e0b4c90b5e0a9083b37b0d Signed-off-by: hujianfei <hujianfei@cmss.chinamobile.com>
* upcall: some modifications to reduce work under lockYaniv Kaul2019-02-193-138/+66
| | | | | | | | | | | | | | 1. Reduced the number of times we call time(). This may affect accuracy of access time and so on - please review carefully. I think the resolution is OK'ish. 2. Removed dead code. 3. Changed from CALLOC() to MALLOC() where it made sense. 4. Moved some bits of work outside of a lock. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I9fb8ca5d79b0e9126c1eb07e1a1ab5dbd8bf3f79
* glusterd: adding a comment for code readabilitySanju Rakonde2019-02-191-0/+10
| | | | | | | | | | Adding a comment in the source code, so that anyone reading the code will understand the changes done by d4fa29 better. fixes: bz#1654270 Change-Id: I75aff4243420c434c47d69a4b310f77bf161bb29 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* performance/write-behind: handle call-stub leaksRaghavendra Gowdappa2019-02-191-0/+8
| | | | | | Change-Id: I7be9a5f48dcad1b136c479c58b1dca1e0488166d Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com> Fixes: bz#1674406
* performance/write-behind: fix use-after-free in readdirpRaghavendra Gowdappa2019-02-191-18/+22
| | | | | | | | | | | | | | | Two issues were found: 1. in wb_readdirp_cbk, inode should unrefed after wb_inode is unlocked. Otherwise, inode and hence the context wb_inode can be freed by the type we try to unlock wb_inode 2. wb_readdirp_mark_end iterates over a list of wb_inodes of children of a directory. But inodes could've been freed and hence the list might be corrupted. To fix take a reference on inode before adding it to invalidate_list of parent. Change-Id: I911b0e0b2060f7f41ded0b05db11af6f9b7c09c5 Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com> Updates: bz#1674406
* cli : fix mem leak during cli_cmd_volume_gsync_set_cbkSunny Kumar2019-02-191-20/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes mem-leak due to excessive use of gf_asprintf to form dynamic growing string. Problem: each call to asprintf/vsprintf for extending existing string causes a memory leak, because the blob at the original address of existing string is not freed and a new location is generated by asprintf. Tracebacks: #2 0x7fdf191b8b3b in gf_vasprintf ../libglusterfs/src/mem-pool.c:236 #3 0x7fdf191b8d0a in gf_asprintf ../libglusterfs/src/mem-pool.c:256 #4 0x420cd3 in cli_cmd_volume_gsync_set_cbk ../cli/src/cli-cmd-volume.c:2576 SUMMARY: AddressSanitizer: 255 byte(s) leaked in 3 allocation(s). .... SUMMARY: AddressSanitizer: 431 byte(s) leaked in 4 allocation(s). .... SUMMARY: AddressSanitizer: 449 byte(s) leaked in 4 allocation(s). .... SUMMARY: AddressSanitizer: 397 byte(s) leaked in 4 allocation(s). .... SUMMARY: AddressSanitizer: 160 byte(s) leaked in 2 allocation(s). .... updates: bz#1633930 Change-Id: I7e8902f0ed23e640dc17e3dcbdab7ae0579d2dc6 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* tests/dht: Remove hardcoded brick pathsN Balachandran2019-02-182-3/+7
| | | | | | | | | | The tests assumed that the file is created on a particular brick.This need not be the case in all scenarios and has been removed. Change-Id: Id420f43d7f72d983a7c6f16ea8fed273d46c4824 updates: bz#1672480 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* core: implement a global thread poolXavi Hernandez2019-02-1829-56/+2858
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements a thread pool that is wait-free for adding jobs to the queue and uses a very small locked region to get jobs. This makes it possible to decrease contention drastically. It's based on wfcqueue structure provided by urcu library. It automatically enables more threads when load demands it, and stops them when not needed. There's a maximum number of threads that can be used. This value can be configured. Depending on the workload, the maximum number of threads plays an important role. So it needs to be configured for optimal performance. Currently the thread pool doesn't self adjust the maximum for the workload, so this configuration needs to be changed manually. For this reason, the global thread pool has been made optional, so that volumes can still use the thread pool provided by io-threads. To enable it for bricks, the following option needs to be set: config.global-threading = on This option has no effect if bricks are already running. A restart is required to activate it. It's recommended to also enable the following option when running bricks with the global thread pool: performance.iot-pass-through = on To enable it for a FUSE mount point, the option '--global-threading' must be added to the mount command. To change it, an umount and remount is needed. It's recommended to disable the following option when using global threading on a mount point: performance.client-io-threads = off To enable it for services managed by glusterd, glusterd needs to be started with option '--global-threading'. In this case all daemons, like self-heal, will be using the global thread pool. Currently it can only be enabled for bricks, FUSE mounts and glusterd services. The maximum number of threads for clients and bricks can be configured using the following options: config.client-threads config.brick-threads These options can be applied online and its effect is immediate most of the times. If one of them is set to 0, the maximum number of threads will be calcutated as #cores * 2. Some distributions use a very old userspace-rcu library (version 0.7) for this reason, some header files from version 0.10 have been copied into contrib/userspace-rcu and are used if the detected version is 0.7 or older. An additional change has been made to io-threads to prevent that threads are started when iot-pass-through is set. Change-Id: I09d19e246b9e6d53c6247b29dfca6af6ee00a24b updates: #532 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* auth-cache.c: minor reduction of work under lock.Yaniv Kaul2019-02-181-6/+3
| | | | | | | | | | | Minor change to reduce work done under a lock. Also, remove unused variable (unrelated to the above). Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I1dfb55823c3db7c638d8a34288423bd1faa37c32
* server.c: use dict_() funcs with key length.Yaniv Kaul2019-02-181-15/+19
| | | | | | | | | | | Changed to use the dict_() funcs which take the key length. This happens to also reduce work under the lock in one case as well. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I958fcc29e95286fe3c74178cae3f01a8b2db26f2
* socket: socket event handlers now return voidMilind Changire2019-02-186-27/+25
| | | | | | | | | | | | | | Problem: Returning any value from socket event handlers to the event sub-system doesn't make sense since event sub-system cannot handle socket sub-system errors. Solution: Change return type of all socket event handlers to 'void' Change-Id: I70dc2c57f12b7ea2fae41120f71aa0d7fe0b2b6f Fixes: bz#1651246 Signed-off-by: Milind Changire <mchangir@redhat.com>
* md-cache.c: minor reduction of work under lock.Yaniv Kaul2019-02-181-4/+3
| | | | | | | | | | Take the time before taking the lock, not under lock. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I6cd05d8556a9bcc015e1be53f6ba46854e52a380
* protocol/server: Use SERVER_REQ_SET_ERROR correctly for dictsPranith Kumar K2019-02-151-275/+236
| | | | | | | | | | Removed op_errno based SERVER_REQ_SET_ERROR() calls which was dead-code. xdr_to_dict() calls have this check which is used in 4.0 version of xdr-to-dict. fixes bz#1676797 Change-Id: I6f56907c85576f1263a6ec04ed7e37f723b01ac3 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* dht-shared.c: minor reduction of work under lock.Yaniv Kaul2019-02-141-6/+7
| | | | | | | | | | Minor changes to reduce work done under a lock. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: Ia58adfb5125129e5d1f3bbf2202f38520fdbc29f
* storage/posix: print the actual file pathRaghavendra Bhat2019-02-141-54/+75
| | | | | | | | | | | | | posix converts incoming operations on files to operations on corresponding gfid handles. While this in itself is not a problem, logging of those gfid handles in place of actual file paths can create confusions during debugging. The best way would be to print both the actual file (recieved as an argument) for path based operations and the gfid handle associated with it. Change-Id: I408c36ca6456f2e3981b93151c19ef7f60085ad6 fixes: bz#1675076 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* Fix compilation for fops-sanity.cPranith Kumar K2019-02-141-0/+1
| | | | | | | | | | | | | | | | Without this patch the following error is seen: .... warning: implicit declaration of function ‘makedev’ [-Wimplicit-function-declaration] ret = mknod("cspecial", S_IFCHR | S_IRWXU | S_IRWXG, makedev(2, 3)); ^~~~~~~ /usr/bin/ld: /tmp/ccIVwT46.o: in function `path_based_fops': /home/pk/workspace/gerrit-repo/tests/basic/fops-sanity.c:478: undefined reference to `makedev' .... updates bz#1676797 Change-Id: I8a17c38fdfd458dd2dc75f4c7e2bf20ce555a042 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* docs: fix typo in Developer Guide ReadmeCsaba Henk2019-02-141-1/+1
| | | | | | updates: bz#1193929 Change-Id: I3e13e5a2d7347cf2a4e3717e93b5e97325e2de97 Signed-off-by: Csaba Henk <csaba@redhat.com>
* cluster/dht: Request linkto xattrs in dht_rmdir opendirN Balachandran2019-02-131-1/+26
| | | | | | | | | | | | | | | | | | If parallel-readdir is enabled, the rda xlator is loaded below dht in the graph and proactively lists and caches entries when an opendir is performed. dht_rmdir checks if the directory being deleted contains stale linkto files by performing a readdirp on its child subvols. However, as the entries are actually read in during the opendir operation which does not request the linkto xattr,no linkto xattrs are present for the entries causing dht to incorrectly identify them as data files and fail the rmdir operation with ENOTEMPTY. DHT now always adds the linkto xattr in the list of xattrs requested in the opendir. Change-Id: I0711198e66c59146282eb8b88084170bedfb4018 fixes: bz#1672851 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* dht: fix double extra unref of inode at heal pathKinglong Mee2019-02-131-1/+1
| | | | | | | | | The loc_wipe is done in the _out_ section, inode_unref(loc.parent) here casues a double extra unref of loc.parent. Change-Id: I2dc809328d3d34bf7b02c7df9a4f97788af511e6 updates: bz#1651439 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com>
* cluster/dht: Fix lookup selfheal and rmdir raceN Balachandran2019-02-131-9/+25
| | | | | | | | | | | | | | A race between the lookup selfheal and rmdir can cause directories to be healed only on non-hashed subvols. This can prevent the directory from being listed from the mount point and in turn causes rm -rf to fail with ENOTEMPTY. Fix: Update the layout information correctly and reduce the call count only after processing the response. Change-Id: I812779aaf3d7bcf24aab1cb158cb6ed50d212451 fixes: bz#1676400 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* inode: make critical section smallerAmar Tumballi2019-02-133-217/+111
| | | | | | | | | | | | | | | | do all the 'static' tasks outside of locked region. * hash_dentry() and hash_gfid() are now called outside locked region. * remove extra __dentry_hash exported in libglusterfs.sym * avoid checks in locked functions, if the check is done in calling function. * implement dentry_destroy(), which handles freeing of dentry separately, from that of dentry_unset (which takes care of separating dentry from inode, and table) Updates: bz#1670031 Change-Id: I584213e0748464bb427fbdef3c4ab6615d7d5eb0 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* tests/dht: Stop volume before unmounting bricksN Balachandran2019-02-131-1/+7
| | | | | | | | | The bricks are loopback devices. Unmounting them is done before the cleanup and leads to "target is busy" messages. Change-Id: Ia808c2c9580273e1bf0595ecf53c210847c44577 fixes: bz#1676736 Signed-off-by: N Balachandran <nbalacha@redhat.com>
* rfc.sh: fix the missing rebase issueAmar Tumballi2019-02-131-38/+1
| | | | | | | | | | | | | | | | | | When we decided to use clang-format for coding-style, and not bother about local `check-patch.pl`, we had commented out coding style check method in `./rfc.sh`. While it was intended and valid, we missed to see one major issue with that. `git fetch` command, which fetched latest code of the project, was inside the check_patches method, which also got missed. Even though we had an explicit 'rebase_orgin' method, it did nothing because the git fetch was not done before this. Now, calling an explicit git fetch, and removing dead code of check patches, as we are all fine with coding-style changes in last 4+ months. updates: bz#1193929 Change-Id: I3779096a527b93e780858ada8d988fdcdd6e2928 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* afr/shd: Cleanup self heal daemon resources during afr finiMohammed Rafi KC2019-02-123-0/+67
| | | | | | | | | We were not properly cleaning self-heal daemon resources during afr fini. This patch will clean the same. Change-Id: I597860be6f781b195449e695d871b8667a418d5a updates: bz#1659708 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
* performance/md-cache: change the op-version of "global-cache-invalidation"Raghavendra Gowdappa2019-02-122-2/+2
| | | | | | | | | Since release-6 is not done yet, this option can be introduced with GD_OP_VERSION_6_0. Change-Id: I8a0867e5b8b23d0d485704a2fc7a3efc4a90f637 Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com> updates: bz#1664934
* clnt/rpc: ref leak during disconnect.Mohammed Rafi KC2019-02-123-12/+47
| | | | | | | | | | During disconnect cleanup, we are not cancelling reconnect timer, which causes a ref leak each time when a disconnect happen. Change-Id: I9d05d1f368d080e04836bf6a0bb018bf8f7b5b8a updates: bz#1659708 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
* fuse: reflect the actual default for lru-limit optionAmar Tumballi2019-02-112-2/+2
| | | | | | | | in both `--help` text and man page updates: bz#1193929 Change-Id: I9aa9367c6863ac8e2403255280697c9e6be26cf0 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* performance/md-cache: introduce an option to control invalidation of inodesRaghavendra Gowdappa2019-02-112-10/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicit invalidation by calling inode_invalidate is necessary when same (meta)data is shared/access across multiple mounts. Without an explicit inode_invalidate call, caches in the mount which didn't witness writes wouldn't be aware of changes as writes wouldn't have passed through them. However, if (meta)data is not shared, all relevant I/O goes through the cache of single mount and hence is coherent with (meta)data on bricks always. So, explicit inode invalidation can be disabled for this case which gives a huge performance boost for workloads that write data and then immediately read the data they just wrote. Note that otherwise, local writes (which pass through the cache) will change ctime and cause unnecessary invalidations. The name of the option that controls this behavior is "performance.global-cache-invalidation". This option is global and it purges caches both in glusterfs and kernel stack for native FUSE mounts. For non-native FUSE mounts, it purges cache only from glusterfs stack. This option is effective only when performance.stat-prefetch is on. Note that there is a similar option "performance.cache-invalidation", but the scope of that option is limited to quick-read and md-cache. Change-Id: I462bb4b65ff9aae1f6ba76f50b1f2f94fb10323b Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com> updates: bz#1664934
* inode: create inode outside locked regionAmar Tumballi2019-02-111-11/+13
| | | | | | | | | Only linking of inode to the table, and inserting it in a list needs to be in locked region. Updates: bz#1670031 Change-Id: I6ea7e956b80cf2765c2233d761909c4bf9c7253c Signed-off-by: Amar Tumballi <amarts@redhat.com>
* mount/fuse: fix bug related to --auto-invalidation in mount scriptRaghavendra Gowdappa2019-02-091-1/+1
| | | | | | | | | | | | When "auto-invalidation" option was not specified for mount script, glusterfs cmdline ended with "--auto-invalidation=" option. This patch fixes that bug in mount script. Thanks to Amar for reporting it. Change-Id: Ie5cd4c6ffb3ac644d9d2b032035f914a935d05a8 Signed-off-by: Raghavendra Gowdappa <rgowdapp@redhat.com> updates: bz#1664934
* glusterd: improve loggingAtin Mukherjee2019-02-081-1/+3
| | | | | | | | | glusterd_resolve_all_bricks failure log should highlight the brick identifier. Updates: bz#1193929 Change-Id: I035b4650ef6a14bb1e1221d3bad1c40f9d43dbdd Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* api: Update all future API versions to rel-6ShyamsundarR2019-02-075-75/+73
| | | | | | | | | | As release 6 is branched, all future APIs now become 6.0 This change implements the same. Change-Id: I6db368b4dc8585278ec11d4a411adcd04635de53 Updates: bz#1193929 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* fuse: correctly handle setxattr valuesXavi Hernandez2019-02-073-8/+42
| | | | | | | | | | The setxattr function receives a pointer to raw data, which may not be null-terminated. When this data needs to be interpreted as a string, an explicit null termination needs to be added before using the value. Change-Id: Id110f9b215b22786da5782adec9449ce38d0d563 updates: bz#1193929 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* Bump up timeout for tests on AWSNigel Babu2019-02-073-3/+4
| | | | | | Fixes: bz#1672727 Change-Id: I2b9be45f199f6436b858536c6f49be85902217f0 Signed-off-by: Nigel Babu <nigelb@redhat.com>
* glusterd: Update op-version for release 7ShyamsundarR2019-02-051-1/+3
| | | | | | Change-Id: I0f3978d7e603e6e767dc7aa2a23ef35b1f2b43f7 Updates: bz#1193929 Signed-off-by: ShyamsundarR <srangana@redhat.com>
* glusterd: get-state command should not fail if any brick is gone badv7devSanju Rakonde2019-02-052-5/+7
| | | | | | | | | | | | | | | | | | | | | | Problem: get-state command will error out, if any of the underlying brick(s) of volume(s) in the cluster go bad. It is expected that get-state command should not error out, but should generate an output successfully. Solution: In glusterd_get_state(), a statfs call is made on the brick path for every bricks of the volumes to calculate the total and free memory available. If any of statfs call fails on any brick, we should not error out and should report total memory and free memory of that brick as 0. This patch also handles a statfs failure scenario in glusterd_store_retrieve_bricks(). fixes: bz#1672205 Change-Id: Ia9e8a1d8843b65949d72fd6809bd21d39b31ad83 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* geo-rep: Fix configparser import issueKotresh HR2019-02-051-2/+2
| | | | | | | | | | | | | | | 'configparser' is backported to python2 and can be installed using pip (pip install configparser). So trying to import 'configparser' first and later 'ConfigParser' can cause issues w.r.t unicode strings. Always try importing 'ConfigParser' first and then 'configparser'. This solves python2/python3 compat issues. Change-Id: I2a87c3fc46476296b8cb547338f35723518751cc fixes: bz#1671637 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* cli: Added the group option for volume setRinku Kothiya2019-02-041-0/+5
| | | | | | | | | | | gluster volume set <VOLUME> group <GROUP> is used for setting multiple pre-defined volume options, but this was undocumented. This patch doc- ments this feature. fixes: bz#1243991 Change-Id: Id346cf2537f85179caff32479f09555ce2e72e76 Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>