Commit Graph

538 Commits

Author SHA1 Message Date
Ashish Pandey
3bcf210a5a rpm: add thin-arbiter package
Discussion on thin arbiter volume -
https://github.com/gluster/glusterfs/issues/352#issuecomment-350981148

Main idea of having this rpm package is to deploy thin-arbiter
without glusterd and other commands on a node, and all we need
on that tie-breaker node is to run a single glusterfs command.
Also note that, no other glusterfs installation needs
thin-arbiter.so.

Make sure RPM contains sample vol file, which can work by default,
and a script to configure that volfile, along with translator image.

Change-Id: Ibace758373d8a991b6a19b2ecc60c93b2f8fc489
updates: bz#1672818
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
(cherry picked from commit ca9bef7f1538beb570fcb190ff94f86f0b8ba38a)
2019-03-13 01:48:26 +00:00
Niels de Vos
fce763a6fc build: include gluster/__init__.* files for python packaging
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.

Backport of commit b235a56394c09bb1d7308a620053dbe098d15967:
> Change-Id: I14fe959778ee3344d7d54ba342c7928a4d8080a2
> Fixes: c3fcff9ccb
> Fixes: 8293d21280
> Updates: bz#1642810
> Signed-off-by: Niels de Vos <ndevos@redhat.com>

Change-Id: I04e1e0dc4022b53c02053d5452f305b78e56c389
Updates: bz#1680585
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2019-02-25 11:16:43 +00:00
Vijay Bellur
aa85b54c6f extras/systemd: Remove socket activated syslog.target and add documentation keys
Adopting patch provided by Patrick Matthäi <pmatthaei@debian.org> at:

https://bugzilla.redhat.com/attachment.cgi?id=1470751

fixes: bz#1560561
Change-Id: I363a049c743c65823e6c4f153cbe20b47fcb64fb
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
2019-01-11 07:30:06 +00:00
Anoop C S
f6d0141b47 extras: Add readdir-ahead to samba group command
Change-Id: I310f014a9ab8416d9833f5711ff902da1457f415
updates: bz#1193929
Signed-off-by: Anoop C S <anoopcs@redhat.com>
2019-01-04 01:48:23 +00:00
Atin Mukherjee
f9220c89ae glusterd: define max-port to 60999
As glusterd scans through all the ports in its defined range, with RHEL
7.3 onwards any port beyond 60999 isn't within the ephemeral port range
and following AVC denial message is seen.

type=AVC msg=audit(1471946614.154:109): avc:  denied  { name_bind } for
pid=2302 comm="glusterd" src=61000 scontext=system_u:system_r:glusterd_t:s0
tcontext=system_u:object_r:ephemeral_port_t:s0 tclass=tcp_socket

Fix is to define the max port range to 60999 in glusterd.vol file. The
port range can be tweaked through a reconfigure of this configuration
file though.

Fixes: bz#1659857
Change-Id: I60fd4a421d8509b8dca4ca13b73999ae33965f72
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2018-12-18 04:42:31 +00:00
Sunny Kumar
822779332e geo-rep : fix slave volume read-only option
Problem: When separate ssh key is given for non root user setting slave volume
         read-only option results in failure.

Solution: Check for extra param in case separate key is given for non-root user
          and take action accordingly.

Change-Id: Iafe9a2aa6b86cde1dcd7d63771048a6ae33c2cde
fixes: bz#1659971
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
2018-12-17 17:21:51 +00:00
Anoop C S
a6a5f7aa6f extras: New group volume set command for Samba integration
# gluster volume set <VOLNAME> group samba

List of volume set options from group-samba are aimed at improving the below
workloads which consumes time and network hops in SMB world:

* Listing of large directories
* Negative lookups during creation of files  

Caching the necessary metadata required for these workloads saves us time and
network hops. On the other side we have to ensure correctness(avoiding stale
cache) in caching(via md-cache) with the help of cache invalidation in an
environment where multiple client access is expected.

Change-Id: Icdd2d8e5eb290e12bc509105418c668f432f4eae
fixes: bz#1656771
Signed-off-by: Anoop C S <anoopcs@redhat.com>
2018-12-14 05:13:40 +00:00
Harpreet Kaur
6e92171117 geo-rep: Make slave volume read-only (by default)
Added a command to set "features.read-only" option
to a default value "on" for slave volume.
Changes are made in:
$SRC//extras/hook-scripts/S56glusterd-geo-rep-create-post.sh
for root geo-rep and
$SRC/geo-replication/src/set_geo_rep_pem_keys.sh
for non-root geo-rep.

Fixes: bz#1654187

Change-Id: I15beeae3506f3f6b1dcba0a5c50b6344fd468c7c
Signed-off-by: Harpreet Kaur <hlalwani@redhat.com>
2018-12-07 09:37:54 +00:00
ShyamsundarR
20ef211cfa libglusterfs: Move devel headers under glusterfs directory
libglusterfs devel package headers are referenced in code using
include semantics for a program, this while it works can be better
especially when dealing with out of tree xlator builds or in
general out of tree devel package usage.

Towards this, the following changes are done,
- moved all devel headers under a glusterfs directory
- Included these headers using system header notation <> in all
code outside of libglusterfs
- Included these headers using own program notation "" within
libglusterfs

This change although big, is just moving around the headers and
making it correct when including these headers from other sources.

This helps us correctly include libglusterfs includes without
namespace conflicts.

Change-Id: Id2a98854e671a7ee5d73be44da5ba1a74252423b
Updates: bz#1193929
Signed-off-by: ShyamsundarR <srangana@redhat.com>
2018-12-05 21:47:04 +00:00
Krutika Dhananjay
040a1dbcf6 extras: Add group-distributed-virt for single-brick ovirt-gluster use-case
Change-Id: I930011327332b7ba30cc76f614efaf5932eb4f3d
fixes: bz#1654138
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
2018-12-05 04:00:14 +00:00
Milan Zink
9b770760d9 Do not blindly add volume share section to smb.conf
With this change, by default GlusterFS volume share section will
no longer be added to smb.conf for client access unless user.cifs
or user.smb volume set options are enabled. This also fixes the
hook script to check for presence of all configuration possibilities
for those volume set options like 'enable' or 'on'.

Change-Id: Ibecf7fffb4507d7255d963c3b1482afb0d0db984
Signed-off-by: Milan Zink <mzink@redhat.com>
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Fixes: bz#1575836
2018-12-04 16:36:53 +00:00
Kotresh HR
33e96100e1 georep: python2 to python3 compat - scheduler
1. scheduler - Popen
2. syncdutils - corner case on failure

fixes: bz#1643932
Change-Id: I65af97a244a8790e976acedc2728db6ebbf2ae10
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2018-10-30 13:12:46 +00:00
Kotresh HR
bae5841487 cliutils: python2 to python3 compat
Make Popen py2 and py3 compatiable

fixes: bz#1643935
Change-Id: Ife34cb38024dcdc0420436e7d76fd208223f9d86
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2018-10-30 05:55:33 +00:00
Sunny Kumar
8d4c5e022b cliutils : python2 to python3 compat
This patch fixes import issue in cliutils.

Provided solution is to use relative import.

Change-Id: I14c9a0b528ef52e7c91f6b17b569c68c2ced8912
updates: #411
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
2018-10-09 18:11:39 +00:00
Pranith Kumar K
73bb13e7bc extras: Script to collect system-stats
For debugging performance issues we found that this script is very
useful.  Script collects the stats of vmstat/iostat/top/sar to get
metrics about memory/disk/cpu/network respectively at the configured
interval. It is very important to collect all these metrics at the
same time so that they can be correlated easily, so made this into a
script

fixes bz#1633926
Change-Id: Iea52e55179b21c505953722c8898293fe92cb8de
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
2018-10-09 15:30:25 +00:00
Kaleb S. KEITHLEY
860a990811 packaging: remove RHEL5-isms from glusterfs.spec(.in)
CentOS5 too

It's been a couple of years since we stopped doing anything with
RHEL/CentOS 5

Change-Id: I83e78fa84b93fa5baddaf3fab92736d692a9bbca
updates: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-10-08 16:35:27 +00:00
Niels de Vos
8a4b6f079b python: remove shebangs of non-main scripts and make others executable
Some of the scripts that have a #!/usr/bin/python3 shebang do not have a
main() like function. These scripts will not get executed but only
imported. They do not need the shebang.

A few others are not installed with 'make install', but do have a main()
like function. These scripts are expected to be used by developers for
different tasks (mostly code generation). Marking these scripts
executable to make it easier to identify them.

Change-Id: I73541471deb7e0830766b804786244e73dfe4221
Updates: #411
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2018-10-02 11:19:28 +00:00
Amar Tumballi
c96778b354 rpc: make binding to port 0 as the default if no option is provided
Right now, if no option is provided, the default port is assumed,
which is 24007. Ideally, for 'glusterfsd' processes, it is better
to not assume there are any ports given, so it can start listening
on any port which is available.

This helps us to cleanup the dependencies on glusterd from glusterfsd
at the moment. No changes would be done to glusterd code, but making
the right defaults helps to make glusterfsd more independent process
later.

NOTE: This patch is a reduced version of below set of patches:
 * https://review.gluster.org/14613/ &
 * https://review.gluster.org/14670/ &
 * https://review.gluster.org/14671/

Credits: Prasanna Kumar Kalever <pkalever@redhat.com>

updates: bz#1343926
Change-Id: Ib874e10505e7366dc56ba754458252b67052e653
Signed-off-by: Amar Tumballi <amarts@redhat.com>
2018-10-02 11:07:32 +00:00
Xavi Hernandez
81ea27c82c Update database profile group
Some performance testing has revealed that pgbench performs 3x better
when these options are set:

performance.client-io-threads=on
performance.open-behind=on
performance.read-after-open=yes
server.event-threads=4
client.event-threads=4

Change-Id: I36ce389f893a8af13aac5f8285104d749b73d098
fixes: bz#1631886
Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
2018-09-24 17:55:42 +00:00
Nigel Babu
8297b909ab python3: Fix python3 compatibility
Updates: #411
Change-Id: I7c1eaa92cd4ac05c3667b760e0db2cddcfbbaed8
Signed-off-by: Nigel Babu <nigelb@redhat.com>
2018-09-24 03:43:39 +00:00
Krutika Dhananjay
3de6ba0cd3 extras: Add new options to group "virt"
In some of the recent performance tests on gluster-as-vm-image-store
use-case, it has been observed that sometimes the lone fuse thread can
hit near-100% CPU utilization and become a performance bottleneck.
Enabling client-io-threads (in addition to bumping up epoll threads on
server and client side) has shown to be helpful in getting around this
bottleneck and pushing more IOPs.

Change-Id: I231db309de0e37c79cd44f5666da4cd776fefa04
fixes: bz#1630798
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
2018-09-21 04:15:58 +00:00
Milind Changire
1e02ab9eb3 extras/devel-tools: script to strace processes
Script to strace processes at high priority.
Script should be run at high priority, like nice value of -19, to help
get a trace of a run-away process consuming high CPU.

eg.
$ nice -n -19 ./strace-brick.sh glusterfsd 50

will strace glusterfsd processes for 60 seconds which are consuming a
minimum of 50% CPU.

Change-Id: I6374054c7342b19122a3588d982388199f955930
BUG: 1427397
Signed-off-by: Milind Changire <mchangir@redhat.com>
2018-09-19 03:30:20 +00:00
Amar Tumballi
a7a7d3bd1c logrotate: utilize the new 'maxsize' option
Since logrotate 3.8.x version, a new option 'maxsize' is supported,
which helps in rotating the logs before the specified time if the
size exceeds maxsize limit. This should help in reducing the
overflow of gluster logs.

Updates: bz#1193929
Change-Id: Id33c34d72f1931e7996893de9338db667e1e900d
Signed-off-by: Amar Tumballi <amarts@redhat.com>
2018-09-19 03:29:59 +00:00
Milind Changire
86f1aa94c1 extras/devel-tools: script to resolve backtraces
print-backtrace.sh
script to resolve backtraces

Change-Id: I24688ae5160cc706d9f4794521d17290bef6765b
BUG: 1486532
Signed-off-by: Milind Changire <mchangir@redhat.com>
2018-09-18 09:11:30 +00:00
Anoop C S
76cb1e761d extras/hooks: General improvements to S30samba-start.sh
Based on https://review.gluster.org/c/glusterfs/+/19204 from
Milan Zink <mzink@redhat.com>

Change-Id: I61f62407a62475a74a6cc046c24748a31c66e6cd
Updates: bz#1193929
Signed-off-by: Anoop C S <anoopcs@redhat.com>
2018-09-14 07:09:38 +00:00
Gluster Ant
e16868dede Land part 2 of clang-format changes
Change-Id: Ia84cc24c8924e6d22d02ac15f611c10e26db99b4
Signed-off-by: Nigel Babu <nigelb@redhat.com>
2018-09-12 17:52:45 +05:30
Kaleb S. KEITHLEY
5afff66b25 misc: fix misc. shebangs
* One #!/usr/bin/env python and three #!/usr/bin/python were overlooked
  in all the other python fixups. Ugh.

* Two new python files missed the memo about #!/usr/bin/python3.

* One #!/usr/bin/env bash.
  Various distribution packaging policies have strong wording about
  the use of #!/usr/bin/env ...

  Note: this patch does not change the use of #!/usr/bin/env bash in
  the two files extras/{clang-checker.sh,check_goto.pl} as these are
  not included in any packages. (Although I'm not actually sure why
  anyone would ever use '/usr/bin/env {sh,bash}' as I'm not aware of
  any version-specific differences like there are with, e.g., python.)

* One #!/usr/bin/bash.
  On Fedora and CentOS > 6, /bin is a symlink to /usr/bin, so it
  makes little difference. But Debian & Ubuntu still have separate
  /bin and /usr/bin; and sh and bash are in /bin, not /usr/bin.
  (Historically, in BSD and SYSV Unix it was /bin/sh.)

  Note: Fedora and CentOS package build runs a script that converts
  all /bin/sh and /bin/bash to /usr/bin/sh and /usr/bin/bash.

Change-Id: I9171265829af78dd0cd7622c22b56d22179ff8a3
updates: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-09-11 04:25:17 +00:00
Amar Tumballi
a105b25915 classification: provide infra to start labelling features/components
`doc/xlator-classification.md` talks about the reasoning and expectations

Reviewers are expected to check the 'category' of new
option / translator added in the codebase, and make sure the flag
is always properly set. It helps to keep the 'expectation' proper
on the codebase.

updates: #430
Change-Id: I2bfc9934a5f6eed77fcc3e20364046242decc82c
Signed-off-by: Amar Tumballi <amarts@redhat.com>
2018-09-04 09:15:49 +00:00
Yaniv Kaul
5276e8f27e multiple files: calloc -> malloc
xlators/cluster/stripe/src/stripe-helpers.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible

xlators/cluster/dht/src/tier.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
xlators/cluster/dht/src/dht-layout.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
xlators/cluster/dht/src/dht-helper.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
xlators/cluster/dht/src/dht-common.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
xlators/cluster/afr/src/afr.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
xlators/cluster/afr/src/afr-inode-read.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
tests/bugs/replicate/bug-1250170-fsync.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
tests/basic/gfapi/gfapi-async-calls-test.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
tests/basic/ec/ec-fast-fgetxattr.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
rpc/xdr/src/glusterfs3.h: Move to GF_MALLOC() instead of GF_CALLOC() when possible
rpc/rpc-transport/socket/src/socket.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
rpc/rpc-lib/src/rpc-clnt.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
extras/geo-rep/gsync-sync-gfid.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
cli/src/cli-xml-output.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
cli/src/cli-rpc-ops.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
cli/src/cli-cmd-volume.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
cli/src/cli-cmd-system.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
cli/src/cli-cmd-snapshot.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
cli/src/cli-cmd-peer.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible
cli/src/cli-cmd-global.c: Move to GF_MALLOC() instead of GF_CALLOC() when possible

It doesn't make sense to calloc (allocate and clear) memory
when the code right away fills that memory with data.
It may be optimized by the compiler, or have a microscopic
performance improvement.

In some cases, also changed allocation size to be sizeof some
struct or type instead of a pointer - easier to read.
In some cases, removed redundant strlen() calls by saving the result
into a variable.

1. Only done for the straightforward cases. There's room for improvement.
2. Please review carefully, especially for string allocation, with the
terminating NULL string.

Only compile-tested!

updates: bz#1193929
Original-Author: Yaniv Kaul <ykaul@redhat.com>
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Signed-off-by: Amar Tumballi <amarts@redhat.com>

Change-Id: I16274dca4078a1d06ae09a0daf027d734b631ac2
2018-09-04 05:09:09 +00:00
Kaleb S. KEITHLEY
af0d5a9b53 core: python3
see https://review.gluster.org/#/c/19788/,
    https://review.gluster.org/#/c/19871/,
    https://review.gluster.org/#/c/19952/,
    https://review.gluster.org/#/c/20104/,
    https://review.gluster.org/#/c/20162/,
    https://review.gluster.org/#/c/20185/,
    https://review.gluster.org/#/c/20207/,
    https://review.gluster.org/#/c/20227/,
    https://review.gluster.org/#/c/20307/,
    https://review.gluster.org/#/c/20320/,
    https://review.gluster.org/#/c/20332/,
    https://review.gluster.org/#/c/20364/,
    https://review.gluster.org/#/c/20441/, and
    https://review.gluster.org/#/c/20484

shebangs changed from /usr/bin/python2 to /usr/bin/python3.
(Reminder, various distribution packaging guidelines require use
of explicit python version and don't allow '#!/usr/bin/env python',
regardless of how handy that idiom may be.)

glusterfs.spec(.in) package python{2,3}-gluster and python2 or
python3 dependencies as appropriate.

configure(.ac):
+ test for and use python2 or python3 as appropriate. If build
  machine has python2 and python3, use python3. Override by
  setting PYTHON=/usr/bin/python2 when running configure.
+ PYTHONDEV_CPPFLAGS from python[23]-config --includes is a
  better match to the original python sysconfig.get_python_inc().
  All those other extraneous flags breaks the build.
+ Only change the shebangs once. Changing them over and over
  again, e.g., during a `make glusterrpms` in extras/LinuxRPM
  just sends make (is it really make that's looping?) into an
  infinite loop. If you figure out why, let me know.
+ Oldest python2 is python2.6 on CentOS 6 and Debian 8 (Jessie).
  Everything else has 2.7 or 3.x
+ logic from https://review.gluster.org/c/glusterfs/+/21050, which
  needs to be removed/merged after that patch is merged.

Builds on CentOS 6, CentOS 7, Fedora 28, Fedora rawhide, and the
mysterious RHEL > 7.

Change-Id: Idae21d3b6f58b32372e1daa0d234e491e563198f
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-09-03 09:14:44 +00:00
Ashish Pandey
19436f2e5f thin arbiter: set notify-contention option to yes
If this option is "ON' and if there is a lock contention for
a file from 2 clients/self-heal daemon, an up call will
be sent to all the clients holding that locks. Clients
can handle this notification and may release the locks
at the right time asap.

If this option is ON, we get "instant" lock contention
notification on client side.

In next version of thin arbiter,  we need to implement
lock contention notification handling and two domain
locking to synchronize update/access of xattrs of thin arbiter
replica id file. This option is an efficient way to find
out lock contention. In this case it is also helping to
implement two domain locking for replica id file.

Change-Id: I69883898d52feb425dfceb31cf12fa2157aaa314
fixes bz#1609207
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
2018-08-31 06:50:22 +00:00
Yaniv Kaul
7e229cf1d5 extras/geo-rep/gsync-sync-gfid.c: move from strlen() to sizeof()
For const strings, just do compile-time size calc instead of runtime.

Compile-tested only!

Change-Id: I89470016389a4ecb3bed35a1c9e684f5fae79997
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
2018-08-25 06:23:49 +00:00
Mark Mielke
89545e745e Bash integration script should namespace variables
In the original submitted script, it looks like there was effort
put into namespacing all global variables. However a few mistakes
remained.

GLUSTER_TOP_SUBOPTIONSx were defined, but TOP_SUBOPTIONSx were
referenced. This was likely an unrecognized defect in the
original code submission? These are now corrected to refer to
GLUSTER_TOP_SUBOPTIONSx.

FINAL_LIST, LIST, and TOP were leaked into all Bash shells and
used by the command completion functions. The most problematic
of these was TOP, which was declared with "-i" making it an
integer. This cause other code which used TOP to define a path
to fail like this:

    $ bash
    $ TOP=/abc
    bash: /abc: syntax error: operand expected (error token is "/abc")

These are now qualified as GLUSTER_FINAL_LIST, GLUSTER_LIST, and
GLUSTER_TOP to reduce impact on scripts that might choose to use
these extremely common variable names.

Change-Id: Ic96eda8efd1f3238bbade6c6ddb69118e8d82158
Fixes: bz#1425325
Signed-off-by: Mark Mielke <mark.mielke@gmail.com>
2018-08-15 05:44:34 +00:00
Kotresh HR
9e96d64653 geo-rep/hook-script: Fix ssh/scp options
Always use ssh and scp with "-oPasswordAuthentication=no"
and "-oStrictHostKeyChecking=no" options. It might hang
the post script otherwise leading geo-rep setup failure

Also increased geo-rep timeout. Occasionally, it's taking
more time to reach Active/Passive status. Especially, the
first start after create.

fixes: bz#1610405
Change-Id: I9560d64dbe0edf5db73446a9fc97dda19b88d233
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2018-08-03 03:18:58 +00:00
Yaniv Kaul
621138ce76 All: run codespell on the code and fix issues.
Please review, it's not always just the comments that were fixed.
I've had to revert of course all calls to creat() that were changed
to create() ...

Only compile-tested!

Change-Id: I7d02e82d9766e272a7fd9cc68e51901d69e5aab5
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
2018-07-22 14:40:16 +00:00
Nigel Babu
1dd71ff8ad extras: Remove the prot_filter.py code
This code was meant to work with the protection xlator which was removed
in Nov 2016. Unfortunately, this file remained and should be removed as
well.

Change-Id: Ia6daa06542ebc8c6fb935c352cc19924f3bb3d8a
Fixes: bz#1598390
Signed-off-by: Nigel Babu <nigelb@redhat.com>
2018-07-19 06:20:32 +00:00
Kaleb S. KEITHLEY
e4f6d88752 build/core: location of xattr.h
starting with libattr-devel-2.4.48-1 in Fedora 28 <attr/xattr.h> has
been removed from the package.

On Fedora, RHEL/CentOS, and SUSE, the glibc-headers package has provided
a near identical file, <sys/xattr.h>, in all the releases that we care
about.

On Debian, libc6-dev provides <sys/xattr.h> all the way back to 8/Jessie
and presumably all Ubuntu derivatives since then.

Note that on Debian the sys headers are installed in
/usr/include/$DEB_HOST_GNU_TYPE/sys/...

Change-Id: Id07c4b225bdaa6556bd54772604e75b8f346fb60
updates: bz#1193929
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-07-18 11:05:27 +00:00
dkhandel
6857d80a50 Add the tab space in the list of BROKEN_TESTS environment variable
Fixes: bz#1598325

Change-Id: I4c14514d33288fd33cca903853c6d5e4f70bd441
Signed-off-by: Deepshikha Khandelwal <dkhandel@redhat.com>
2018-07-18 04:10:05 +00:00
Nigel Babu
42cf8a5f92 testing: Fix the build environment
The build environment for FB is vastly different from us. This change
will match the config to what we use for our regression testing

Change-Id: Ib3584a02dbffb75892f2cbeebcbf51cc3aff3eb6
Fixes: bz#1601390
Signed-off-by: Nigel Babu <nigelb@redhat.com>
2018-07-17 05:27:18 +00:00
Kotresh HR
271510b09d geo-rep/scheduler: Fix EBUSY trace back
Fix the trace back during temporary mount
cleanup. Temporary mount is done to touch
the root required for checkpoint to complete.

fixes: bz#1598977
Change-Id: I97fea538e92c4ef0747747e981ef98499504e336
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2018-07-12 15:13:42 +00:00
Kaleb S. KEITHLEY
970ea7a919 core/various: python3 compat, prepare for python2 -> python3
see https://review.gluster.org/#/c/19788/,
    https://review.gluster.org/#/c/19871/,
    https://review.gluster.org/#/c/19952/,
    https://review.gluster.org/#/c/20104/,
    https://review.gluster.org/#/c/20162/,
    https://review.gluster.org/#/c/20185/,
    https://review.gluster.org/#/c/20207/,
    https://review.gluster.org/#/c/20227/,
    https://review.gluster.org/#/c/20307/,
    https://review.gluster.org/#/c/20320/,
    https://review.gluster.org/#/c/20332/,
    https://review.gluster.org/#/c/20364/, and
    https://review.gluster.org/#/c/20441/

Fixes some overlooked string.join()s:
+ AFAICT extras/profiler/glusterfs-profiler, extras/prot_filter.py,
extras/rebalance.py, and extras/volfilter.py would only manifest at
runtime.
+ xlators/experimental/fdl/src/gen_recon.py is a build-time error when
using python3 during the build, thus was not noticed previously when
building with python2.
+ extras/create_new_xlator/generate_xlator.py seems to be example code
and does not affect the build or runtime AFAICT

Note: Fedora packaging guidelines and SUSE rpmlint require explicit
shebangs; popular practices like #!/usr/bin/env python and #!/usr/bin/python
are not allowed; they must be #!/usr/bin/python2 or #!/usr/bin/python3

Note: Selected small fixes from 2to3 utility. Specifically apply,
basestring, funcattrs, has_key, idioms, map, numliterals, raise,
set_literal, types, urllib, and zip have already been applied. Also
version agnostic imports for urllib, cpickle, socketserver, _thread,
queue, etc., suggested by Aravinda in https://review.gluster.org/#/c/19767/1

Note: these 2to3 fixes report no changes are necessary: asserts, buffer,
exec, execfile, exitfunc, filter, getcwdu, imports2, input, intern,
itertools, metaclass, methodattrs, ne, next, nonzero, operator, paren,
raw_input, reduce, reload, renames, repr, standarderror, sys_exc, throw,
tuple_params, xreadlines.

Change-Id: Ia1fe2958d136f4303e30f7e7e86b6fe7d7b52c81
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-07-12 04:38:57 +00:00
Josiah
f4497ee445 Update mount-shared-storage.sh to automatically include all enabled glusterfs mounts in fstab
Currently the mount-shared-storage.sh script requires manual entry of each volume and mount point. There is a TODO item from Bug 1452527 to automatically pull the list of glusterfs mounts from the /etc/fstab file, validate that they are mounted, or attempt to mount them. This is to complete that TODO item.

The extras/mount-shared-storage.sh file has been updated to read only active glusterfs mounts from the /etc/fstab file, verify if they are mounted, and attemt to mount them if they are not. It will exit with a status 0 if successfully mounted or status 1 if any of the mounts fail.

This method will allow the standard method of mounts in /etc/fstab to be utilized and will ensure they are monted following system reboots.

This can be tested by creating a volume, mounting it using the /etc/fstab method, and rebooting the server. Output will be similar to this:
Jun 29 19:09:38 localhost systemd[1]: Starting Mount glusterfs sharedstorage...
Jun 29 19:09:43 localhost mount-shared-storage.sh[4096]: /mnt/mount1 has been mounted
Jun 29 19:09:48 localhost mount-shared-storage.sh[4096]: /mnt/mount2 has been mounted
Jun 29 19:09:48 localhost systemd[1]: Started Mount glusterfs sharedstorage.

Multiple fixes based on code review suggestions and spellcheck

Removed spaces in grep for glusterfs as tabs are valid as well

Added tab as an IFS field separator for the lines read from /etc/fstab

Increased sleep time to 10 seconds before mount validation

Changed mount check to use “mountpoint -q”

Change-Id: Ib90c99ced8f7aefc8dbe87340afc73a28f6195e7
fixes: bz#1596789
Signed-off-by: Josiah <josiahp@gmail.com>
2018-07-10 19:38:48 +00:00
Kaleb S. KEITHLEY
55d1b0531a core/various: python3 compat, prepare for python2 -> python3
see https://review.gluster.org/#/c/19788/,
    https://review.gluster.org/#/c/19871/,
    https://review.gluster.org/#/c/19952/,
    https://review.gluster.org/#/c/20104/,
    https://review.gluster.org/#/c/20162/,
    https://review.gluster.org/#/c/20185/,
    https://review.gluster.org/#/c/20207/,
    https://review.gluster.org/#/c/20227/,
    https://review.gluster.org/#/c/20307/,
    https://review.gluster.org/#/c/20320/,
    https://review.gluster.org/#/c/20332/, and
    https://review.gluster.org/#/c/20364/

Fixes glupy.py python2isms, iteritems -> items, and some overlooked 
print() in georep/peer_mountbroker.in

Note: Fedora packaging guidelines and SUSE rpmlint require explicit
shebangs; popular practices like #!/usr/bin/env python and #!/usr/bin/python
are not allowed; they must be #!/usr/bin/python2 or #!/usr/bin/python3

Note: Selected small fixes from 2to3 utility. Specifically apply,
basestring, funcattrs, has_key, idioms, map, numliterals, raise,
set_literal, types, urllib, and zip have already been applied. Also
version agnostic imports for urllib, cpickle, socketserver, _thread,
queue, etc., suggested by Aravinda in https://review.gluster.org/#/c/19767/1

Note: these 2to3 fixes report no changes are necessary: asserts, buffer,
exec, execfile, exitfunc, filter, getcwdu, imports2, input, intern,
itertools, metaclass, methodattrs, ne, next, nonzero, operator, paren,
raw_input, reduce, reload, renames, repr, standarderror, sys_exc, throw,
tuple_params, xreadlines.

Change-Id: Idda031c1ec975417c79323aea33e7b694e752b2a
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-07-09 03:38:36 +00:00
dkhandel
10b0d73003 Replace the BROKEN_TESTS environment variable value
In distributed-testing framework for regression, the value
of BROKEN_TESTS environment variable needs to be replaced.
This list of broken tests is different from what we have
marked as a bad test in our test suites.

Fixes: bz#1598325
Change-Id: I6a3ca5d9500170201ecaafcd5a96d9df3e46a851
Signed-off-by: Deepshikha Khandelwal <dkhandel@redhat.com>
2018-07-06 10:42:52 +00:00
Atin Mukherjee
25c1c6e9a2 extras/group : add database workload profile
Running DB workload patterns with all perf xlators enabled as default has
resulted into some inconsistency issues. Based on the internal testing done by
Elko Kuric (ekuric@redhat.com) there're certain set of perf xlators which need
to be turned off to get these types of workload supported by Gluster.

The proposal is to leverage group profile infrastructure to group together all
those tunables at one place so that users just need to apply the profile to the
volume to use it for the data base workload.

Credits : Elko Kuric (ekuric@redhat.com)

Change-Id: I8a50e915278ad4085b9aaa3f160a33af7c0b0444
fixes: bz#1596020
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2018-06-28 17:18:16 +00:00
Kaleb S. KEITHLEY
69b8ade616 core/various: python3 compat, prepare for python2 -> python3
see https://review.gluster.org/#/c/19788/,
    https://review.gluster.org/#/c/19871/,
    https://review.gluster.org/#/c/19952/,
    https://review.gluster.org/#/c/20104/,
    https://review.gluster.org/#/c/20162/,
    https://review.gluster.org/#/c/20185/,
    https://review.gluster.org/#/c/20207/,
    https://review.gluster.org/#/c/20227/,
    https://review.gluster.org/#/c/20307/,
    https://review.gluster.org/#/c/20320/, and
    https://review.gluster.org/#/c/20332/

This patch fixes the remaining comma white space (ws_comma) as suggested
by the 2to3 utility. (Earlier attempts to fix all ws_comma in one
patch did not pass centos regression, hence multiple patches to identify
the change that causes the failure.)

Note: Fedora packaging guidelines and SUSE rpmlint require explicit
shebangs; popular practices like #!/usr/bin/env python and #!/usr/bin/python
are not allowed; they must be #!/usr/bin/python2 or #!/usr/bin/python3

Note: Selected small fixes from 2to3 utility. Specifically apply,
basestring, funcattrs, has_key, idioms, map, numliterals, raise,
set_literal, types, urllib, and zip have already been applied. Also
version agnostic imports for urllib, cpickle, socketserver, _thread,
queue, etc., suggested by Aravinda in https://review.gluster.org/#/c/19767/1

Note: these 2to3 fixes report no changes are necessary: asserts, buffer,
exec, execfile, exitfunc, filter, getcwdu, imports2, input, intern,
itertools, metaclass, methodattrs, ne, next, nonzero, operator, paren,
raw_input, reduce, reload, renames, repr, standarderror, sys_exc, throw,
tuple_params, xreadlines.

Change-Id: If5aca67084a7b1c06966fed35fb35e8bb2f7d67c
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-06-23 14:12:04 +00:00
Kaleb S. KEITHLEY
4b7707382b core/various: python3 compat, prepare for python2 -> python3
see https://review.gluster.org/#/c/19788/,
    https://review.gluster.org/#/c/19871/,
    https://review.gluster.org/#/c/19952/,
    https://review.gluster.org/#/c/20104/,
    https://review.gluster.org/#/c/20162/,
    https://review.gluster.org/#/c/20185/,
    https://review.gluster.org/#/c/20207/,
    https://review.gluster.org/#/c/20227/,
    https://review.gluster.org/#/c/20307/, and
    https://review.gluster.org/#/c/20320/

This patch fixes more selected comma white space (ws_comma) as suggested
by the 2to3 utility. (Earlier attempts to fix all ws_comma in one
patch did not pass centos regression, hence multiple patches to identify
the change that causes the failure.)

Note: Fedora packaging guidelines and SUSE rpmlint require explicit
shebangs; popular practices like #!/usr/bin/env python and #!/usr/bin/python
are not allowed; they must be #!/usr/bin/python2 or #!/usr/bin/python3

Note: Selected small fixes from 2to3 utility. Specifically apply,
basestring, funcattrs, has_key, idioms, map, numliterals, raise,
set_literal, types, urllib, and zip have already been applied. Also
version agnostic imports for urllib, cpickle, socketserver, _thread,
queue, etc., suggested by Aravinda in https://review.gluster.org/#/c/19767/1

Note: these 2to3 fixes report no changes are necessary: asserts, buffer,
exec, execfile, exitfunc, filter, getcwdu, imports2, input, intern,
itertools, metaclass, methodattrs, ne, next, nonzero, operator, paren,
raw_input, reduce, reload, renames, repr, standarderror, sys_exc, throw,
tuple_params, xreadlines.

Change-Id: I6e5a2408fa1fc81e00e66d6e4a7f9f6fa1d1ed15
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-06-21 10:09:25 +00:00
Kaleb S. KEITHLEY
fe9b724856 core/various: python3 compat, prepare for python2 -> python3
see https://review.gluster.org/#/c/19788/,
    https://review.gluster.org/#/c/19871/,
    https://review.gluster.org/#/c/19952/,
    https://review.gluster.org/#/c/20104/,
    https://review.gluster.org/#/c/20162/,
    https://review.gluster.org/#/c/20185/,
    https://review.gluster.org/#/c/20207/,
    https://review.gluster.org/#/c/20227/, and
    https://review.gluster.org/#/c/20307/

This patch fixes more selected comma white space (ws_comma) as suggested
by the 2to3 utility.

Note: Fedora packaging guidelines and SUSE rpmlint require explicit
shebangs, so popular practices like #!/usr/bin/env python and
or #!/usr/bin/python3

Note: Selected small fixes from 2to3 utility. Specifically apply,
basestring, funcattrs, has_key, idioms, map, numliterals, raise,
set_literal, types, urllib, and zip have already been applied. Also
version agnostic imports for urllib, cpickle, socketserver, _thread,
queue, etc., suggested by Aravinda in https://review.gluster.org/#/c/19767/1

Note: these 2to3 fixes report no changes are necessary: asserts, buffer,
exec, execfile, exitfunc, filter, getcwdu, imports2, input, intern,
itertools, metaclass, methodattrs, ne, next, nonzero, operator, paren,
raw_input, reduce, reload, renames, repr, standarderror, sys_exc, throw,
tuple_params, xreadlines.

Change-Id: I60932030813484803f73733a9b2b7b23c7a843fd
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-06-21 05:45:08 +00:00
dkhandel
cc2f2e7bfe Distributed-testing: Call the correct class i.e. GeneralXMLRPCServer
fixes: bz#1586342
Change-Id: I7a062d49f2a49ca4848ffd0b8d1e39c8b6b99815
Signed-off-by: Deepshikha Khandelwal <dkhandel@redhat.com>
2018-06-20 09:40:48 +00:00
Niels de Vos
7005b1a336 gcron: create the lockfile if it is missing
The lockfile for the job may not exist yet. If that is the case, it
should be created upon the first time it is accessed.

Change-Id: I4da2b3ecdb79cc63ed82cc7bfa026c8f08d4d043
Fixes: bz#1590193
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2018-06-18 04:06:16 +00:00