IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
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)
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>
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>
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>
# 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>
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>
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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
* 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>
`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>
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
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>