Commit Graph

538 Commits

Author SHA1 Message Date
Niels de Vos
26b52694fe gcron: catch OSError as well as IOError
In case os.open() fails because the file does not exist, an OSError is
raised. To prevent the script to abort uncleanly, catch the OSError in
addition to the IOError.

Change-Id: I48e5b23e17d63639cc33db51b4229249a9887880
Fixes: bz#1590193
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2018-06-18 03:51:47 +00:00
dkhandel
8353bc0961 Add a command-line argument option to use specific address family
This commit adds option to pass command-line argument to use any of IPv4 or IPv6 address family.
Also it clean all the logs in the /tmp before running the distributed-test-runner.py

fixes: bz#1586342
Change-Id: Ie55021389d454a7e3631359cbd6a1504b6661317
Signed-off-by: dkhandel <dkhandel@redhat.com>
2018-06-18 03:47:01 +00:00
Kaleb S. KEITHLEY
8e63ca9bba 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/, and
    https://review.gluster.org/#/c/20207/

This patch changes uses of has_key() as suggested by the 2to3 utility.

Note: Fedora packaging guidelines require explicit shebangs, so 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, idioms, numliterals, set_literal, types, urllib,
zip, map, and raise 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.

Updates: #411

Change-Id: I79bda20f1583a0a1bb0320667498f4c137de93b3
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-06-13 15:23:04 +00:00
Kaleb S. KEITHLEY
ee75c5abc4 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/, and
    https://review.gluster.org/#/c/20104/
    https://review.gluster.org/#/c/20162/

This patch changes uses of map() and raise(), and a few cases of print()
that were overlooked in the prior patch that fixed print.

Note: Fedora packaging guidelines require explicit shebangs, so 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, idioms, numliterals, set_literal, types, urllib,
zip, map, and raise 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, intern, itertools, metaclass,
methodattrs, ne, next, nonzero, operator, paren, raw_input, reduce,
reload, renames, repr, standarderror, sys_exc, throw, tuple_params,
xreadlines.

Change-Id: Id62ea491e4ab5dd390075c5c6d9d889cf6f9da27
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-06-07 12:37:43 -04:00
Kaleb S. KEITHLEY
d788cc59b1 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/, and
    https://review.gluster.org/#/c/20104/

This patch changes uses of xrange() to range(), as suggested by the
python 2to3 utility. https://www.geeksforgeeks.org/range-vs-xrange-python/
In Python 3, there is no xrange , but the range function behaves like
xrange in Python 2. (My concern is that range() in python2 may behave
differently until we "throw the switch" to switch to python3.)

Note: Fedora packaging guidelines require explicit shebangs, so
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, idioms, numliterals, 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, intern, itertools, metaclass,
methodattrs, ne, next, nonzero, operator, paren, raw_input, reduce,
reload, renames, repr, standarderror, sys_exc, throw, tuple_params,
xreadlines.

Change-Id: I16ae9f4e3a4fd02a0623fb6f9fdb7aaf65f2a8a9
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-06-07 09:34:31 +00:00
Kaleb S. KEITHLEY
202d27c530 core/various: python3 compat, prepare for python2 -> python3
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>
2018-05-30 03:37:46 +00:00
Ashish Pandey
95e735b71b thin-arbiter : Provide scripts and service file to start thin-arbiter process
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>
2018-05-30 03:24:49 +00:00
Sanoj Unnikrishnan
c8a3e8ed1c Quota fsck script
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>
2018-05-29 04:41:40 +00:00
Poornima G
7588be808d extras/create_new_xl : Fix the tool to accomodate the xl structure changes
Change-Id: I3524e62b0ed873c0763ca38f80fcd53b22ee79d1
fixes: bz#1577744
Signed-off-by: Poornima G <pgurusid@redhat.com>
2018-05-17 09:17:41 +00:00
Kotresh HR
829f32c61c geo-rep/scheduler: Fix crash
Fix crash where session_name is referenced
before assignment. Well, this is a corner
case where the geo-rep session exists and
the status output doesn't show any rows.
This might happen when glusterd is down
or when the system is in inconsistent state
w.r.t glusterd.

fixes: bz#1576179
Change-Id: Iec1557e01b35068041b4b3c1aacee2bfa0e05873
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2018-05-14 06:45:02 +00:00
Anoop C S
3313113146 extras/hooks: Do not blindly remove volume share from smb.conf
When Gluster volumes are shared via Samba, any extra smb.conf parameter
setting done by administrator to those shares are lost during restart
of the volume. Instead of removing the whole share completely from
smb.conf(via hook scripts during volume stop) it is better to make it
temporarily unavailable to end-users till the volume is started again.
Therefore we make use of a smb.conf parameter named 'available'[1] to
achieve the above intend.

[1] https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html

Change-Id: I68a9055b50791f6ffd3b95a3c13d858a75fa6530
fixes: bz#1558921
BUG: 1558921
Signed-off-by: Anoop C S <anoopcs@redhat.com>
2018-05-07 05:04:04 +00:00
Kaleb S. KEITHLEY
4e7b423d3c core/various: python3 compat, prepare for python2 -> python3
see https://review.gluster.org/#/c/19788/

use print fn from __future__

Change-Id: If5075d8d9ca9641058fbc71df8a52aa35804cda4
updates: #411
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-05-02 11:28:46 +00:00
Prasanna Kumar Kalever
9da9117253 block-profile: enable cluster.eager-lock in block-profile
Eager-lock gave 2.5X perf improvement. On top of that with batching
fix in tcmu-runner and client-io-threads we are seeing close to 3X perf
improvement. But we don't want to include that in the default profile
option but enable it on a case by case basis. So not adding
client-io-threads option.

BUG: 1573119
Fixes: bz#1573119
Change-Id: Ida53c3ef9a041a73b65fdd06158ac082da437206
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2018-05-01 12:22:48 +00:00
Ashish Pandey
69c35dbb4b feature/thin-arbiter: Implement thin-arbiter translator
Updates #352

Change-Id: I3d8caa6479dc8e48bec62a09b056971bb061f0cf
Signed-off-by: Ashish Pandey <aspandey@redhat.com>
2018-04-25 14:34:39 +05:30
Krutika Dhananjay
c3e1a2e861 extras: Disable choose-local in groups virt and gluster-block
Change-Id: Icba68406d86623195d59d6ee668e0850c037c63a
fixes: bz#1566386
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
2018-04-13 10:23:03 +00:00
Kaleb S. KEITHLEY
29024cfdd5 core/build/various: python3 compat, prepare for python2 -> python3
Note 1) we're not supposed to be using #!/usr/bin/env python, see
https://fedoraproject.org/wiki/Packaging:Guidelines?rd=Packaging/Guidelines#Shebang_lines

Note 2) we're also not supposed to be using "!/usr/bin/python,
see https://fedoraproject.org/wiki/Changes/Avoid_usr_bin_python_in_RPM_Build#Quick_Opt-Out

The previous patch (https://review.gluster.org/19767) tried to do too
much in one patch, so it was abandoned.

This patch does two things:
1) minor cleanup of configure(.ac) to explicitly use python2
2) change all the shebang lines to #!/usr/bin/python2 and add them
where they were missing based on warnings emitted during rpmbuild.

In a follow-up patch python2 will eventually be changed to python3.

Before that python2-isms (e.g. print, string.join(), etc.) need to be
converted to python3. Some of those can be rewritten in version agnostic
python. E.g. print statements become print() with "from __future_ import
print_function". The python 2to3 utility will be used for some of those.
Also Aravinda has given guidance in the comments to the first patch for
changes.

updates: #411
Change-Id: I471730962b2526022115a1fc33629fb078b74338
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2018-04-12 11:04:27 +00:00
Niels de Vos
9b8de6421e ocf: use glusterd-workdir for finding volume status files
The volume status files are located in the glusterd-workdir, not under
/etc (sysconfdir).

BUG: 1234873
Change-Id: Id7f7c83261bb4b5ac2fc104dcd6cb198d6a930aa
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2018-04-02 12:59:12 +00:00
Poornima G
fef929342e extras/group: Change the server inode table size when upcall is on
By default server inode table size is 16K, when upcall is enabled,
there is going to be too many forgets sent on inodes as the brick can
hold only 16K inodes in memory, so we increased this to 50K. This is
still less than the client inode table size. We have seen performance
improvement when server inode table size is set to 200000(almost as
client inode table size). Hence changing the value to 200000.

Increasing this increases the memory consumption by <1MB.

BUG: 1559235
Change-Id: I931db965cd34bf33094328541bd5a633b3357805
Signed-off-by: Poornima G <pgurusid@redhat.com>
2018-03-24 05:38:47 +00:00
Atin Mukherjee
2a1adc5c93 hooks: fix workdir in S13create-subdir-mounts.sh
Change-Id: Id3eff498091ad9fa4651e93b66903426e76776d6
BUG: 1549915
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
2018-03-07 07:39:28 +00:00
Amar Tumballi
685d4409f9 hooks: add a script to stat the subdirs in add-brick
The subdirectories are expected to be present for a subdir
mount to be successful. If not, the client_handshake()
itself fails to succeed. When a volume is about to get
mounted first time, this is easier to handle, as if the
directory is not present in one brick, then its mostly
not present in any other brick. In case of add-brick,
the directory is not present in new brick, and there is
no chance of healing it from the subdirectory mount, as
in those clients, the subdir itself will be 'root' ('/')
of the filesystem. Hence we need a volume mount to heal
the directory before connections can succeed.

This patch does take care of that by healing the directories
which are expected to be mounted as subdirectories from the
volume level mount point.

Change-Id: I2c2ac7b7567fe209aaa720006d09b68584d0dd14
BUG: 1549915
Signed-off-by: Amar Tumballi <amarts@redhat.com>
2018-03-06 14:41:44 +00:00
Niels de Vos
8d9961e637 build: add --without-server option
With Gluster 4.0 we will not provide the server components for EL6 and
older. At one point Gluster 4.x will get GlusterD2, which requires
Golang tools in the distribution. EL6 does not contain these at the
moment.

With this change, it is possible to `./configure --without-server` which
prevents building glusterd and the xlators for the bricks. Building RPMs
can pass `--without server` and the glusterfs-server sub-package will
not be created.

Change-Id: I97f5ccf9f2c76e60d9af83915fc59fae57ad6d25
BUG: 1074947
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2018-02-19 17:38:55 +00:00
Milan Zink
f9e6be05bc extras/hooks: Fix S10selinux-label-brick.sh hook script
* script was failng due to syntax error
* shellcheck issues fixed
* improved performance: semanage & restorecon is being run on unique path

Change-Id: I58b357d9fd37586004a2a518f7a5d1c5c9ddd7e3
BUG: 1533342
Signed-off-by: Milan Zink <zeten30@gmail.com>
2018-01-31 07:03:58 +00:00
Milan Zink
ab068bcc9e Fix disabled-quota-root-xattr-heal.sh hook script
Fixing all shellchek warnings and POSIX incomapatibilities

Change-Id: I35772bfcf7344c6ed9bd2a7db300c8f58bd3b243
BUG: 1500649
Signed-off-by: Milan Zink <zeten30@gmail.com>
2018-01-30 14:57:35 +00:00
krad
badf662b15 distributed-tests: Framework for running tests on a worker cluster
Summary: This framework helps distribute running of unit tests on a cluster of machines.

Test Plan: Run tests on fb cluster

Reviewers: sshreyas, jdarcy

Change-Id: If309f504d9aa959cc8b01c85bff3b5503a890ff1
updates #374
Signed-off-by: krad <krad@fb.com>
2018-01-18 19:37:48 +00:00
Kotresh HR
60a992e69a tests: Enable geo-rep test cases
This patch re-enables the geo-rep test cases.
Along with it does following optimizations.

1. Use EXPECT_WITHIN instead of sleep
2. Clean up geo-rep ssh key after test
3. Changes to gverify.sh and S56glusterd-geo-rep-create-post.sh
   to use the given ssh identity file for geo-rep create
4. Make gluster-command-dir configurable and introduce
   slave-gluster-command-dir which points the parent directory
   of gluster binaries in master and slave respectively.

Change-Id: Ia7696278d9dd3ba04224dcd7c3564088ca970b04
BUG: 1480491
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2018-01-05 07:08:10 +00:00
Prashant D
a3f4b71c1f extras/devel-tools: Fix print-backtrace script
Problem:
If cpio version is less 2.11 then cpio command failing with
unrecognised option --directory.

Solution:
Check the cpio version and run rpm2cpio/cpio with or without
-D or --directory option.

Fixes : #359
Change-Id: Ibd440207231807dab1b58291ab661857094f1a4a
BUG: 1510874
Signed-off-by: Prashant D <pdhange@redhat.com>
2017-11-26 23:05:14 +00:00
Ji-Hyeon Gim
3cda1da32e who-wrote-glusterfs: add an alias for potatogim@potatogim.net
Change-Id: Ieb3d1910f0284bd951089c197abc569ae95e5bcd
Signed-off-by: Ji-Hyeon Gim <potatogim@gluesys.com>
2017-11-16 15:43:08 +00:00
Ji-Hyeon Gim
a0b3d6534b who-wrote-glusterfs: add gluesys.com to domain-map
Change-Id: Idfc62026ca50aaf8767f093b4daefd7119564a1f
Signed-off-by: Ji-Hyeon Gim <potatogim@gluesys.com>
2017-11-15 15:48:56 +00:00
Mohit Agrawal
2c066c4c36 extras: scripts to control CPU/MEMORY for any gluster daemon during runtime
Problem: Sometime gluster daemons like glustershd can consume a lot of cpu and/
or memory if there is a large amount of data/ entries to be healed.

Solution: Until we have some form of throttling/ QoS mechanisms built into
gluster, we can use control groups for regulating cpu and memory of any gluster
daemon using control-cpu-load.sh and control-mem.sh scripts respectively.

Test:    To test the control-cpu-load.sh script follow below procedure:
         1) Setup distribute replica environment
         2) Selfheal daemon off
         3) Down one node from replica nodes
         4) Create millions of files from mount point
         5) Start down node
         6) Check cpu usage for shd process in top command
         7) Run script after provide shd pid with CPU quota value
         8) Check again cpu usage for shd process in top command

Note: control-mem.sh script can cap the memory usage of the process to the set
limit, beyond which the process gets blocked. It resumes either when the memory
usage comes down or if the limit is increased.

BUG: 1496335
Change-Id: Id73c36b73ca600fa9f7905d84053d1e8633c996f
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
2017-11-13 11:07:06 +00:00
Anoop C S
08000e3ab7 extras/hooks: Honour all input arguments to scripts
Some of the hook scripts were not honouring the arguments with which
they are invoked during various volume operations. So make sure that
we consider everything while parsing the command line arguments to
avoid following warnings:

. . .
ame: unrecognized option '--first=no'
ame: unrecognized option '--version=1'
ame: unrecognized option '--volume-op=start'
. . .

Change-Id: I5b08e5e7f32908c8509e97098a042096b507783e
BUG: 1503983
Signed-off-by: Anoop C S <anoopcs@redhat.com>
2017-10-31 12:24:05 +00:00
Rishabh Dave
f4805ca6cf snapshot/scheduler: handle the exception when SELinux is absent
When SELinux is absent on an given system, snapshot_scheduler.py raises
an exception; handle it and report it in the log.

Change-Id: I21bc179e090d34f8061063e6d662521ee5046cce
BUG: 1502253
Signed-off-by: Rishabh Dave <rishabhddave@gmail.com>
2017-10-31 07:54:26 +00:00
Anoop C S
39ac511a5d extras/hooks: Fix getopt usage
`getopt` does not have an optional argument as '-name'. It should
be either '-n' or '--name'(see man getopt(1)). This wrong usage
resulted in setting the script name as 'ame' instead of $PROGNAME
in most of the hook-scripts.

Additionally the following line from DESCRIPTION given for `getopt`
shell command expects short options for almost every kind of usage
mentioned in SYNOPSIS:

. . .
If  no  '-o'  or '--options' option is found in the first part, the
first parameter of the second part is used as the short options string.
. . .

Refer http://man7.org/linux/man-pages/man1/getopt.1.html for more
clarity on its usage.

Change-Id: I95baf5fa8c99025e66b2d83656dd838d4f6048ce
BUG: 1503983
Signed-off-by: Anoop C S <anoopcs@redhat.com>
2017-10-30 15:49:02 +00:00
Anoop C S
087703fae4 extras/hooks: Fix errors reported via shellcheck utility
Change-Id: I217c6b2a39955f1709bb3452b00d33c2dcb60faa
BUG: 1500649
Signed-off-by: Anoop C S <anoopcs@redhat.com>
2017-10-18 14:27:41 +00:00
Gaurav Yadav
614904fa7a glusterd : introduce timer in mgmt_v3_lock
Problem:
In a multinode environment, if two of the op-sm transactions
are initiated on one of the receiver nodes at the same time,
there might be a possibility that glusterd  may end up in
stale lock.

Solution:
During mgmt_v3_lock a registration is made to  gf_timer_call_after
which release the lock after certain period of time

Change-Id: I16cc2e5186a2e8a5e35eca2468b031811e093843
BUG: 1499004
Signed-off-by: Gaurav Yadav <gyadav@redhat.com>
2017-10-17 15:44:49 +00:00
Kotresh HR
938addeb7e geo-rep/scheduler: Add validation for session existence
Added validation to check for session existence
to give out proper error message out.

Change-Id: I13c5f6ef29c1395cff092a14e1bd2c197a39f058
BUG: 1499159
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2017-10-06 05:42:08 -04:00
karthik-us
601b6547f2 storage/posix: Adding implementation for posix_do_futimes
Adding the implementation for the posix_do_futimes function which is
not complete in the current implementation and giving the ENOSYS error.

Change-Id: I9cfc95a7ea293b0a2df8efd4ac80d0120b3120e4
BUG: 1350406
Signed-off-by: karthik-us <ksubrahm@redhat.com>
2017-10-05 12:57:35 +00:00
Kotresh HR
8855ebcfec geo-rep/scheduler: Fix '--no-color' help msg
Change-Id: I0f51558083e0b11a6563b8a2ef62ec07fe2a9ca9
BUG: 1495436
Signed-off-by: Kotresh HR <khiremat@redhat.com>
2017-09-26 09:28:45 +00:00
Sanoj Unnikrishnan
777ad8f6a1 Heal root xattr correctly upon an add-brick operation
When an add-brick is performed the root path xattr is healed using a hook
script. For a volume in stopped state, the hook script is triggered in post
op of add-brick. Otherwise, if the volume is in started state the hook script
is started on a subsequent volume start. The script unlinks itself after
execution.
The issue is that current hook script does not work when you have multiple
volumes in stopped state. A hook script meant for volume1 can get trigerred
during start of volume2.

Fix: create separate hook script links for individual volumes.

Bug: 1472609
Change-Id: If5f056509505fdbbbf73d3363e9966047ae6a3d3
Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com>
Reviewed-on: https://review.gluster.org/17824
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
2017-09-14 17:55:30 +00:00
Pranith Kumar K
3b5f4de692 gluster-block: strict-o-direct should be on
tcmu-runner is not going to open block with O_SYNC anymore
so writes have a chance of getting cached in write-behind
when that happens, there is a chance that on failover some
data could be stuck in cache and be lost.

BUG: 1485962
Change-Id: If9835d914821dfc4ff432dc96775677a55d2918f
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://review.gluster.org/18120
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Tested-by: Shyamsundar Ranganathan <srangana@redhat.com>
2017-08-29 13:36:07 +00:00
Atin Mukherjee
3998c28324 glusterd: introduce max-port range
glusterd.vol file always had an option (commented out) to indicate the
base-port to start the portmapper allocation. This patch brings in the
max-port configuration where one can limit the range of ports which
gluster can be allowed to bind.

Fixes: #305
Change-Id: Id7a864f818227b9530a07e13d605138edacd9aa9
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: https://review.gluster.org/18016
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Gaurav Yadav <gyadav@redhat.com>
2017-08-17 04:02:20 +00:00
Gaurav Kumar Garg
220d406ad1 glusterd: Gluster should keep PID file in correct location
Currently Gluster keeps process pid information of all the daemons
and brick processes in Gluster configuration file directory
(ie., /var/lib/glusterd/*).

These pid files should be seperate from configuration files.
Deletion of the configuration file directory might result into serious problems.
Also, /var/run/gluster is the default placeholder directory for pid files.

So, with this fix Gluster will keep all process pid information of all
processes in /var/run/gluster/* directory.

Change-Id: Idb09e3fccb6a7355fbac1df31082637c8d7ab5b4
BUG: 1258561
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
Reviewed-on: https://review.gluster.org/13580
Tested-by: MOHIT AGRAWAL <moagrawa@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2017-08-11 07:36:41 +00:00
Pranith Kumar K
0cc24da2fd extras: Turn eager-lock off for gluster-block
With the current implementation of eager-lock FINODELK is taking so much
time that cassandra workload times out and errors out. AFR eager-locking
needs to be changed similar to EC eager-locking to make things work
as expected. In the interim, it is better to turn it off

This is how the profile looks if eager-lock is turned on:
      0.35     628.26 us      64.00 us  129882.00 us          42278    FXATTROP
     17.45   16500.54 us     212.00 us  375829.00 us          79568       WRITE
     81.76  209862.12 us      15.00 us 1992486.00 us          29318    FINODELK

This is how profile looks if eager-lock is turned off:
      1.87     283.71 us      65.00 us  298970.00 us          68346    FXATTROP
      6.33     199.04 us      13.00 us  373428.00 us         330524    FINODELK
     10.37    3151.47 us      53.00 us 1528484.00 us          34172       FSYNC
     81.31    5110.45 us     270.00 us 1519722.00 us         165244       WRITE

BUG: 1477404
Change-Id: I98026b1ecf30002ddac01be76f375c2e8c0b7838
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://review.gluster.org/17954
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Tested-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
2017-08-02 04:45:53 +00:00
Kaleb S. KEITHLEY
1ae3747608 scripts: invalid test(1) in extras/S32gluster_enable_shared_storage.sh
test(1) man pages says -eq is for INTEGER compares, and = is for
string compares.

Also note the comment that -a and -o are ambiguous and to use
 test && test or test || test instead.

This bug has existed since 2015! (yikes)

Found while testing localtime logging and running glusterd in the
foreground.

Change-Id: Ia544f7295e247b981504d085ebc4c533ab60ba84
BUG: 1476785
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/17925
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2017-08-01 17:41:25 +00:00
Pranith Kumar K
abfbc3eb82 group-gluster-block: Set default shard-block-size to 64MB
With 4MB shard size I/O slows down more because of the extra
inodelk/xattrops in replicate. So increasing it to 64MB which
gave better performance than 4MB.

To simulate writes on a preallocated VM-image, fallocate the file and then do
dd with notrunc
do "fallocate -l 1GB" then "dd if=/dev/zero of=file-1GB bs=1MB count=1024 conv=notrunc"

These are the results on my laptop for dd:
With 4MB:
      1.84    1357.37 us      19.00 us   12431.00 us           1188    FINODELK
      2.45     255.08 us      58.00 us    4038.00 us           8428       WRITE
     95.69   78967.76 us      30.00 us 20324240.00 us           1063    FXATTROP

With 64MB:
      0.13      59.36 us      15.00 us     814.00 us            657    FINODELK
      6.02     225.53 us      69.00 us    6556.00 us           8205       WRITE
     93.82  103015.12 us      32.00 us 13046368.00 us            280    FXATTROP

BUG: 1475605
Change-Id: I4ed5441409df639e38c731ba0d140fe92902f25f
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://review.gluster.org/17887
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
2017-07-27 10:39:52 +00:00
Pranith Kumar K
0b3fec6924 extras: Disable remote-dio in gluster-block profile
gluster-block file is opened with O_DIRECT but because block-profile has
remote-dio enabled, it is leading to high latency for fsync which leads to
failures in cassandra. Disabling remote-dio fixed this issue. We need to change
remote-dio to disabled in gluster-block.

BUG: 1474190
Change-Id: Ifd845ea9cbdcc08dd6073faca6082682af376ca3
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://review.gluster.org/17856
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2017-07-24 14:17:10 +00:00
Pranith Kumar K
f3b487a510 extras: Change Makefile generation in generate_xlator.py
Makefile generation should include default LD_FLAGS and also include rpc
related paths in include path

Change-Id: I45e1c97b96f08bbfe4663384f4873726febef9f6
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://review.gluster.org/17811
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2017-07-18 16:44:27 +00:00
Jiffin Tony Thottan
4c410a46ef systemd/glusterfssharedstorage : remove dependency for var-run-gluster-shared_storage
Currently the script used by glusterfssharedstorage have dependency over
var-run-gluster-shared_storage. But this service will be present only if
node has rebooted. Also in reboot scenario , there is a chance that this
service can be executed before creating var-run-gluster-shared_storage.
In that case glusterfssharedstorage will get succeed even without mounting
the shared storage

Also the type of glusterfssharedstorage changed to "forking" so that it can
be active(instead of dead) after the successful start.

Change-Id: I1c02cc64946e534d845aa7ec7b72644bbe4d26f9
BUG: 1452527
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: https://review.gluster.org/17658
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2017-07-17 11:41:00 +00:00
Krutika Dhananjay
f28b5d1007 extras: Enable stat-prefetch in virt profile
In the internal testing that was done, stat-prefetch did help
reduce the number of stats coming from qemu hitting the disk,
and thereby improved performance.

Change-Id: Icf1ce62ecf4e96b97e1946a77b30434157a7786a
BUG: 1468191
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://review.gluster.org/17713
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2017-07-10 07:53:36 +00:00
Sanoj Unnikrishnan
50d72373fa Scripts to identify quota accouting issues
The patch contains 2 scripts:

log_accounting.sh does a du -h on the FS hierarchy and a quota list
on the hierarchy and interleaves the two output. We can then identify
which directory(s) in FS has caused the accounting to go bad and try
to investigate what fops happened on those directories. We can also
limit the set of directories on which we need to set dirty xattr to
correct accounting.
xattr_analysis.py reads all the xattr of a brick and dumps it a human
readable form to ease debugging.

Change-Id: I2155561d10c08dc3ab9e8b09dbd258f0592b4d33
BUG: 1466188
Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com>
Reviewed-on: https://review.gluster.org/17649
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
2017-06-30 08:39:05 +00:00
Hendrik Visage
3183ca1bde scripts/shared_storage : systemd helper scripts to mount shared storage post reboot
Reported-by: Hendrik Visage <hvjunk@gmail.com>
Change-Id: Ibcff56b00f45c8af54c1ae04974267c2180f5f63
BUG: 1452527
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: https://review.gluster.org/17339
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2017-06-20 12:42:01 +00:00
Gaurav Yadav
52d0886cfb glusterd.service (systemd), shows "Active failed" when gd in stop state
While doing cleanupandexit glusterd was handling the signal SIGTERM which
is clean exit but systemd treats it as failure being a non-zero value.

With this fix dependency "SuccessExitStatus " has been added
in glusterd.service which takes care of service stop properly.

Signed-off-by: Gaurav Yadav <gyadav@redhat.com>

Change-Id: Ie5216722632a245f787fd69bfbbf8d0f0068bccb
BUG: 1462200
Reviewed-on: https://review.gluster.org/17559
Tested-by: Gaurav Yadav <gyadav@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
2017-06-19 16:06:01 +00:00
Poornima G
38780ff2d0 nl-cache: add group volume set option for ease of use
Change-Id: Id03643a9598da53051a01ca09e1d2a62bc195ab6
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: https://review.gluster.org/17495
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2017-06-12 03:52:16 +00:00
Kaleb S. KEITHLEY
be28cbc5f8 extras/hookscripts: non-portable shell syntax
use of "function" is not portable to other shells

Reported-by: Patrick Matthäi <pmatthaei@debian.org>
Change-Id: I13a0482b387cc3b7a7a57df424e673850603da37
BUG: 1457812
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/17443
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
2017-06-02 12:13:33 +00:00
Pranith Kumar K
bea02e26a3 features/shard: Handle offset in appending writes
When a file is opened with append, all writes are appended at the end of file
irrespective of the offset given in the write syscall. This needs to be
considered in shard size update function and also for choosing which shard to
write to.

At the moment shard piggybacks on queuing from write-behind
xlator for ordering of the operations. So if write-behind is disabled and
two parallel appending-writes come both of which can increase the file size
beyond shard-size the file will be corrupted.

BUG: 1455301
Change-Id: I9007e6a39098ab0b5d5386367bd07eb5f89cb09e
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://review.gluster.org/17387
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2017-05-27 16:00:50 +00:00
Pranith Kumar K
ef61a79f33 extras: Provide group set for gluster-block workloads
For gluster-block workloads I/O is always with o-direct so it doesn't
benefit by any of the perf xlators so disabling all of them to save
on memory.
performance.quick-read=off
performance.read-ahead=off
performance.io-cache=off
performance.stat-prefetch=off
performance.write-behind=off
performance.open-behind=off
performance.readdir-ahead=off

We want the I/O on the file to be with o-direct
network.remote-dio=enable

Options that are proven to give good performance with
VM workloads which is very similar to gluster-block
cluster.eager-lock=enable
cluster.quorum-type=auto
cluster.data-self-heal-algorithm=full
cluster.locking-scheme=granular
cluster.shd-max-threads=8
cluster.shd-wait-qlength=10000
features.shard=on

It is better to turn off things we are not using
user.cifs=off

It is better to have allow-insecure to be on so that
ports that are > 1024 in tcmu-runner are allowed.
server.allow-insecure=on

Change-Id: I9a21c824fa42242f02b57569feedd03d9b6f9439
BUG: 1450010
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://review.gluster.org/17254
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
2017-05-12 13:21:28 +00:00
Brian Foster
859669759f extras/hook-scripts: SELinux brick file context management scripts
The SELinux policy for gluster defines the glusterd_brick_t type to
support server side SELinux (e.g., server side labels). Add
convenience hook scripts that users/packagers can install to ensure
that new bricks are labeled correctly.

The volume create hook script adds a new SELinux file context for
each brick path and runs a restorecon to label the brick. The
volume delete hook removes the per-brick SELinux file context.

Change-Id: I5f102db5382d813c4d822ff74e873a7a669b41db
BUG: 1047975
Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: https://review.gluster.org/6630
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2017-05-01 09:30:01 +00:00
Kaleb S. KEITHLEY
83abcba6b4 build: conditionally build legacy gNFS server and associated sub-packaging
Plus some additional logic in glusterd to ensure gnfs (glusterfs)
daemons are never started if server/nfs xlator is not installed.

As a service, nfs is still initialized. The glusterfs-gnfs RPM
may be installed or uninstalled independent of anything else,
including on a system where gluster is actively running, so the
existence of the xlator is always tested before trying to start
gnfs.

Change-Id: I56743ad1cb36a84917226d7d26cb9d015d441e66
BUG: 1326219
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/16958
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
2017-04-28 14:08:41 +00:00
Anoop C S
ec7a0c7eef extras/hooks: Use double quotes while using [..]
This avoids the following warning when first operand is null

[: =: unary operator expected

Change-Id: I5439d8f60a6d9e30e6ba04c16c3de2096a87c38f
BUG: 1446126
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-on: https://review.gluster.org/17127
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
2017-04-27 16:11:21 +00:00
Kaleb S. KEITHLEY
0e50c4b3ea packaging: /var/run/gluster owner gluster:gluster(0775) for statedumps
gfapi has the ability to take statedumps. However, if the application
using gfapi isn't running with root privs the statedump file can't be
written to the default location, i.e. /var/run/gluster.

Change-Id: I97d8919ef8b8cd4775e1a206f939a2bf0046786d
BUG: 1445569
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/17122
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2017-04-27 15:57:15 +00:00
Kaleb S. KEITHLEY
0cf2963f12 packaging: (ganesha) remove glusterfs-ganesha subpackage and related files)
Indiana Jones and the Temple of Ganesha HA, part two.

remove glsuterfs-ganesha subpackage, superceded by storhaug

Change-Id: I42a1fc59159add108d77080b9b130696216aa76d
BUG: 1418417
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/16506
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
2017-03-21 13:14:30 -04:00
Kaleb S. KEITHLEY
fdabb97d57 build/packaging: Debian and Ubuntu don't have /usr/libexec
GLUSTERFS_LIBEXECDIR is effectively hard-coded to /usr/libexec/glusterfs
in configure(.ac)

Debian-based distributions don't have a /usr/libexec/ directory

This issues is partially mitigated by the use of $libexecdir in
some of the Makefile.am files, but even so the incorrectly defined
GLUSTERFS_LIBEXECDIR results in various things such as gsyncd,
glusterfind, eventsd, etc., trying to invoke other scripts and
programs from a location that doesn't exist.

And once we correctly define GLUSTERFS_LIBEXECDIR, then we might as
well use it appropriatedly.

Change-Id: If5219cadc51ae316f7ba2e2831d739235c77902d
BUG: 1430841
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/16880
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Reviewed-by: Joe Julian <me@joejulian.name>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
2017-03-13 10:18:07 -04:00
Milind Changire
6ffce4d698 extras/devel-tools: script to resolve bt addresses
Problem:
STACK_WINDs in a gluster backtrace dumped in a log file are
undecipherable with only the hex addresses of the location
leaving us without a clue.

Solution:
This utility uses the undeciphered lines in the backtrace and the
associated debuginfo rpm to generate the function name and the file and
line number associated with the stack frame.

Passing "none" as the debuginfo rpm name will make the script assume
that you want to resolve against a source install and not a debuginfo
rpm.

You would need to copy the unresolved lines from the backtrace into a
file and pass the name of this file to the utility as the input file.

Change-Id: I4d8bc1ae205af37688d03298de49654018bdba9d
BUG: 1426891
Signed-off-by: Milind Changire <mchangir@redhat.com>
Reviewed-on: https://review.gluster.org/16763
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2017-03-07 22:52:16 -05:00
Kaleb S. KEITHLEY
ece5f66a3d build: fixes to build 3.9.0rc2 on Debian
Add glustereventsd-Debian(.in) and associated Makefile(.am)
and configure(.ac) changes

Add UUIDLIBS to fdl's librecon

Change-Id: Ibff821691023704978140eaaff2c6532b74c50fa
BUG: 1389127
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/15737
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Joe Julian <me@joejulian.name>
2017-02-26 14:13:32 -05:00
Avra Sengupta
7b6ee5f2bb snapshot/scheduler: Set sebool cron_system_cronjob_use_shares to on
Rhel 7.1 onwards, the user has to manually set the
selinux boolean 'cron_system_cronjob_use_shares' as
on, if selinux is enabled for snapshot scheduler to
work.

With this fix, we are automating that bit, in init step
of snapshot scheduler

Change-Id: I5c1d23c14133c64770e84a77999ce647526f6711
BUG: 1395643
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: https://review.gluster.org/15857
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
2017-02-22 01:11:15 -05:00
Niels de Vos
b4da61c9fc contributors: map more email addresses and domain names
While checking the statistics for the upcoming release, I noticed some
new names, emailaddresses and domains. Adding the ones for which the
mapping is obvious or for which people replied to my request for
clarification.

Steps to get the more up-to-date statistics (once merged):

  $ git checkout master
  $ ./extras/who-wrote-glusterfs/who-wrote-glusterfs.sh v3.9dev..origin/release-3.10
  ...

Change-Id: I4ab85fdbdb53d09a70a659555b8341cf9376167c
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: https://review.gluster.org/16688
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2017-02-20 17:10:58 -05:00
Krutika Dhananjay
932ff80b57 extras: Add more options to group virt
Apart from some of the option configurations already listed
in the group-virt.example file, we also recommend that the
users set certain other options added by this patch for
VM use-case. This also helps Gluster-oVirt users in configuring
virt options for new volumes at the click of a button as opposed
to setting them manually through volume-set command.

Change-Id: I8524e8d8a06bbbb0b9247571706e786410013b41
BUG: 1418900
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://review.gluster.org/16577
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Sahina Bose <sabose@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2017-02-17 05:43:58 -05:00
Xavier Hernandez
cafdab5e13 extras/rebalance.py: Fix statvfs for FreeBSD in python
FreeBSD doesn't return the block size in f_bsize as linux does. It
returns the optimal I/O size, so we need to consider this to avoid
invalid results. On FreeBSD we take f_frsize as the block size.

Change-Id: I72083d8ae183548439de874c77f1d60d9c2d14a7
BUG: 1356076
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: https://review.gluster.org/16498
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2017-02-07 07:51:01 -05:00
Poornima G
75c398d396 extras: Provide group set for md-cache and invalidation options
To enable the integration of md-cache and invalidation features
we need to perform 3 volume set options in a specific order.
In order to ease this for user provide a group volume set option.

Usage: gluster vol set <VOLNAME> group metadata-cache

Change-Id: I9bf0fd4217aa2a1c7ffbdc93e879b10f87addeac
BUG: 1418249
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: https://review.gluster.org/16503
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2017-02-03 04:33:17 -05:00
Kaleb S. KEITHLEY
984c470159 extras: glusterfs-mode.el has incorrect FSF address
found by rpmlint on OpenSuSE Build Service

And convert DOS crlf to Unix lf, also found by SuSE rpmlint

Change-Id: I0329e6682333ead21ca1b76a3b00cb863c2af51b
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: https://review.gluster.org/16500
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2017-02-02 12:47:17 -05:00
Kaleb S. KEITHLEY
c822e354e1 storhaug HA: first step, remove resource agents and setup script
resource agents and setup script(s) are now in storhaug

This is a phased switch-over to storhaug. Ultimately all components
here should be (re)moved to the storhaug project and its packages.
But for now some will linger here.

Change-Id: Ied3956972b14b14d8a76e22c583b1fe25869f8e7
BUG: 1410843
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/16349
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2017-01-17 16:53:30 -08:00
Kaleb S. KEITHLEY
bc74dc62bb common-ha: add node create new node dirs in shared storage
When adding a node to the ganesha HA cluster, create the directory
tree in shared storage for the added node and create sets of symlinks
to match what is/was created for the other nodes.  I.e. in a four
node cluster the new node needs a set of links to the four existing
nodes:
 /run/gluster/shared/nfs-ganesha/$new/nfs/{ganesha,statd}/$e1 -> e1
 /run/gluster/shared/nfs-ganesha/$new/nfs/{ganesha,statd}/$e2 -> e2
 /run/gluster/shared/nfs-ganesha/$new/nfs/{ganesha,statd}/$e3 -> e3
 /run/gluster/shared/nfs-ganesha/$new/nfs/{ganesha,statd}/$e4 -> e4
and all the existing nodes need links added for the new node:
 /run/gluster/shared/nfs-ganesha/$e1/nfs/{ganesha,statd}/$new -> new
 /run/gluster/shared/nfs-ganesha/$e2/nfs/{ganesha,statd}/$new -> new
 /run/gluster/shared/nfs-ganesha/$e3/nfs/{ganesha,statd}/$new -> new
 /run/gluster/shared/nfs-ganesha/$e5/nfs/{ganesha,statd}/$new -> new

Likewise when deleting, remove the dir and symlinks.

original change http://review.gluster.org/16036

BUG: 1400613
Change-Id: I52839046745728d06ab5a07f38081c032093bff6
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/16216
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
2016-12-22 06:20:11 -08:00
Soumya Koduri
de576c08ef common-ha: Correct the VIP assigned to the new node added
There is a regression introduced with patch#16115. An incorrect
VIP gets assigned to the new node being added to the cluster.
This patch fixes the same.

Change-Id: I468c7d16bf7e4efa04692db83b1c5ee58fbb7d5f
BUG: 1406410
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/16213
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
2016-12-21 23:29:17 -08:00
Jiffin Tony Thottan
8b42e1b568 ganesha/scripts : Prevent removal of entries in ganesha.conf during deletion of a node
Change-Id: Ia6c653eeb9bef7ff4107757f845218c2316db2e4
BUG: 1406249
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/16209
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
2016-12-21 04:51:24 -08:00
Kaleb S. KEITHLEY
dc549b330c common-ha: add node create new node dirs in shared storage
When adding a node to the ganesha HA cluster, create the directory
tree in shared storage for the added node and create sets of symlinks
to match what is/was created for the other nodes.  I.e. in a four
node cluster the new node needs a set of links to the four existing
nodes:
 /run/gluster/shared/nfs-ganesha/$new/nfs/{ganesha,statd}/$e1 -> e1
 /run/gluster/shared/nfs-ganesha/$new/nfs/{ganesha,statd}/$e2 -> e2
 /run/gluster/shared/nfs-ganesha/$new/nfs/{ganesha,statd}/$e3 -> e3
 /run/gluster/shared/nfs-ganesha/$new/nfs/{ganesha,statd}/$e4 -> e4
and all the existing nodes need links added for the new node:
 /run/gluster/shared/nfs-ganesha/$e1/nfs/{ganesha,statd}/$new -> new
 /run/gluster/shared/nfs-ganesha/$e2/nfs/{ganesha,statd}/$new -> new
 /run/gluster/shared/nfs-ganesha/$e3/nfs/{ganesha,statd}/$new -> new
 /run/gluster/shared/nfs-ganesha/$e5/nfs/{ganesha,statd}/$new -> new

Likewise when deleting, remove the dir and symlinks.

Change-Id: Id2f78f70946f29c3503e1e6db141b66cb431e0ea
BUG: 1400613
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/16036
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
2016-12-16 04:24:55 -08:00
Kaleb S. KEITHLEY
6f4f3d012c common-ha: explicitly set udpu transport for corosync
On RHEL7 corosync uses udpu (udp unicast) by default. On RHEL6 the
default is (now) udp multi-cast. In network environments that don't
support udp multi-cast this causes the ever growing lists of
[TOTEM ] Retruansmit errors.

Always specifying --transport udpu is thus a no-op on RHEL7.

Using the same transport on both RHEL6 and RHEL7 may (or may not
give similar behavior and performance--it's hard to say.

It remains a mystery why things have always worked on RHEL6 prior to
now. Further investigation is required to uncover why this is the
case.

Change-Id: I4d0de97fe4425c47f249beaaf51aeca3e91731fa
BUG: 1404410
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/16122
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
2016-12-15 03:08:29 -08:00
Soumya Koduri
885ecce6e2 common-ha: Create portblock RA as part of add/delete-node
When a node is added to or deleted from existing nfs-ganesha cluster,
we need to create or cleanup portblock RA as well. This patch is
to address the same. Also we need to adjust the quorum-policy with
increase/decrease in the number of nodes in the cluster.

Change-Id: I31a896715b9b7fc931009723d1570bf7aa4da9b6
BUG: 1403130
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/16089
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-12-12 16:41:49 -08:00
Jiffin Tony Thottan
58a58e706d ganesha/scripts : find export id for already exported volume in S31ganesha-start.sh
Change-Id: Iada90ed215966d3f526fa20aa5359b67f25a6944
BUG: 1401822
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/16037
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-12-08 08:49:33 -08:00
Jiffin Tony Thottan
4a9a5362f0 glusterd/ganesha : handle volume reset properly for ganesha options
The "gluster volume reset" should first unexport the volume and then delete
export configuration file. Also reset option is not applicable for ganesha.enable
if volume value is "all".
This patch also changes the name of create_export_config into manange_export_config

Change-Id: Ie81a49e7d3e39a88bca9fbae5002bfda5cab34af
BUG: 1397795
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/15914
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-12-06 22:09:39 -08:00
Krutika Dhananjay
45f914ec9c extras: Include shard and full-data-heal in virt group
Change-Id: Iea66cb017bd1ab62da9cd65895fa65fc6896108b
BUG: 1375431
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/15995
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2016-12-04 20:44:12 -08:00
Aravinda VK
da71bdcf82 eventsapi: JSON output and different error codes
JSON outputs are added to all commands, use `--json` to
get JSON output.

Following error codes are added to differenciate between errors.
Any other Unknown errors will have return code 1

ERROR_SAME_CONFIG             = 2
ERROR_ALL_NODES_STATUS_NOT_OK = 3
ERROR_PARTIAL_SUCCESS         = 4
ERROR_WEBHOOK_ALREADY_EXISTS  = 5
ERROR_WEBHOOK_NOT_EXISTS      = 6
ERROR_INVALID_CONFIG          = 7
ERROR_WEBHOOK_SYNC_FAILED     = 8
ERROR_CONFIG_SYNC_FAILED      = 9

Also hidden `node-` commands in the help message.

BUG: 1357753
Change-Id: I962b5435c8a448b4573059da0eae42f3f93cc97e
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/15867
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-12-02 00:20:39 -08:00
Jiffin Tony Thottan
76eef16d76 ganesha/scripts : avoid incrementing Export Id value for already exported volumes
Currently a volume will unexport when it stops and reexport it during volume start
using hook script. And also it increments the value for export id for each reexport.
Since a hook script is called from every node parallely which may led inconsistency
for export id value.

Change-Id: Ib9f19a3172b2ade29a3b4edc908b3267c68c0b20
BUG: 1399186
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/15948
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-12-01 10:38:47 -08:00
Kaleb S. KEITHLEY
bdcc3ac42b common-ha: IPaddr RA is not stopped when pacemaker quorum is list
Ken Gaillot writes:
The other is pacemaker's no-quorum-policy cluster property. The
default (which has not changed) is "stop" (stop all resources).
Other values are "ignore" (act as if quorum was not lost),
"freeze" (continue running existing resources but don't recover
resources from unseen nodes) or "suicide" (shut down).

But on my four node cluster
% pcs property show no-quorum-policy
Cluster Properties:
%

i.e. shows nothing.

But:
% pcs property list --all
Cluster Properties:
...
 no-quorum-policy: stop
...
%

Seems to think it knows about it.

and then
% pcs property set no-quorum-policy=stop
% pcs property show no-quorum-policy
Cluster Properties:
 no-quorum-policy: stop
%

Which looks rather inconsistent. So we will try explicitly
setting it to "stop" when there are three or more nodes.

Change-Id: I47fc7ee84fcd6ad52ccb776913511978a8d517b4
BUG: 1400237
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/15981
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-12-01 07:07:54 -08:00
Kaleb S. KEITHLEY
5bc501fde8 common-ha: add cluster HA status to --status output for gdeploy
gdeploy desires a one-liner "health" assessment.

If all the VIP and port block/unblock RAs are located on their
prefered nodes and 'Started', then the cluster is deemed to be
good (healthy).

N.B. status originally only checked the "online" nodes obtained
from `pcs status` but we really want to consider all the configured
nodes, whether they are online or not.

Also one `pcs status` is enough.

Change-Id: Id0e0380b6982e23763edeb0488843b5363e370b8
BUG: 1395648
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/15882
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Arthy Loganathan <aloganat@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
2016-12-01 03:45:25 -08:00
Soumya Koduri
1b2b5be970 common-HA: Increase timeout for portblock RA of action=unblock
Portblock RA of action type unblock stores the information about
the client/server IPs connection in tickle_dir folder created in
the shared storage. In case of node shutdown/reboot there could be
cases wherein shared_storage may become unavailable for sometime.
Hence increase the timeout to avoid that resource agent going into
FAILED state.

Change-Id: I4f98f819895cb164c3a82ba8084c7c11610f35ff
BUG: 1399154
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/15947
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
2016-12-01 02:46:34 -08:00
Avra Sengupta
6b2c40d337 snapshot/scheduler: Removing dependency of scheduler on eventing
Change-Id: I7de156d8186c32092ec5e9d174d023f4782947c0
BUG: 1396364
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/15876
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2016-11-20 22:18:13 -08:00
Jiffin Tony Thottan
2f70f47979 ganesha/scripts : use export id for dbus signals
Currently for add export and update export parameter passed for executing those signal
is "PATH". This is based on assumption that volume name and PATH will always be same.
But it is wrong for subdir exports. The only reliable parameter in export configuration
file is "Export_Id".

Change-Id: Ic63ff44ac7736e14502034b74beaae27292eddf9
BUG: 1389746
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/15751
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-11-17 13:17:30 -08:00
Kaleb S. KEITHLEY
b5387f90f9 common-ha: nfs-grace-monitor timed out unknown error messages
grace_mon_monitor() occasionally returns OCF_ERR_GENERIC, but it
ought to return OCF_NOT_RUNNING instead.

Change-Id: I3d550e33cc3d0a8dce4333ced72db19b3b2f4f2e
BUG: 1394224
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/15831
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
2016-11-16 02:26:40 -08:00
Kaleb S. KEITHLEY
8437b24de3 common-ha: remove /etc/corosync/corosync.conf in teardown/cleanup
In newer versions of corosync we observe that after tearing down an
existing HA cluster, when trying to set up a new cluster, `pcs cluster
start --all` will fail if corosync believes the nodes are already in
the cluster based on the presence of, and the contents of
/etc/corosync/corosync.conf

So we summarily delete it. (An alternative/work-around is to use `pcs
cluster start --force --all`)

Change-Id: I225f4e35e3b605e860ec4f9537c40ed94ac68625
BUG: 1394881
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/15843
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
2016-11-15 11:30:26 -08:00
Soumya Koduri
20d2b36f3a common-ha: Use UpdateExports dbus msg for refresh-config
In nfs-ganesha 2.4, new dbs msg type "UpdateExports" support
has been added. With this support, the exports can be re-configured
dynamically without the need to re-export the entries.

Change-Id: Iee7330d33e91db1126974a2ff46becb3764f2e5e
BUG: 1382258
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/15617
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-10-19 06:55:23 -07:00
Jiffin Tony Thottan
7407266684 ganesha/scripts : modify start hook script for shared storage changes
Change-Id: Ib8dfe41d06ae0756af8f1c110fc774ac16bdc581
BUG: 1377607
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/15535
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2016-09-28 05:01:25 -07:00
Kaleb S KEITHLEY
e38dff5b4e build: out-of-tree builds generates files in the wrong directory
And minor cleanup of a few of the Makefile.am files while we're
at it.

Rewrite the make rules to do what xdrgen does. Now we can get rid
of xdrgen.

Note 1. netbsd6's sed doesn't do -i. Why are we still running
smoke tests on netbsd6 and not netbsd7? We barely support netbsd7
as it is.

Note 2. Why is/was libgfxdr.so (.../rpc/xdr/src/...) linked with
libglusterfs? A cut-and-paste mistake? It has no references to
symbols in libglusterfs.

Note3. "/#ifndef\|#define\|#endif/" (note the '\'s) is a _basic_
regex that matches the same lines as the _extended_ regex
"/#(ifndef|define|endif)/". To match the extended regex sed needs to
be run with -r on Linux; with -E on *BSD. However NetBSD's and
FreeBSD's sed helpfully also provide -r for compatibility. Using a
basic regex avoids having to use a kludge in order to run sed with
the correct option on OS X.

Note 4. Not copying the bit of xdrgen that inserts copyright/license
boilerplate. AFAIK it's silly to pretend that machine generated
files like these can be copyrighted or need license boilerplate.
The XDR source files have their own copyright and license; and
their copyrights are bound to be more up to date than old
boilerplate inserted by a script. From what I've seen of other
Open Source projects -- e.g. gcc and its C parser files generated
by yacc and lex -- IIRC they don't bother to add copyright/license
boilerplate to their generated files.

It appears that it's a long-standing feature of make (SysV, BSD,
gnu) for out-of-tree builds to helpfully pretend that the source
files it can find in the VPATH "exist" as if they are in the $cwd.
rpcgen doesn't work well in this situation and generates files
with "bad" #include directives.

E.g. if you `rpcgen ../../../../$srcdir/rpc/xdr/src/glusterfs3-xdr.x`,
you get an #include directive in the generated .c file like this:

  ...
  #include "../../../../$srcdir/rpc/xdr/src/glusterfs3-xdr.h"
  ...

which (obviously) results in compile errors on out-of-tree build
because the (generated) header file doesn't exist at that location.
Compared to `rpcgen ./glusterfs3-xdr.x` where you get:

  ...
  #include "glusterfs3-xdr.h"
  ...

Which is what we need. We have to resort to some Stupid Make Tricks
like the addition of various .PHONY targets to work around the VPATH
"help".

Warning: When doing an in-tree build, -I$(top_builddir)/rpc/xdr/...
looks exactly like -I$(top_srcdir)/rpc/xdr/...  Don't be fooled though.
And don't delete the -I$(top_builddir)/rpc/xdr/... bits

Change-Id: Iba6ab96b2d0a17c5a7e9f92233993b318858b62e
BUG: 1330604
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/14085
Tested-by: Niels de Vos <ndevos@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2016-09-18 09:34:37 -07:00
Niels de Vos
00d9abd401 build: move checkpatch.pl to build-aux
There is no need for checkpatch.pl to be in extras/, it is used similar
to other scripts that are placed in build-aux/.

Change-Id: Id0f4db1666d83dad31687aa7aadae128fc14c016
BUG: 1198849
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/15400
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-09-12 01:33:12 -07:00
Aravinda VK
5a1abd235d eventsapi: Add Init scripts for different distributions
Added init scripts for
- SysvInit(CentOS 6 or Red Hat 6)
- rc.d (FreeBSD)

Most of the latest distributions are using systemd. Support to be
added for other distributions which are not using systemd.

Removed systemctl wrapper functions(start/stop/status) from
gluster-eventsapi CLI(peer_eventsapi.py). Status and Reload
re-implemented using pid file check.

Added pid file support for glustereventsd.

Following dependencies removed
python-flask - Only used for example dashboard. User can install
if required.
python-fasteners - Not available for EPEL 6, added custom code using
fcntl as replacement.

BUG: 1365395
Change-Id: I26792eae9b11e93304f70b3997cd7d8d03b067f4
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/15367
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-09-09 03:29:33 -07:00
Kaleb S. KEITHLEY
9c05775031 common-ha: ganesha_mon: line 137: [: too many arguments ]" messages
ensure that there are always valid, non-null arguments to /bin/test

Here there be dragons. Very racy, but if the races lose, they lose
in a way that's consistent with what we're testing for anyway, namely
that the ganesha.nfsd process is gone.

Change-Id: I88b770dd874ffa8576711f8009f27122a4fb0130
BUG: 1363595
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/15390
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2016-09-05 04:18:59 -07:00
Avra Sengupta
c1278de9a5 snapshot/eventsapi: Integrate snapshot events with eventsapi
1. EVENT_SNAPSHOT_CREATED : snapshot_name=snap1 volume_name=test_vol
                            snapshot_uuid=26dd6c52-6021-40b1-a507-001a80401d70
2. EVENT_SNAPSHOT_CREATE_FAILED : snapshot_name=snap1 volume_name=test_vol
                                  error=Snapshot snap1 already exists
3. EVENT_SNAPSHOT_ACTIVATED : snapshot_name=snap1
                              snapshot_uuid=26dd6c52-6021-40b1-a507-001a80401d70
4. EVENT_SNAPSHOT_ACTIVATE_FAILED: snapshot_name=snap1
                                   error=Snapshot snap1 is already activated.
5. EVENT_SNAPSHOT_DEACTIVATED : snapshot_name=snap1
                              snapshot_uuid=26dd6c52-6021-40b1-a507-001a80401d70
6. EVENT_SNAPSHOT_DEACTIVATE_FAILED : snapshot_name=snap3
                                      error=Snapshot (snap3) does not exist.
7. EVENT_SNAPSHOT_SOFT_LIMIT_REACHED : volume_name=test_vol
                                  volume_id=2ace2616-5591-4b9b-be2a-38592dda5758
8. EVENT_SNAPSHOT_HARD_LIMIT_REACHED : volume_name=test_vol
                                  volume_id=2ace2616-5591-4b9b-be2a-38592dda5758
9. EVENT_SNAPSHOT_RESTORED : snapshot_name=snap1 volume_name=test_vol
                             snapshot_uuid=3a840ec5-08da-4f2b-850d-1d5539a5d14d
10. EVENT_SNAPSHOT_RESTORE_FAILED : snapshot_name=snap10
                                    error=Snapshot (snap10) does not exist
11. EVENT_SNAPSHOT_DELETED : snapshot_name=snap1
                             snapshot_uuid=d9ff3d4f-f579-4345-a4da-4f9353f0950c
12. EVENT_SNAPSHOT_DELETE_FAILED : snapshot_name=snap2
                                   error=Snapshot (snap2) does not exist
13. EVENT_SNAPSHOT_CLONED : clone_uuid=93ba9f06-cb9c-4ace-aa52-2616e7f31022
                            snapshot_name=snap1 clone_name=clone2
14. EVENT_SNAPSHOT_CLONE_FAILED : snapshot_name=snap1 clone_name=clone2
                                  error=Volume with name:clone2 already exists
15. EVENT_SNAPSHOT_CONFIG_UPDATED : auto-delete=enable config_type=system_config
                                    config_type=volume_config hard_limit=100
16. EVENT_SNAPSHOT_CONFIG_UPDATE_FAILED :
                   error=Invalid snap-max-soft-limit 110. Expected range 1 - 100
17. EVENT_SNAPSHOT_SCHEDULER_INITIALISED : status=Success
18. EVENT_SNAPSHOT_SCHEDULER_INIT_FAILED
19. EVENT_SNAPSHOT_SCHEDULER_ENABLED : status=Successfuly Enabled
20. EVENT_SNAPSHOT_SCHEDULER_ENABLE_FAILED :
                                   error=Snapshot scheduler is already enabled.
21. EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_ADDED : status=Successfuly added job job1
22. EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_ADD_FAILED :
                    status=Failed to add job job1 error=The job already exists.
23. EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_EDITED :
                                             status=Successfuly edited job job1
24. EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_EDIT_FAILED :
                                                 status=Failed to edit job job2
                                                 error=The job cannot be found.
25. EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_DELETED :
                                            status=Successfuly deleted job job1
26. EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_DELETE_FAILED :
                                               status=Failed to delete job job1
                                               error=The job cannot be found.
27. EVENT_SNAPSHOT_SCHEDULER_DISABLED : status=Successfuly Disabled
28. EVENT_SNAPSHOT_SCHEDULER_DISABLE_FAILED :
                                   error=Snapshot scheduler is already disabled.

Change-Id: I3479cc3fb7af3c76ded67cf289f99547d0a55d21
BUG: 1370567
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/15329
Tested-by: Aravinda VK <avishwan@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2016-09-01 00:33:42 -07:00
Poornima G
f7e91cd7f0 extras: Fix failed_tests.py to have the updated regression links
Change-Id: Iee79389d835cae91288fbbe9b2b266ea2ba4b30e
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/15350
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
2016-08-31 00:20:20 -07:00
Aravinda VK
b71ae7d77d eventsapi: Add support for Client side Events
Client side gf_event uses ctx->cmd_args.volfile_server to push
notifications to the eventsd.

Socket server changed from Unix domain socket to UDP to support
external events.

Following to be addressed in different patch
- Port used for eventsd is 24009. Make it configurable
  Already configurable in Server side. Configurable in gf_event API
  is required.
- Auth Token yet to be added as discussed in
  https://www.gluster.org/pipermail/gluster-devel/2016-August/050324.html

Change-Id: I159acf80b681d10b82d52cfb3ffdf85cb896542d
BUG: 1367774
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/15189
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
2016-08-30 18:34:59 -07:00
Nigel Babu
8bb8e3d394 Clean up the failed-buids.py script
* Use the Jenkins API instead of looking up every job.
* Unify the output function with Pystache
* Mostly follow pep8 guidelines and make the script more pythonic

Change-Id: Ia5e0061638732e293e94b3a8ad9e25a7db65cfa5
Signed-off-by: Nigel Babu <nigelb@redhat.com>
Reviewed-on: http://review.gluster.org/15034
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-08-29 05:12:40 -07:00
Prasanna Kumar Kalever
87303b77dd extras: kill gsyncd before glusterfsd
It's a good practice to kill gsyncd before brick process, else we see
unnecessary loops and logs of bring up the faulty bricks

Change-Id: I2d2176f2bf5014f3afd622194a8b2d60c86926af
BUG: 1367771
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Reviewed-on: http://review.gluster.org/15187
Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
2016-08-29 04:55:15 -07:00
Prasanna Kumar Kalever
14b46be09c extras: kill processes gracefully
Currently all of brick, gsyncd and other glustershd services/processes
are killed without checking for ongoing tasks such as geo-rep,
self-heal, rebalance and etc. which may lead to inconsistency after
the node is brought back.

This patch introduce an option '-g' which ensures whether all the
gluster processes are ready (not busy) to be terminated before we
executing 'kill' on them

Usage: ./extras/stop-all-gluster-processes.sh [-g] [-h]
    options:
    -g  Terminate in graceful mode
    -h  Show this message, then exit

 eg:
  1. ./extras/stop-all-gluster-processes.sh
  2. ./extras/stop-all-gluster-processes.sh -g

By default, this script executes in force mode, processes are killed
without checking for ongoing tasks, on specifying '-g' option this
script works in graceful mode, which returns exitcode if some of gluster
processes are busy in doing their jobs.

exitcodes include:
   0       No errors/Success
   64      Rebalance is in progress
   65      Self-Heal is in progress
   66      Tier daemon running on this node
   127     option not found

Change-Id: I2f924b2bf9f04a81788d0f5604895a42755b33a1
BUG: 1367771
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Reviewed-on: http://review.gluster.org/15188
Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: mohammed rafi  kc <rkavunga@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2016-08-29 04:54:49 -07:00