Commit Graph

434 Commits

Author SHA1 Message Date
Jiffin Tony Thottan
79e9aa5d7a ganesha/scripts : remove 'HA_VOL_SERVER' from the code
The parameter HA_VOL_SERVER introduced intially ganesha-ha.conf to
specify gluster server from which to mount the shared data volume.
But after introducing new cli for the same purpose, it become
unnecessary. The existence of that parameter can lead confussion
to the users. This patch will remove/replace all the instance of
HA_VOL_SERVER from the code

Change-Id: I638c61dcd2c21ebdb279bbb141d35bb806bd3ef0
BUG: 1350371
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14812
Tested-by: Kaleb KEITHLEY <kkeithle@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>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-08-25 22:54:00 -07:00
Jiffin Tony Thottan
76726da0e8 glusterd/ganesha : Move ganesha-ha.conf and ganesha.conf to shared storage
Currently all the ganesha related configuration files(ganesha.conf,
ganesha-ha.conf, export files, etc) is stored locally at /etc/ganesha
on a every node in ganesha cluster. Usually we end up in two issues by
doing so :
* difficult in modifiying ganesha related conf file
* diffciult to maintain consistency of conf file across ganesha cluster
To tackle this, we plan to move all the ganesha configuration to shared
storage. As a first step in this patch ganesha.conf and ganesha-ha.conf
move to shared storage. Here actual ganesha.conf will resides in shared
stoarge and symlinks will be created in /etc/ganesha when the option
"gluster nfs-ganesha enable" is executed and remove those during the
"disable" part.

Modified prerequisites to done before running globaloption:
	* enable shared storage
	* create nfs-ganesha folder in shared storage
	* create ganesha.conf and ganesha-ha.conf in it

More details can be found at http://review.gluster.org/#/c/15105/

Change-Id: Ifabb6c5db50061f077a03932940190af74e2ca7f
BUG: 1355956
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14906
Reviewed-by: soumya k <skoduri@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-08-25 06:55:57 -07:00
Niels de Vos
9f22282795 build: systemd unit should not be marked executable
systemd complains about the unit for GlusterD when it is executable:

  Configuration file /usr/lib/systemd/system/glusterd.service is marked executable. Please remove executable permission bits. Proceeding anyway.

The Makefile that installs the unit has some scripted commands. These
are not needed and standard "*dir" and "*DATA" postfixes for variables
can be used instead.

The EXTRA_DIST variable is needed for building the 'make dist' tarball
on systems where there is no systemd. The unit would be missing from the
tarball if it is not explicitly included.

BUG: 1354489
Change-Id: I5e72ec201036906b9b2458bc8931ccebf9a8c6b4
Reported-by: Sergej Pupykin <ml@sergej.pp.ru>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/14892
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-08-07 18:05:05 -07:00
Soumya Koduri
ea6a1ebe93 commn-HA: Add portblock RA to tickle packets post failover(/back)
Portblock resource-agents are used to send tickle ACKs so as to
reset the oustanding tcp connections. This can be used to reduce
the time taken by the NFS clients to reconnect post IP
failover/failback.

Two new resource agents (nfs_block and nfs_unblock) of type
ocf:portblock with action block & unblock are created for each
Virtual-IP (cluster_ip-1). These resource agents along with cluster_ip-1
RA are grouped in the order of block->IP->unblock and also the entire
group maintains same colocation rules so that they reside on the same
node at any given point of time.

The contents of tickle_dir are of the following format -
* A file is created for each of the VIPs used in the ganesha cluster.
* Each of those files contain entries about clients connected
  as below:
SourceIP:port_num       DestinationIP:port_num

Hence when one server failsover, connections of the clients connected
to other VIPs are not affected.

Note: During testing I observed that tickle ACKs are sent during
failback but not during failover, though I/O successfully
resumed post failover.

Also added a dependency on portblock RA for glusterfs-ganesha package
as it may not be available (as part of resource-agents package) in
all the distributions.

Change-Id: Icad6169449535f210d9abe302c2a6971a0a96d6f
BUG: 1354439
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/14878
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>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2016-08-03 05:02:10 -07:00
Poornima G
afd27ad5e9 extras: Change failed_tests.py to generate html output
Running failed-tests.py as a job in jenkins to send the regression
report periodically to gluster-devel. Hence, clean up some of the
argument parsing code and add support for html display of the output

Change-Id: Ic6daf87e3fa9b0ef8401d68cbd0010f166ea4961
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/14996
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Nigel Babu <nigelb@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
2016-07-27 02:09:54 -07:00
Jeff Darcy
934cae8781 infra: remove anti-typedef check
Linus's dislike of typedefs is one of his most idiosyncratic positions,
at odds with the mainstream of software engineering and practice.
There's no reason that quirk should have been imposed on this project,
which was done by fiat when we adopted a style checker written for a
very different audience and environment.

Change-Id: Ic08b0d14a0130ee88c3f60dcac07670d91004c2b
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/15004
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>
2016-07-26 07:50:16 -07:00
Poornima G
ff49529be3 extras: fix failed_tests.py to work
The text in the regression console output, now has the following prepended:
"<span class="timestamp"><b>08:27:48</b> </span>"
with every line. Hence changing all the instances where the entire line
was compared, to find the pattern in the line.

Also, another usability change to take centos/netbsd as an argument
instead of the regression link.

Change-Id: I1648ab90fa6d34bb8b82a0a33401c5a2ecb86426
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/14914
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>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-07-21 05:02:11 -07:00
Aravinda VK
5ed781ecf5 eventsapi: Gluster Eventing Feature implementation
[Depends on http://review.gluster.org/14627]

Design is available in `glusterfs-specs`, A change from the design
is support of webhook instead of Websockets as discussed in the design

http://review.gluster.org/13115

Since Websocket support depends on REST APIs, I will add Websocket support
once REST APIs patch gets merged

Usage:
Run following command to start/stop Eventsapi server in all Peers,
which will collect the notifications from any Gluster daemon and emits
to configured client.

    gluster-eventsapi start|stop|restart|reload

Status of running services can be checked using,

    gluster-eventsapi status

Events listener is a HTTP(S) server which listens to events emited by
the Gluster. Create a HTTP Server to listen on POST and register that
URL using,

    gluster-eventsapi webhook-add <URL> [--bearer-token <TOKEN>]

For example, if HTTP Server running in `http://192.168.122.188:9000`
then add that URL using,

    gluster-eventsapi webhook-add http://192.168.122.188:9000

If it expects a Token then specify it using `--bearer-token` or `-t`

We can also test Webhook if all peer nodes can send message or not
using,

    gluster-eventsapi webhook-test <URL> [--bearer-token <TOKEN>]

Configurations can be viewed/updated using,

    gluster-eventsapi config-get [--name]
    gluster-eventsapi config-set <NAME> <VALUE>
    gluster-eventsapi config-reset <NAME|all>

If any one peer node was down during config-set/reset or webhook
modifications, Run sync command from good node when a peer node comes
back. Automatic update is not yet implemented.

    gluster-eventsapi sync

Basic Events Client(HTTP Server) is included with the code, Start
running the client with required port and start listening to the
events.

    /usr/share/glusterfs/scripts/eventsdash.py --port 8080

Default port is 9000, if no port is specified, once it started running
then configure gluster-eventsapi to send events to that client.

Eventsapi Client can be outside of the Cluster, it can be run event on
Windows. But only requirement is the client URL should be accessible
by all peer nodes.(Or ngrok(https://ngrok.com) like tools can be used)

Events implemented with this patch,
- Volume Create
- Volume Start
- Volume Stop
- Volume Delete
- Peer Attach
- Peer Detach

It is easy to add/support more events, since it touches Gluster cmd
code and to avoid merge conflicts I will add support for more events
once this patch merges.

BUG: 1334044
Change-Id: I316827ac9dd1443454df7deffe4f54835f7f6a08
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14248
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-07-18 13:52:20 -07:00
Aravinda VK
19adaad015 extras/cliutils: Utils for creating CLI tools for Gluster
Refer README.md for documentation.

BUG: 1342356
Change-Id: Ic88504177137136bbb4b8b2c304ecc4af9bcfe30
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14627
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-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: Jeff Darcy <jdarcy@redhat.com>
2016-07-12 09:07:29 -07:00
Jiffin Tony Thottan
ec3ea75513 ganesha/scripts : delete nfs-ganesha folder from shared storage during clean up
A directory named "nfs-ganesha" will be created inside shared storage when
'gluster nfs-ganesha enable' is executed. Similarly this directory should be
removed when 'gluster nfs-ganesha disable' is executed.

Change-Id: Icc09b32010de07c9809e22aafbb2fd08a5c8252f
BUG: 1349398
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14782
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-06-23 17:48:38 -07:00
Prasanna Kumar Kalever
bdde0cfa1d clang-analyzer: adding clang static analysis support
clang static analyzer is a source code analysis tool that
finds bugs in C, C++.

This patch automates clang analyzes part by integrating
it with 'make clang-check'

clang-checker.sh: runs clang analyzer with and without the
HEAD commit, and shows the bugs introduced by HEAD commit (if any)

sample report:

$[ glusterfs ]: make clang-check

================ Clang analyzer in progress ================
...

BASELINE BUGS LIST (before applying patch):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Out of bound array access --> 3
Memory leak --> 1
Unix API --> 24
Dead increment --> 5
Dereference of null pointer --> 1995
Uninitialized argument value --> 2
All Bugs --> 2872
Called function pointer is null null dereference --> 4
Dead initialization --> 49
Dead assignment --> 691
Undefined allocation of 0 bytes CERT MEM0 C CWE --> 5
Argument with nonnull attribute passed null --> 84
Result of operation is garbage or undefined --> 9

TARGET BUGS LIST (after applying patch):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Out of bound array access --> 3
Memory leak --> 1
Unix API --> 24
Dead increment --> 5
Dereference of null pointer --> 1995
Uninitialized argument value --> 2
All Bugs --> 2875
Called function pointer is null null
dereference --> 4
Dead initialization --> 49
Dead assignment --> 694
Undefined allocation of 0 bytes CERT MEM0 C CWE --> 5
Argument with nonnull attribute passed null --> 84
Result of operation is garbage or undefined --> 9

SUMMARY OF CLANG-ANALYZER:
~~~~~~~~~~~~~~~~~~~~~~~~~~
Extra 3 Bug[s] Introduced in: Dead assignment

Patch Value given by Clang analyzer '-1'

Explore complete results at
/home/user/work/glusterfs/baseline/results/index.html
/home/user/work/glusterfs/target/results/index.html

================= Done with Clang Analysis =================

Change-Id: I512e33cfc02885a111152fbc1832144261dda1da
BUG: 1228142
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Reviewed-on: http://review.gluster.org/11083
Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-06-07 06:56:09 -07:00
Kaleb S KEITHLEY
04b5886132 common-ha: race/timing issue setting up cluster
The ganesha_grace resource agent can start before the ganesha_mon
resource agent, with the result that the crm_attribute that
ganesha_grace expects to find has not been created yet.

This is never (never? Or just so rarely that it has never actually
been seen during development) seen with four nodes, but with just
two nodes it's very repeatable.

Note that when long (FQDN) names are used it is not unexpected to
see Failed Actions in the output of `pcs status`, e.g.:

* nfs-grace_monitor_5000 on node1.fully.qualified.domain.name.com
'unknown error' (1): call=20, status=complete, exitreason='none',
last-rc-change='Wed Jun  1 12:32:32 2016', queued=0ms, exec=0ms
* nfs-grace_monitor_5000 on node2.fully.qualified.domain.name.com
'unknown error' (1): call=18, status=complete, exitreason='none',
last-rc-change='Wed Jun  1 12:32:42 2016', queued=0ms, exec=0ms

and as long as all the ganesha_grace_clone and cluster_ip-1
resource agents are in Started state then this is okay.

Change-Id: I726c9946ceb1ca92872b321612eb0f4c3cc039d8
BUG: 1341768
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/14607
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2016-06-03 21:10:02 -07:00
Niels de Vos
01d0356ca7 ganesha: fix the shebang for the copy-export script
BUG: 1340488
Change-Id: I22061a8b8bc0ea43da91e5b2904a27a674a004be
Reported-by: Patrick Matthäi <pmatthaei@debian.org>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/14548
Smoke: Gluster Build System <jenkins@build.gluster.com>
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.com>
2016-05-29 03:55:13 -07:00
Kaleb S KEITHLEY
4394291064 common-ha: wait for cluster to elect DC before accessing CIB
access attempts, e.g. `pcs property set stonith-enabled=false`
will fail (or time out) if attempted "too early", i.e. before
the cluster has elected its DC.

Change-Id: Ifc0aa7ce652c1da339b9eb8fe17e40e8a09b1096
BUG: 1336945
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/14426
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
2016-05-24 02:35:58 -07:00
Kaleb S KEITHLEY
db817ff681 common-ha: post fail-back, ganesha.nfsds are not put into NFS-GRACE
A little known, rarely used feature of pacemaker called
"notification" is used to follow the status of the ganesha.nfsds
in the cluster. This is done with location constraints and other
Black Magick.

When a nfsd dies, the ganesha-active attribute is cleared, the
associated floating IP (VIP) fails over to another node, and the
ganesha_grace notify method is invoked with post-stop on all the
nodes where the ganesha.nfsd is still running. The notify methods
send dbus msgs to put their nfsds into NFS-GRACE, and the nfsds
perform their grace processing, e.g. taking over locks from the
failed nfsd.

N.B. Fail-back was originally not planned to be a feature for
glusterfs-3.7, but we sorta got it for free.

For fail-back, the opposite occurs. The ganesha-active attribute
is recreated, the floating IP fails back, and the notify method is
invoked with pre-start on all the nodes where the surviving
ganesha.nfsds continue to run. The notify methods send dbus msgs
again to put their nsfds into NFS-GRACE again, and the nfsds clean
up their locks.

Change-Id: I3fc64afa20ae3a928143d69aa533a8df68dd680e
BUG: 1338967
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/14506
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2016-05-24 01:41:18 -07:00
Kaleb S KEITHLEY
5cf7a32be8 common-ha: log flooded with Could not map name=xxxx to a UUID
When the cluster is configured with long (FQDN) cluster members
the log is flooded with "Could not map name=$shortname to a UUID"
notices, and setting/getting the attribute is failing

Change-Id: I954d8cef7115659cc9c8b23dae75a5a247dc5db7
BUG: 1337650
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/14435
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
2016-05-23 01:55:52 -07:00
Kaleb S KEITHLEY
5bd9d42c99 common-ha: stonith-enabled option set error in new pacemaker
Setting the option too early results in an error in newer versions
of pacemaker. Postpone setting the option in order for it to succeed.

N.B. We do not use a fencing agent. Yes, we know this is not supported.

Change-Id: I86953fdd67e6736294dbd2d0795611837188bd9d
BUG: 1336945
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/14404
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
2016-05-19 03:17:07 -07:00
Prasanna Kumar Kalever
b923f8c08f git-branch-diff: wrapper script for git to visualize backports
This script helps in visualizing backported and missed commits between two
different branches, tags or commit ranges. In the list of missed commits,
it will help you identify patches which are posted for reviews on gerrit server.

While backporting commit to another branch only subject of the patch may
remain unchanged, all others such as commit message,  commit Id, change Id,
bug Id, may be changed. This script works by taking commit subject as the
key value for comparing two git branches, which can be local or remote.

Help:
$ ./extras/git-branch-diff.py --help
    usage: git-branch-diff.py [-h] [-s SOURCE] -t TARGET [-a AUTHOR] [-p PATH]
                              [-o OPTIONS]

    git wrapper to diff local or remote branches/tags/commit-ranges

    optional arguments:
     -h, --help            show this help message and exit
     -s SOURCE, --source SOURCE
                           source pattern, it could be a branch, tag or a commit
                           range
     -t TARGET, --target TARGET
                           target pattern, it could be a branch, tag or a commit
                           range
     -a AUTHOR, --author AUTHOR
                           default: git config name/email, to provide multiple
                           specify comma separated values
     -p PATH, --path PATH  show source and target diff w.r.t given path, to
                           provide multiple specify space in between them
     -o OPTIONS, --options OPTIONS
                           add other git options such as --after=<>, --before=<>
                           etc. experts use;

Sample usages:
  $ ./extras/git-branch-diff.py -t origin/release-3.8
  $ ./extras/git-branch-diff.py -s local_branch -t origin/release-3.7
  $ ./extras/git-branch-diff.py -s 4517bf8..e66add8 -t origin/release-3.7
  $ ./extras/git-branch-diff.py -s HEAD..c4efd39 -t origin/release-3.7
  $ ./extras/git-branch-diff.py -t v3.7.11 --author="author@redhat.com"
  $ ./extras/git-branch-diff.py -t v3.7.11 --author="authorX, authorY, authorZ"
  $ ./extras/git-branch-diff.py -t origin/release-3.8 --path="xlators/"
  $ ./extras/git-branch-diff.py -t origin/release-3.8 --path="./xlators ./rpc"
  $ ./extras/git-branch-diff.py -t origin/release-3.6 --author="*"
  $ ./extras/git-branch-diff.py -t origin/release-3.6 --author="All"
  $ ./extras/git-branch-diff.py -t origin/release-3.6 --author="Null"
  $ ./extras/git-branch-diff.py -t v3.7.11 --options "--after=2015-03-01 \
                                                      --before=2016-01-30"

Example output:
$ ./extras/git-branch-diff.py -t origin/release-3.8 --path="./rpc"

------------------------------------------------------------

[ ✔ ] Successfully Backported changes:
      {from: remotes/origin/master  to: origin/release-3.8}

[84e90b7] server/protocol: option for dynamic authorization of client permissions
[5bf6522] rpc: By default set allow-insecure, bind-insecure to on
[3af9b53] glusterd: try to connect on GF_PMAP_PORT_FOREIGN aswell
[9442e7b] rpc: fix binding brick issue while bind-insecure is enabled
[7370633] rpc: assign port only if it is unreserved
[88a386b] rpc: fix gf_process_reserved_ports

------------------------------------------------------------

[ ✖ ] Missing patches in origin/release-3.8:

All keys already loaded
[50ca123] rpc: define client port range (under review)
[89759de] glusterd: add defence mechanism to avoid brick port clashes (under review)

------------------------------------------------------------

Note: This script may ignore commits which have altered their commit subjects
while backporting patches. Also this script doesn't have any intelligence to
detect squashed commits.

Change-Id: Ieb27e548c1945a208e2f5d390c99cac82d18a665
BUG: 1336642
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Reviewed-on: http://review.gluster.org/14230
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
2016-05-18 10:11:03 -07:00
Rajesh Joseph
57185759cc extra/devel-vagrant: accept gluster src location from user
Currently gluster source location is hard-coded in vagrantfile.

Made the source location user configurable and also fixed minor issue
with peer probe with single node.

Change-Id: I7057a97d7372477ddbf01fbc8db949923dfd86e8
BUG: 1336354
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/14354
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-05-18 10:10:14 -07:00
Kaleb S KEITHLEY
2df72780e4 scripts: bash-isms in scripts
Change-Id: I05f8718fb73c16dbb37c1f7460bb7b55cc0ffe97
BUG: 1336853
Reported-by: Patrick Matthäi <pmatthaei@debian.org>
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/14401
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-05-18 02:22:35 -07:00
Kaleb S KEITHLEY
138935bf8d core: assorted typos and spelling mistakes reported by Debian lintian
Also missing bang (!) in #!/bin/bash in shell scripts.

Change-Id: I567a4be8f0f31f6285550f243fe802895f6bc43b
BUG: 1336793
Reported-by: Patrick Matthäi <pmatthaei@debian.org>
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/14398
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-05-18 02:21:42 -07:00
Kaleb S KEITHLEY
5daa68bbdd common-ha: floating IP (VIP) doesn't fail over when ganesha.nfsd dies
restore mistaken removal of 'attrd_updater delete grace-active' to
trigger fail-over

original was:
   attrd_updater -D -n grace-active
   sleep
   attrd_updater -D -n ganesha-active

mistake was:
   sleep
   attrd_updater -D -n grace-active

Change-Id: Ifb20ebc673b8d262dfb720e7d5c060fbf0d1639b
BUG: 1336197
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/14343
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
2016-05-15 18:25:36 -07:00
Prasanna Kumar Kalever
48608e2ca1 extras: stop all include glusterfs process as well
currently, extras/stop-all-gluster-processes.sh script handles
brick processes, node services and geo-rep's gsync process.

from now this script also handles mount processes as well,
as part of this patch I have reorganized this script

Change-Id: Id62d6fda6dd331bde722ce3d99ec3f09fed55cb0
BUG: 1334620
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Reviewed-on: http://review.gluster.org/14277
Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-05-13 15:07:10 -07:00
Jiffin Tony Thottan
8299ad374b ganesha/scripts : Fixing refresh config in ganesha-ha.sh
The change http://review.gluster.org/#/c/14225/ cause a regression
for refresh config funtion in ganesha-ha.sh due to a invalid usage
of awk arguement.

Change-Id: Id5adfb12f99b29bdb3531773cd34bd67cfff8768
BUG: 1333319
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14325
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2016-05-13 05:01:42 -07:00
Jiffin Tony Thottan
f71e2fa49a glusterd-ganesha : copy ganesha export configuration files during reboot
glusterd creates export conf file for ganesha using hook script during
volume start and ganesha_manage_export() for volume set command. But this
routine is not added in glusterd restart scenario.
Consider the following case, in a three node cluster a volume got exported
via ganesha while one of the node is offline(glusterd is not running).
When the node comes back online, that volume is not exported on that node
due to the above mentioned issue.
Also I have removed unused variables from glusterd_handle_ganesha_op()
For this patch to work pcs cluster should running on that be node.

Change-Id: I5b2312c2f3cef962b1f795b9f16c8f0a27f08ee5
BUG: 1330097
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14063
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2016-05-05 23:12:40 -07:00
Jiffin Tony Thottan
5440bad910 NFS-Ganesha : Parse the Export_Id correctly for unexporting volume
Currently export id parsed using "cut -d ' ' -f8" which might endup
in giving wrong value. In case of multiple space chracter, output
may differ. In this all those instance will replaced by awk call

Change-Id: I60dea8ce116900da3c1fc9badf898e51183a2ca1
BUG: 1333319
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14225
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-05-05 11:13:45 -07:00
Aravinda VK
80e3832ec1 geo-rep: Fix gluster binary invocation while running as cron
When scheduler script was executed as cron, it was unable to detect
the Gluster binaries.

BUG: 1331658
Change-Id: Ic9c533586ed9a472765f69aa2f87d004c46d4340
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14111
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2016-04-29 21:13:59 -07:00
Kaleb S KEITHLEY
6530521700 common-ha: continuous grace_mon log messages in /var/log/messages
messages are seen on RHEL6.x and RHEL7.1 and earlier versions of
pacemaker. (And RHEL7.2 with RHEL7.1 pacemaker packages.)

It's not possible to query attrd attributes in the older version,
only set/update/clear them. The messages come from invalid attempts
to query the attributes.

However it is possible to query crm attributes. The fix here is to
create a "shadow" crm attribute for the attrd attribute. Changes are
made to both, queries are made on the crm attribute.

(Resource Agents "follow" the attrd attribute using constraint locations,
so we must keep the attrd attribute.)

Change-Id: I84ac1a80673e528d98b67b7d5062e21dcf744d4a
BUG: 1324509
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/13919
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
2016-04-28 03:19:50 -07:00
Kaleb S KEITHLEY
1866836749 packaging: additional dirs and files in /var/lib/glusterd/
Add the missing /var/lib/glusterd files and dirs found by
downstream testing. Use a loop to create hook dirs instead
of open-coding. Merge the %ghost and non-ghost dirs in
-server %files section for easier maintenance.

Eliminate a benign warning for enabling non-existent
glusterfsd.{init,service} which is only relevant to Fedora
builds

Don't reject glusterfs.spec.in changes because of long lines

Change-Id: I5802175d729e0168eea879a2a61626b0b73d77c8
BUG: 1326410
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/13981
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-04-26 08:46:40 -07:00
Rajesh Joseph
a9b78f1ebe devel-tools: vagrant setup for creating devel VMs
Created vagrant setup for Gluster developers. The Vagrantfile
is modifed from the work done by Chris (cblum@redhat.com).
Ansible structure is taken from test vagrant infra initially
posted by rtalur.

This vagrant setup can create one or more VM (using libvirt),
create thinly provisioned LVs, format them with XFS and mount them.
It will also compile the source from host machine (/work/source) and
install gluster. It will also do peer probe.

Change-Id: Ie984f661bb5dc9cfc4059643389d3c80b2cae21d
BUG: 1327976
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/13734
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Raghavendra Talur <rtalur@redhat.com>
2016-04-26 05:28:01 -07:00
Aravinda VK
8590c1cf3c geo-rep: Fix checkpoint issue in scheduler
If checkpoint is not met, Scheduler script should touch the
Mount point so that SETATTR will get recorded in every brick
Changelog. Script was not touching the mount point in each iteration.

BUG: 1328399
Change-Id: I2718a764fb3e550742c9dcd316724683561ddf18
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/14029
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
2016-04-26 02:14:28 -07:00
jiffin tony Thottan
62027360a6 Revert "NFS-Ganesha : scripts related changes for supporting multiple export entires for volume"
This reverts change-id I2286af4877f96f4334435818f67beea87efa2b1f.
While testing, I had found that ganesha-ha.sh is not working as expected. It is
almost equivalent to rewrite entire thing again

Change-Id: Ia85e50fe8e043e8a2bc6441b7c45dcc726b36672
BUG: 1275966
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/13673
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
2016-04-24 16:29:47 +02:00
Poornima G
f5383e1129 extras: Fix the create_new_xlator tool
It is currently importing a non existing module.
Remove the same.

Change-Id: I7f4b790ba42d8683575768ec14851932a8cddc43
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/13960
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-04-13 08:01:52 -07:00
Poornima G
e9d5f8c753 extras: Enable failed-tests.py to fetch regression summary for more than 30 builds
Credits: Raghavendra Talur

Change-Id: I4a895f57e9ab0e5d28e78c467e5b52d347586706
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/13922
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-04-12 13:48:14 -07:00
Vijay Bellur
09c9da3b12 extras: Add namespace for options in group-virt.example
Commit 23ccabbeb7 introduced a new key "disperse.eager-lock" which
causes a conflict with key "cluster.eager-lock" when option is used
without the qualifying namespace. group-virt.example which gets
installed as /var/lib/glusterd/ groups/virt contains options without
namespace qualifiers. This patch adds the appropriate namespace to all
options in group-virt.example.

Change-Id: I2c09dd10d44138410d889ddeb805f01c641c6780
BUG: 1314649
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/13929
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2016-04-09 12:00:30 -07:00
Atin Mukherjee
dd02c5af9a extras: allign glusterd stop response in init script
An echo is missing stop() function which results in bad allignment of glusterd
stop output

Change-Id: I63ac9571457db90574fb1bfbf4f18ba09d3df1af
BUG: 1321762
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/13839
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-03-30 12:42:01 -07:00
Ravishankar N
afbdcda3f4 extras:add gfid-to-dirname.sh
Add a script that converts the gfid-string of a directory into absolute
path name w.r.t the brick path.

Example:gfid-to-dirname.sh /home/ravi/bricks/brick1 e9c81321-f009-41b0-a009-cd77888c217e
Location of the directory corresponding to gfid:e9c81321-f009-41b0-a009-cd77888c217e is /home/ravi/bricks/brick1/d1/d2/d3/d4/d5/d6/d7/

Change-Id: I276ddf9c4f3d11a5b1932286d848b00b5ea1895d
BUG: 1319706
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-on: http://review.gluster.org/13797
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: bipin kunal <kunalbipin@gmail.com>
Tested-by: bipin kunal <kunalbipin@gmail.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2016-03-22 19:24:17 -07:00
Poornima G
056bce103c extras: Ease creation of new xlators
Add a python generator that creates a template for new xlator.

Co-Authored by Jeff Darcy.

Change-Id: I10820c0483794dcd450656684cf954f7b8f159e0
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/13061
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-03-22 11:51:07 -07:00
Soumya Koduri
9879c4e543 ganesha: Include a script to generate epoch value
In a NFS-Ganesha HA cluster setup, for NFS clients to recover state
succesfully post failover, the NFS-servers should start with a unique
epoch value.

With NFS-Ganesha 2.3, the service accepts an option "EPOCH_EXEC" which
takes path of the script, generating epoch value. This script is executed before
starting nfs-ganesha service so that the generated epoch value is used
while bringing up the service.

This patch includes the script to be used by nfs-ganesha+gluster setup.

The epoch value is computed as follows -
       - first 32-bit contains the now() time
       - rest 32-bit value contains the local glusterd node uuid

Change-Id: I876ea5a3730d7c6b40503e0fec16a4a142c54a36
BUG: 1317902
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/13744
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-03-21 01:15:04 -07:00
Kaleb S KEITHLEY
53d81d9ece ganesha-ha: merge release-3.7 to master for release-3.8
cherry-pick changes from release-3.7 branch to master in preparation
for 3.8

changes merged/cherry-picked from release-3.7 consist of:

> common-ha: delete virt-IP entry of deleted node
> commit aee983ff43655771a9102592a284d0b0a29ad89f
> BUG: 1250601
>
> common-ha: concise output for HA status
> commit d804b17f2fe92b1516f85f03978072c42ddc6f19
> BUG: 1250628
>
> common-ha : refresh-config should print sensible output
> commit d7adcca24fb9638df2806c01d8ea7e73eec46928
> BUG: 1254494
>
> CommonHA: Avoid scp of the config state to the same host
> commit 07b31a008b59d6c0b06bd17994de85fc56560b38
> BUG: 1259225
>
> CommonHA: Fix the path of 'systemctl' cmd
> commit 8e7ca068720fa6fa50e4746e5b17c305f38171e8
> BUG: 1259225
>
> common-ha: refresh-config output includes dbus "method return" msg
> commit 045cb34238e341d68288893b8f040056e138c04e
> BUG: 1262881
>
> common-ha: distribution neutral location of config files
> commit 6667478cdba920d2658bba2edc99c8f8cc33e271
> BUG: 1251821
>
> common-ha: Corrected refresh-config output parsing
> commit 2892bab69cac2d991509fca1279a659bce1ae793
> BUG: 1254494
>
> common-ha: reliable grace using pacemaker notify actions
> commit e8121c4afb3680f532b450872b5a3ffcb3766a97
> BUG: 1290865
>
> ganesha: Read export_id on each node while performing refresh-config
> commit e0e633cdce7586af92490730257ed7f0cffcff61
> BUG: 1309238
>
> nfs-ganesha: pcs cluster setup needs '--name' option
> commit 812e7321d3c56d329526628fe96a8f6fabea75ca
> BUG: 1314204

Change-Id: I41c19bd369bd9da1092b0677590634a4e9f72813
BUG: 1317424
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/13728
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-03-15 00:26:01 -07:00
Soumya Koduri
f032bc6cae nfs-ganesha: pcs cluster setup needs '--name' option
Even on fedora machines (on f22, f23), pcs cluster setup CLI
expects '--name' to be provided. This patch addresses the same.

BUG: 1314204
Change-Id: If23851bfd7fe2f1c200731d66dcb3e744390ff83
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/13590
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-on: http://review.gluster.org/13727
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-03-15 00:25:38 -07:00
Soumya Koduri
ef1b79a867 ganesha: Read export_id on each node while performing refresh-config
As mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1309238#c1,
there could be cases which shall result in having different ExportIDs
for the same volume on each node forming the ganesha cluster.

Hence during refresh-config, it is necessary to read the ExportID on
each of those nodes and re-export that volume with the same ID.

BUG: 1309238
Change-Id: Id39b3a0ce2614ee611282ff2bee04cede1fc129d
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/13459
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/13726
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-03-15 00:25:19 -07:00
Kaleb S KEITHLEY
40a24f5ab9 common-ha: reliable grace using pacemaker notify actions
Using *-dead_ip-1 resources to track on which nodes the ganesha.nfsd
had died was found to be unreliable.

Running `pcs status` in the ganesha_grace monitor action was seen to
time out during failover; the HA devs opined that it was, generally,
not a good idea to run `pcs status` in a monitor action in any event.
They suggested using the notify feature, where the resources on all
the nodes are notified when a clone resource agent dies.

This change adds a notify action to the ganesha_grace RA. The ganesha_mon
RA monitors its ganesha.nfsd daemon. While the daemon is running, it
creates two attributes: ganesha-active and grace-active. When the daemon
stops for any reason, the attributes are deleted. Deleting the
ganesha-active attribute triggers the failover of the virtual IP (the
IPaddr RA) to another node where ganesha.nfsd is still running. The
ganesha_grace RA monitors the grace-active attribute. When the
grace-active attibute is deleted, the ganesha_grace RA stops, and will
not restart. This triggers pacemaker to trigger the notify action in
the ganesha_grace RAs on the other nodes in the cluster; which send a
DBUS message to their ganesha.nfsd.

(N.B. grace-active is a bit of a misnomer. while the grace-active
attribute exists, everything is normal and healthy. Deleting the
attribute triggers putting the surviving ganesha.nfsds into GRACE.)

To ensure that the remaining/surviving ganesha.nfsds are put into
NFS-GRACE before the IPaddr (virtual IP) fails over there is a short
delay (sleep) between deleting the grace-active attribute and the
ganesha-active attribute. To summarize:
  1. on node 2 ganesha_mon:monitor notices that ganesha.nfsd has died
  2. on node 2 ganesha_mon:monitor deletes its grace-active attribute
  3. on node 2 ganesha_grace:monitor notices that grace-active is gone
     and returns OCF_ERR_GENERIC, a.k.a. new error. When pacemaker
     tries to (re)start ganesha_grace, its start action will return
     OCF_NOT_RUNNING, a.k.a. known error, don't attempt further
     restarts.
  4. on nodes 1, 3, etc., ganesha_grace:notify receives a post-stop
     notification indicating that node 2 is gone, and sends a DBUS
     message to its ganesha.nfsd putting it into NFS-GRACE.
  5. on node 2 ganesha_mon:monitor waits a short period, then deletes
     its ganesha-active attribute. This triggers the IPaddr (virt IP)
     failover according to constraint location rules.

ganesha_nfsd modified to run for the duration, start action is invoked
to setup the /var/lib/nfs symlink, stop action is invoked to restore it.
ganesha-ha.sh modified accordingly to create it as a clone resource.

BUG: 1290865
Change-Id: I1ba24f38fa4338b3aeb17c65645e9f439387ff57
Signed-off-by: Kaleb S KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/12964
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-on: http://review.gluster.org/13725
2016-03-14 21:34:27 -07:00
Soumya Koduri
7240923a55 common-ha: Corrected refresh-config output parsing
>>>> Sample program with the earlier changes -
output=$(dbus-send --print-reply --system \
--dest=org.ganesha.nfsd /org/ganesha/nfsd/ExportMgr \
org.ganesha.nfsd.exportmgr.RemoveExport uint16:5 2>&1\
  | grep -v "^method return")
ret=$?
echo "${output}"
echo $ret
sleep 1
output=$(dbus-send --system --dest=org.ganesha.nfsd \
/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \
string:/usr/etc/ganesha/exports/export.vol3.conf \
string:"EXPORT(Path=/vol3)" 2>&1  | grep -v "^method return")
ret=$?
echo "${output}"
echo $ret

Output:

1

1

Even if the command was successfully executed, 'grep -v' has
filtered out the output.

>>>> Sample program with the current changes -

output=$(dbus-send --print-reply --system --dest=org.ganesha.nfsd \
/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.RemoveExport\
 uint16:5 2>&1)
ret=$?
echo "${output}"
echo $ret
sleep 1
output=$(dbus-send --print-reply --system --dest=org.ganesha.nfsd \
/org/ganesha/nfsd/ExportMgr org.ganesha.nfsd.exportmgr.AddExport \
string:/usr/etc/ganesha/exports/export.vol3.conf \
string:"EXPORT(Path=/vol3)" 2>&1)
ret=$?
echo "${output}"
echo $ret

Output:
method return sender=:1.155 -> dest=:1.174 reply_serial=2
0
method return sender=:1.155 -> dest=:1.175 reply_serial=2
   string "1 exports added"
0

BUG: 1254494
Change-Id: I44fbe32588ec11f087c8b99b2d55ed55ba73727c
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/12439
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/13724
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-03-14 21:34:01 -07:00
Joe Julian
6d83559ea4 common-ha: distribution neutral location of config files
work on systems with config files in directories other than
/etc/sysconfig.

BUG: 1251821
Change-Id: I009946623b508ba422a4881913455218d8846055
Signed-off-by: Joe Julian <me@joejulian.name>
Reviewed-on: http://review.gluster.org/12132
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/13723
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-03-14 21:33:37 -07:00
Kaleb S. KEITHLEY
932ef7d760 common-ha: refresh-config output includes dbus "method return" msg
filter out extraneous text from dbus-send

BUG: 1262881
Change-Id: I2fec5c0cc8d1db0a12a42ca2d727a4320fd57b30
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/12174
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/13722
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-03-14 21:30:14 -07:00
Soumya Koduri
bcb3f9ba2b CommonHA: Fix the path of 'systemctl' cmd
'systemctl' command path should be '/usr/bin/sytemctl'.
Fixed the typo in the HA-script.

BUG: 1259225
Change-Id: I0e7fcc1eb74419679d78d4cc61253c6edf23b57b
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/12089
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-on: http://review.gluster.org/13721
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-03-14 21:27:04 -07:00
Soumya Koduri
5154e581ae CommonHA: Avoid scp of the config state to the same host
During add-node, have seen an issue where in scp doesn't work
if the source and destination host are same. Fixed the same.

BUG: 1259225
Change-Id: Ib8fe21b3c95d653c62698310d5390b46a3c6bbf4
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/12091
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-on: http://review.gluster.org/13720
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-03-14 21:25:32 -07:00
Meghana M
dd1201e01f common-ha : refresh-config should print sensible output
ganesha-ha.sh --refresh-config printed the dbus-send output
messages as is on the console. Improving the output
of the operation by redirecting the messages to /var/log/messages
and by checking the exit code of the command executed.

The behaviour is also changed a litlle by exiting
when refresh-config fails on any of the nodes.
We don't want to continue changing config files
on other nodes when refresh-config has already failed
on one of the nodes.

BUG: 1254494
Change-Id: I33a1c0f750695135118b4ad4d5fa038b27bc7fec
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11949
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-on: http://review.gluster.org/13719
Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-03-14 21:24:54 -07:00
Kaleb S. KEITHLEY
8a5b697456 common-ha: concise output for HA status
filter out unnecessary detail from the HA status

BUG: 1250628
Change-Id: I85fb3aaa3dacee2b1c48f46fb7eef6dc255168bc
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11942
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/13718
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
2016-03-14 21:23:01 -07:00
Kaleb S. KEITHLEY
4bf4bab995 common-ha: delete virt-IP entry of deleted node
Avoid accumulating invalid/defunct virtual IP entries in the HA
config file.

use correct 'clean' name when adding a node and its virtual IP

Also fix a nit in the sample HA config file

BUG: 1250601
Change-Id: I0e6a251334e854d0003d5930ca804f972900b624
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11841
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/13717
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
2016-03-14 21:22:18 -07:00
Jiffin Tony Thottan
ea00992d3d NFS-Ganesha : scripts related changes for supporting multiple export entires for volume
Previously script such as dbus-send.sh, ganesha-ha.sh can handle only one EXPORT{} block.

Change-Id: I2286af4877f96f4334435818f67beea87efa2b1f
BUG: 1275966
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/13283
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-03-01 00:00:04 -08:00
vmallika
1560286586 quota: heal object-limit on a root dir of a newly added brick
When a new brick is added, xattr trusted.glusterfs.quota.limit-objects
is not healed on a root directory.
This patch will fix the problem

Change-Id: I776609ebf4d7822c541b6262e63d465ea3a86db4
BUG: 1306220
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/13422
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2016-02-27 21:30:40 -08:00
Nithin D
46bd29e0f2 glusterd: Bug fixes for IPv6 support
Problem:
Glusterd not working using ipv6 transport. The idea is with proper glusterd.vol configuration,
1. glusterd needs to listen on default port (240007) as IPv6 TCP listner.
2. Volume creation/deletion/mounting/add-bricks/delete-bricks/peer-probe
   needs to work using ipv6 addresses.
3. Bricks needs to listen on ipv6 addresses.
All the above functionality is needed to say that glusterd supports ipv6 transport and this is broken.

Fix:
When "option transport.address-family inet6" option is present in glusterd.vol
file, it is made sure that glusterd creates listeners using ipv6 sockets only and also the same information is saved
inside brick volume files used by glusterfsd brick process when they are starting.

Tests Run:
Regression tests using ./run-tests.sh
    IPv4: Ran manually till tests/basic/rpm.t .
    IPv6: (Need to add the above mentioned config and also add an entry for "hostname ::1" in /etc/hosts)
        Started failing at ./tests/basic/glusterd/arbiter-volume-probe.t and ran successfully till here

Unit Tests using Ipv6
    peer probe
    add-bricks
    remove-bricks
    create volume
    replace-bricks
    start volume
    stop volume
    delete volume

Change-Id: Iebc96e6cce748b5924ce5da17b0114600ec70a6e
BUG: 1117886
Signed-off-by: Nithin D <nithind1988@yahoo.in>
Reviewed-on: http://review.gluster.org/11988
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2016-02-20 09:16:42 -08:00
Aravinda VK
d7e052ee24 geo-rep: Script to Schedule Geo-replication
This script can be used to run Geo-replication when required. can be
scheduled using cron job to run Geo-replication.

This script does the following,
  1. Stop Geo-replication if Started
  2. Start Geo-replication
  3. Set Checkpoint
  4. Check the Status and see Checkpoint is Complete.(LOOP)
  5. If checkpoint complete, Stop Geo-replication

Usage:
    python /usr/share/glusterfs/scripts/schedule_georep.py <MASTERVOL> \
             <SLAVEHOST> <SLAVEVOL>

For example,
    python /usr/share/glusterfs/scripts/schedule_georep.py gv1 fvm1 gv2

To schedule the Geo-replication to run once in a day using cron,
   # Run daily at 08:30pm
   30 20 * * * root python /usr/share/glusterfs/scripts/schedule_georep.py \
      --no-color gv1 fvm1 gv2 >> /var/log/glusterfs/schedule_georep.log 2>&1

BUG: 1300956
Change-Id: I6b1e2ddbf7fc09ef621499b57ae230fd4dbbd9a6
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/13279
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2016-02-16 22:23:38 -08:00
vmallika
6608b5cc1f quota: fix quota hook script for add-brick
Hook script should not call any CLI commands
as this can cause parallel operation problem,
so remove quota list command from the script

Change-Id: I76a364133403371b172e063abd5f742075b20a2f
BUG: 1294637
Signed-off-by: vmallika <vmallika@redhat.com>
Reviewed-on: http://review.gluster.org/13110
Smoke: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2016-02-08 19:58:56 -08:00
Rajesh Joseph
959785a885 extras/devel-tool: Added gdb_macros for debugging
provided following functions in the script
1) print dictionary (dict_t) items
2) print list members (only address)

Change-Id: I5befb2dcdbf258ab3001ff25212a5862b9cc5321
Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-on: http://review.gluster.org/13289
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
2016-02-01 23:43:46 -08:00
Niels de Vos
2e69ae03c3 Point users of glusterfs-hadoop to the upstream project
The code we have in glusterfs-hadoop/ is old and should not be used
anymore. The plugin for Hadoop HCFS is maintained at the
glusterfs-hadoop project on GitHub:

  https://github.com/gluster/glusterfs-hadoop

Removing the old code from the repository, and adding a pointer to the
projects wiki in the MAINTAINERS file.

Change-Id: Ia86d08fb0c73a3f75b706b1e0793e3d7a0f4984c
BUG: 1301352
CC: Jay Vyas <jvyas@redhat.com>
CC: Bradley Childs <bchilds@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/13286
Smoke: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2016-01-30 04:53:27 -08:00
Michael Adam
a0e690fbdf hook-scripts: S29CTDBsetup: clean and fix mount commands and options
This refactors the mount options of S29CTDBstart.sh into one
variable, removing the superfluous mentioning of 'default'.
The manual mount command is fixed to:
- also use the common options, thereby adding
  _netdev,transport=tcp
  (while this does not have an effect for the _netdev
   option, it makes a difference for the transport option),
- also use the HOSTNAME variable just like the fstab entry,
- use a "/" in the remote location specification.
Hence it now behaves identically to the fstab mount.

Change-Id: Ibb7613b1b1278ab13745846baa79268db226ef19
BUG: 1295520
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-on: http://review.gluster.org/13170
Tested-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2016-01-15 05:52:56 -08:00
Niels de Vos
11f6ad26fe scripts: correct the usage of -perm in backend-cleanup.sh
extras/backend-cleanup.sh uses deprecated find -perm +xxx syntax:

  find [...] -perm +01000 [...]

This GNU extension syntax is deprecated and does not work in GNU
findutils 4.5.11 and later. Please change to find -perm /xxx instead.

The new syntax was introduced in 4.2.25 (October 2005) and should
therefore be available on any relevant system.

BUG: 1294223
Change-Id: Ice742957dd24f0ab4f70a8569dff6f2536e9ac1e
Reported-by: Andreas Metzler <ametzler@bebt.de>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/13080
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-01-14 03:40:58 -08:00
Niels de Vos
2b2294d2a4 scripts: prevent running 'showmount' from the start/post hook script
The 31ganesha-start.sh hook script tries to run 'showmount' to see if
the volume that is getting started should get exported by NFS-Ganesha.
It was reported that this caused the 'gluster volume start ...' command
to hang in case rpcbind is not running.

Instead of running 'showmount', we can use DBus to contact NFS-Ganesha
directly, and request the available exports. This will immediately fail
in case NFS-Ganesha is not running.

BUG: 1294446
Change-Id: I3aba1f86fead67116ca5adb1864a8be626c334fa
Reported-by: Jeff Darcy <jdarcy@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/13098
Tested-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-01-12 07:38:22 -08:00
Michael Adam
a249ea5aa7 hook-scripts: remove RHS-2.0 reference from S29CTDB scripts
This is old. And such downstream reference should not
appear in upstream code.

Change-Id: Ifa0664dae0fe5ac913a49afe2fefa43b0112b024
BUG: 1295505
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-on: http://review.gluster.org/13169
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
2016-01-11 01:09:38 -08:00
Michael Adam
1cdea23660 hook-scripts: remove outdated comment from C29CTDB start scipt
This script does not change Samba's config any more.

Change-Id: Ie6001f9a49006f95b291e24252dc362f2a7db14c
BUG: 1295504
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-on: http://review.gluster.org/13168
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2016-01-10 02:52:54 -08:00
Jeff Darcy
f9caa5ef87 extras: add script to analyze regression-test failures
Often a test will fail quite frequently, but not so frequently that it
will fail twice in a row for the same patch.  This allows it to "fly
beneath the radar" for quite a long time, slowing project-wide progress
until somebody crawls through the logs looking for patterns.  This patch
adds a script to automate some of that process.

Change-Id: Ic74fbf6b0bfa34bffd9cb109fd51db019053e2cc
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/12510
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
2016-01-08 03:35:10 -08:00
Niels de Vos
7ab8a1a3f4 build: use 'make install' to install the hook scripts
The installation should be the same on all distributions, and doing
manual installation of files in the .spec is very ugly. This change adds
the rules so that 'make install' places the hook scripts in the right
location.

Also, the hook script(s) for NFS-Ganesha should be part of the
glusterfs-ganesha sub-package and got moved there.

BUG: 1174765
Change-Id: Iba25a7a5112c7d40db4c10ff4a5ac7a5fb4f7c4e
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/13072
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-12-26 09:31:24 -08:00
Michael Adam
ce3ff7e328 hook-scripts: fix S30Samba scripts on systemd systems
/etc/init.d/smb does not exist on systemd systems.
Using "service smb <COMMAND>" is the portable way.
It calls init scripts on sysv systems, and redirects
to systemctl on systemd systems.

Change-Id: I7146c9998a51d8b170d3321f3477e92704ae7615
BUG: 1290604
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-on: http://review.gluster.org/12945
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-12-17 04:11:36 -08:00
Michael Adam
27c16d6da8 hook-scripts: don't let ctdb script change samba config
There are several reasons why the behaviour in
the hook scripts was bad:

1. A samba installation is clustered or non-clustered.
   That does not change because of the availability
   of the CTDB lock-volume. If the lock-volume is not
   available (and hence CTDB is not available or not
   healthy), then Samba won't be operational. But turning
   it into a non-clustered Samba-installation can in
   the worst case lead to data corruption if clients
   manage to access the same files (on share volumes).
   Hence 'clustering = yes/no' in Samba's config should
   not be touched.

   In particular, Samba should not be stopped/started by
   the hook script. If needed, then ctdb will take care
   of it.

2. Changing the idmap configuration is potentially
   dangerous as well. In particular the used tdb2
   backend is legacy nowadays and should not be used
   any more in new installs. (I stems from the times
   when ctdb could not host persistent databases.)
   Changing the idmap can result in loss of access
   to files or in giving access to files where it is
   not intended.

3. The pattern used for detecting need for change is
   fragile. It may or may not play well possible
   manual changes to smb.conf.

This change removes the parts that change the smb.conf
file and start or stop Samba from the S29CTDB* hook scripts.

Change-Id: I72f7aabafa8f089da4531fca2572a72c22825bcc
BUG: 1290151
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-on: http://review.gluster.org/12930
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
2015-12-16 11:13:36 -08:00
Gaurav Kumar Garg
976d2902cb glusterd: disable ping timer b/w glusterd and make epoll thread count to 1
Currently glusterd is crashing when enable/disable heal and i/o is in
progress on the fuse mount.

This is because of by default multi thread epoll in glusterd is 2.
Workaround is to make epoll thread to 1 and set ping-timeout to 0

Change-Id: Ifbe9b43a361c5409b707539f0ee831c610a5c36b
BUG: 1288059
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/12874
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2015-12-03 20:08:22 -08:00
Michael Adam
2e9376a2f1 extras: fix deprecation warining in checkpatch.pl
Left braces in patterns need to be escaped.
Otherwise, for perl >= 5.16, we get a warning:
"Unescaped left brace in regex is deprecated, passed through in regex;"
This patch fixes the relevant braces.

Hence perl -c ./examples/checkpatch.pl is clean again.

Change-Id: I938c9c262239f53de57d30a2cff7030f22e63dc1
BUG: 1198849
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-on: http://review.gluster.org/12828
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-12-02 04:43:27 -08:00
Kotresh HR
5bb3c52143 glusterd/geo-rep: Adding ssh-port option for geo-rep create
Geo-replication uses default ssh port 22 for setup.
i.e., to distribute ssh keys to slaves. In container
environments, custom port number might be used.
Hence to support custom port number for ssh, option
is provided in geo-rep create command to take the
same.

Change-Id: I0fb61959b1c085342b8e4c21ac4e076fba5462f1
BUG: 1276028
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/12504
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2015-11-18 11:33:37 -08:00
Kaushal M
23440a73bc glusterd.service: Ensure rpcbind is started before glusterd
Having the rpcbind.service under the `After` option only ensures that
glusterd.service is started after rpcbind.service if both are
enabled/started at the same time. It doesn't ensure that starting
glusterd.service will start rpcbind.service.

The systemd.unit(5) man page suggests to use both the `Requires` and
`After` options to ensure that rpcbind is started before glusterd,
whenever glusterd is started.

BUG: 1282915
Change-Id: Iee69965486be08711299aba235f7b00c3e2fe7e9
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/12605
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Anand Nekkunti <anekkunt@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
2015-11-18 02:21:05 -08:00
Raghavendra Talur
ea7e34f38c extras/hooks: Fix parsing of args in S30samba-set.sh
Change-Id: I75756f44757a144b0ed229fcc0e29a273fc75886
BUG: 1242892
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/11668
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-11-16 05:41:15 -08:00
Niels de Vos
4ac2ff18db build: MKDIR_P is not defined for Makefiles, use mkdir_p instead
Change-Id: Id6d5263eb7b1c53e72a7668e716e9cc4e34b82cd
Reported-by: Milind Changire <mchangir@redhat.com>
BUG: 1198849
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/12553
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Milind Changire <mchangir@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-11-10 00:57:44 -08:00
Shubhendu Tripathi
066a45d760 extras: Exit with SUCCESS if no processes to stop
This script might be executed even when there are no
valid processes running to be stopped. In this scenario,
the script should return with SUCCESS

Change-Id: Ia293214a4b5052bc4bef9769f197f7b05c55ffe9
BUG: 1277533
Signed-off-by: Shubhendu Tripathi <shtripat@redhat.com>
Reviewed-on: http://review.gluster.org/11739
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-11-10 00:56:57 -08:00
Richard Wareing
d3e496cbcd debug/io-stats: Add FOP sampling feature
Summary:
- Using sampling feature you can record details about every Nth FOP.
  The fields in each sample are: FOP type, hostname, uid, gid, FOP priority,
  port and time taken (latency) to fufill the request.
- Implemented using a ring buffer which is not (m/c) allocated in the IO path,
  this should make the sampling process pretty cheap.
- DNS resolution done @ dump time not @ sample time for performance w/
  cache
- Metrics can be used for both diagnostics, traffic/IO profiling as well
  as P95/P99 calculations
- To control this feature there are two new volume options:
  diagnostics.fop-sample-interval - The sampling interval, e.g. 1 means
  sample every FOP, 100 means sample every 100th FOP
  diagnostics.fop-sample-buf-size - The size (in bytes) of the ring
  buffer used to store the samples.  In the even more samples
  are collected in the stats dump interval than can be held in this buffer,
  the oldest samples shall be discarded.  Samples are stored in the log
  directory under /var/log/glusterfs/samples.
- Uses DNS cache written by sshreyas@fb.com (Thank-you!), the DNS cache
  TTL is controlled by the diagnostics.stats-dnscache-ttl-sec option
  and defaults to 24hrs.

Test Plan:
- Valgrind'd to ensure it's leak free
- Run prove test(s)
- Shadow testing on 100+ brick cluster

Change-Id: I9ee14c2fa18486b7efb38e59f70687249d3f96d8
BUG: 1271310
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/12210
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-11-01 09:14:34 -08:00
Jiffin Tony Thottan
84367f0c91 extras/hookscripts : introducing additional check in S31ganesha-start.sh
New export file with default configuration will be created for a volume
when it is started again. This patch will create new export file only
when it is not present. This change is required for scenarios such as
snapshot restore , node reboot etc.

Change-Id: I34123911f176dcb29d5c016aa097af3a3b2c727b
BUG: 1261444
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/12159
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-09-24 01:52:44 -07:00
anand
63e3806ba3 systemd/spec/glusterd: Adding EnvironmentFile in glusterd systemctrl service file.
Issue: glusterd was not running in debug mode, this is because of
"systemctrl start glusterd" was not reading configuration from glusterd-sysconfig file.

Fix: Set glusterd-sysconfig file as "EnvironmentFile"  and pass args to glusterd.

Change-Id: I6a032a2e86e5a25c39199ddf953bfbd6590d53b6
BUG: 1263087
Signed-off-by: anand <anekkunt@redhat.com>
Reviewed-on: http://review.gluster.org/12175
Reviewed-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-09-15 06:08:38 -07:00
anand
7f327d3b4f firewall/spec: Create glusterfs firewall service if firewalld installed.
It creates glusterfs firewall service during installation.

glusterfs service : It contains all default ports which needs to be opened.
During installation  glusterfs.xml is copied into firewall service directory(/usr/lib/firewalld/services/).

Note:
1.For bricks: It opens the 512 ports, if brick is running out side this range(>49664) then admin need to open the port
for that brick.
2.By default this service is not enabled in any of zone.

To enable this service(glusterfs) in firewall:

1. Get active zone(s) in node
     firewall-cmd  --get-active-zones

2. Attached this service(glusterfs) to zone(s)
   firewall-cmd  --zone=<zone_name>  --add-service=glusterfs               --To apply runtime
   firewall-cmd  --permanent  --zone=<zone_name>  --add-service=glusterfs  --To apply permanent

Note:
  we can also use firewall-config which gives GUI to configure firewall.



Change-Id: Id97fe620c560fd10599511d751aed11a99ba4da5
BUG: 1253967
Signed-off-by: anand <anekkunt@redhat.com>
Reviewed-on: http://review.gluster.org/11989
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-09-10 23:44:50 -07:00
Paul Stauffer
0bd9beabd2 bash-completion: Swap order of characters in egrep bracket expression
With glusterfs-cli installed, bash tab completion fails to work and prints an
error message:

    $ gluster volgrep: Invalid range end
    ^C

The problem is caused by the ordering of characters within an egrep bracket
expression in the "_gluster_completion()" function defined in
/etc/bash_completion.d/gluster.  The file contains this line:

    egrep -ao --color=never "([A-Za-z0-9_-.]+)|[[:space:]]+|." |  \

And egrep is interpreting the "-" character in that bracket expression as
indicating a range is being requested, "_-." Fortunately, "_" actually comes
after ".", this range expression is invalid, and egrep throws the error instead
of silently not doing what was intended.

The fix is simply to swap the positions of "-" and "." in that bracket
expression:

    egrep -ao --color=never "([A-Za-z0-9_.-]+)|[[:space:]]+|." |  \

With this change, bash tab completion works as intended.

Change-Id: Iace2d57a1122b4530987ba6f5f5558b56b094665
BUG: 1243108
Signed-off-by: Paul Stauffer <paulds@horde.com>
Reviewed-on: http://review.gluster.org/11939
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-09-08 07:49:30 -07:00
Jeff Darcy
0773ca67fd all: reduce "inline" usage
There are three kinds of inline functions: plain inline, extern inline,
and static inline.  All three have been removed from .c files, except
those in "contrib" which aren't our problem.  Inlines in .h files, which
are overwhelmingly "static inline" already, have generally been left
alone.  Over time we should be able to "lower" these into .c files, but
that has to be done in a case-by-case fashion requiring more manual
effort.  This part was easy to do automatically without (as far as I can
tell) any ill effect.

In the process, several pieces of dead code were flagged by the
compiler, and were removed.

Change-Id: I56a5e614735c9e0a6ee420dab949eac22e25c155
BUG: 1245331
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/11769
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Dan Lambright <dlambrig@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2015-09-01 04:55:15 -07:00
Avra Sengupta
6cb78f8b74 snapshot/scheduler: Check if volume exists before adding/editing schedules
Before adding or editing a scheduler, check if the volume name provided
in the schedule, exists in the cluster or not.

Added return code VOLUME_DOES_NOT_EXIST(17) for the same.

Change-Id: Ia3fe3cc1e1568ddd10f9193bbf40a098f0fe990a
BUG: 1213349
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11830
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: mohammed rafi  kc <rkavunga@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2015-08-23 23:55:47 -07:00
Avra Sengupta
6bd770c031 snapshot/scheduler: Output correction of initialisation
Change-Id: I4a6e00805da7b254b8b08e7bb142960fb6c64923
BUG: 1218164
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11924
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: mohammed rafi  kc <rkavunga@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2015-08-23 23:34:24 -07:00
Niels de Vos
454bd09b8b rpm: include required directory for glusterfind
The directory was marked as %ghost, which causes the following
installation failure:

  Error unpacking rpm package glusterfs-server-3.8dev-0.446.git45e13fe.el7.centos.x86_64
  error: unpacking of archive failed on file /var/lib/glusterd/hooks/1/delete/post/S57glusterfind-delete-post.py;5581f20e: cpio: open

Also, *all* Python files should be part of the RPM package. This
includes generated .pyc and .pyo files.

BUG: 1225465
Change-Id: Iee74905b101912c4a845257742c470c3fe42ce2a
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/11298
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-08-19 03:33:14 -07:00
Kaleb S. KEITHLEY
34517651a6 build: scripts are not installed with +x bit
scripts listed in Makefile.am as foo_DATA, should be foo_SCRIPTS
to be installed +x

Change-Id: Ib9b98efcea968c03b574726bdc0d4f76cdfd1dc1
BUG: 1225018
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11806
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
2015-07-31 07:12:56 -07:00
Gaurav Kumar Garg
890e58f5d4 extra: "enable-shared-storage" key should create shared-storage
Currently while creating shared storage it accept only
"cluster.enable-shared-storage" key. It should also
accept "enable-shared-storage" key.

Change-Id: I4c68782f4b7927ec8cd725e411b0b9db17d9c48d
BUG: 1238224
Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com>
Reviewed-on: http://review.gluster.org/11491
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Avra Sengupta <asengupt@redhat.com>
2015-07-13 03:25:38 -07:00
Meghana M
3524a03a5e NFS-Ganesha : Add-node does not copy "exports" directory correctly
Add-node logic has to copy the "exports" directory into the
new node in the same path. There was an error in copying to the correct
path. Fixing it.

Change-Id: I539d1d525cc5614594b76f2cff1ac93a926712cf
BUG: 1241895
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11618
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-07-10 07:02:10 -07:00
Meghana M
87bce01f32 NFS-Ganesha : Export fails on RHEL 7.1
We grep for CONFFILE parameter in "/etc/syconfig/ganesha"
file to find out the path of the ganesha config file.
In RHEL 7.1, this parameter does not exist in the file and
we can't find out the ganesha config file. Export
fails invariably due to this. Changing this pattern to
a more generic one and default it to "/etc/ganesha/ganesha.conf"

Change-Id: I4ac97b1b5ee4f5a7e448a351b7c6270385dffe61
BUG: 1241480
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11594
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-07-10 03:03:59 -07:00
Kaleb S. KEITHLEY
ea7161bca1 common-ha: ganesha-ha.sh status tries to read ganesha-ha.conf
status doesn't need to read the config

Change-Id: Id02252abe52820dbc263f4a880bde72a23b121bd
BUG: 1241133
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11581
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-07-09 08:01:37 -07:00
Avra Sengupta
8c3cec03e3 snapshot/scheduler: Use /var/run/gluster/shared_storage/snaps/tmp_file
for writing data into tmp file and then making an atomic rename to
the required filename.

The reason for using this location is that it adheres to
the selinux policies.

Also moving the update of the current_scheduler file,
under the lock so as to avoid multiple writes

Change-Id: I61e62b5daf6f1bce2319f64f7b1dfb8b93726077
BUG: 1239269
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11535
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2015-07-08 02:36:44 -07:00
Avra Sengupta
cd43a3e15e glusterd/shared_storage: Use /var/lib/glusterd/ss_brick as shared storage's brick
The brick path we use to create shared storage is
/var/run/gluster/ss_brick.

The problem with using this brick path is /var/run/gluster
is a tmpfs and all the brick/shared storage data will be wiped
off when the node restarts. Hence using /var/lib/glusterd/ss_brick
as the brick path for shared storage volume as this brick and
the shared storage volume is internally created by us (albeit on
user's request), and contains only internal state data and no user data.

Change-Id: I808d1aa3e204a5d2022086d23bdbfdd44a2cfb1c
BUG: 1218573
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11533
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2015-07-06 22:52:44 -07:00
Meghana M
8def0f28c9 NFS-Ganesha : Unexport fails after S31ganesha-start script is run
The dbus-send script extracts the export ID from the export config file.
It expects the export ID to be written in a particular format. The post-phase
hook-script created the export file in a different format,and the dbus-send
never gets the correct export ID because of this.
Fixing the issue by replacing the write_conf function in the
S31ganesha-start hook-script.Also, NFS-Ganesha service stops when dbus signal is sent more
than once on the same export. Consecutive start/stop operations creates problems.
Fixing all the issues at once.

Change-Id: Ibf639eb3556b1e51dd8dcb0c784a6a7f07badb97
BUG: 1238054
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11477
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-07-02 04:38:48 -07:00
Soumya Koduri
d56b2eecbb common-ha: Fix '/var/lib/nfs/statd/state' path creation
'/var/lib/nfs/statd/state' which contains NSM state number
should be a file instead of directory.

Change-Id: Id008b4f4dd810fe6d6b4d2599cbc0b488010384b
BUG: 1237174
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/11468
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-06-30 13:07:27 -07:00
Meghana M
64f36a04d0 NFS-Ganesha : Exporting volume fails
Due to a recent fix, the dbus-send.sh looked
for a .export_added file even before it was
created. This resulted in the ganesha.enable
option failing consistently. Fixing it.

Change-Id: I26a68578551b6e38e49a9997e6f6f983fd668971
BUG: 1236561
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11456
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-29 09:42:56 -07:00
Meghana M
257668d97e NFS-Ganesha : Automatically export volume after volume restart
The export file was not getting created in the correct
path. Fixing the path in this patch.

Change-Id: If624266e1a934514868affb712514881d10239dc
BUG: 1231738
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11432
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-26 18:27:23 -07:00
Kaleb S. KEITHLEY
254218fa39 common-ha: fix delete-node
N.B. delete-node is a designed to be "disruptive"

surgically delete a node from the config and stop nfs-ganesh on that
node.

finish the implementation and fix a few minor issues

Change-Id: I964bb72a76ee635b5fc484ec5b541e69eeececcd
BUG: 1234474
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11353
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-26 12:35:35 -07:00
Kotresh HR
f1139ca4f8 geo-rep: Fix ssh issue in geo-rep
In geo-rep mountbroker setup, workers fails with
'Permission Denied' even though the public keys
are shared to all the slave nodes. The issue
is with selinux context not being set for .ssh
and .ssh/authorizedkeys. Doing restorecon on
these entries to set default selinux security
context fixes the issue.

Change-Id: I75e16d22f7a168de6c13b0c7571a7ab75761ae0d
BUG: 1235359
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/11383
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: darshan n <dnarayan@redhat.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2015-06-25 04:48:31 -07:00
Meghana M
1ff820381b NFS-Ganesha : Implement refresh-config
It is important that we give an automatic way of refreshing the config
when the user has changed the export file manually.
Without this, the user will be forced to restart the server.
Implementing refresh_config by utilizing two other scripts
that are already in place.
Making a few changes to make sure that "--help"
doesn't throw unnecessary error messages.

Change-Id: I6559b89e858526717168ba286e1ff7d9977097c6
BUG: 1233624
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11331
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-06-24 03:27:19 -07:00
Avra Sengupta
bc6d9d679a gluster/shared_storage: Add/Remove shared storage from /etc/fstab during enable/disable
While creating/deleting shared storage volume, add/remove the shared storage
entry from /etc/fstab, so as to ensure availability of the shared storage,
even after a node reboot

Change-Id: Ib9edc8fd02c74a677062ca53ffd10be997b056c6
BUG: 1231876
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11272
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
2015-06-22 01:56:59 -07:00
Meghana M
e19552c8cc common-ha : Fixing add node operation
Resource create for the added node referenced a variable
new_node that was never passed. This led to a wrong schema
type in the cib file and hence the added node always ended
up in failed state. And also, resources were wrongly
created twice and led to more errors. I have fixed the variable
name and deleted the repetitive invocation of the recreate-resource
function.

The new node has to be added to the existing ganesha-ha config
file for correct behaviour during subsequent add-node operations.
This edited file has to be copied to all the other cluster nodes.
I have added a fix for this as well.

Change-Id: Ie55138e2657d22298d89db1c08f2e17930686bd6
BUG: 1233246
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11316
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-19 06:52:32 -07:00
Kaleb S. KEITHLEY
46bf15e897 common-ha: cluster setup issues on RHEL7
* use --name on RHEL7 (later versions of pcs drop --name) we guessed
   wrong and did not get the version that dropped use of --name option
 * more robust config file param parsing for n/v with ""s in the value
   after not sourcing the config file
 * pid file fix. RHEL6 init.d adds -p /var/run/ganesha.nfsd.pid to
   cmdline options. RHEL7 systemd does not, so defaults to
   /var/run/ganesha.pid.

Change-Id: I575aa13c98f05523cca10c55f2c387200bad3f93
BUG: 1229948
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11257
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-06-19 01:25:46 -07:00