Commit Graph

497 Commits

Author SHA1 Message Date
Niels de Vos
00d9abd401 build: move checkpatch.pl to build-aux
There is no need for checkpatch.pl to be in extras/, it is used similar
to other scripts that are placed in build-aux/.

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

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

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

Added pid file support for glustereventsd.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Change-Id: I2f924b2bf9f04a81788d0f5604895a42755b33a1
BUG: 1367771
Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
Reviewed-on: http://review.gluster.org/15188
Tested-by: Prasanna Kumar Kalever <pkalever@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Ravishankar N <ravishankar@redhat.com>
Reviewed-by: mohammed rafi  kc <rkavunga@redhat.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
2016-08-29 04:54:49 -07:00
Aravinda VK
f463c4615b packaging/eventsapi: Make Python site-packages variable global
Python site-packages path is assigned when glupy is enabled.
Eventsapi will not work as expected if glupy is disabled using
./configure --disable-glupy.

With this patch, all the Python variables are moved out of glupy
and used inside it.

systemd services will fail if we import gluster.cliutils python library
which is installed in /usr/local/lib/python.2.7/site-packages or some
other location. With this patch, Environment variable is added in
systemd service file.

BUG: 1369721
Change-Id: I9416240f03889e3bbcb4cd375e27c784fa9ca277
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/15305
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Atin Mukherjee <amukherj@redhat.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
2016-08-29 00:28:30 -07:00
Jiffin Tony Thottan
4786150ebe glusterd/ganesha : create export configuration file in shared storage
This is the second patch which moves export related configuration for
a volume into shared storage. The main change includes in scripts
create-export-ganesha.sh, dbus-send.sh and the handling of volume set
command "ganesha.enable". The manipulation of EXPORT_ID move from
dbus-send.sh to create-export-ganesha.sh.

In volume set handling following has performed

    stage                  |    commit
----------------------------------------------------------
1.) gluster v set <volname> ganesha.enable on

 None			   |	create export file
			   |    in node where cli executed,
			   |	thne export volume via dbus

2.) gluster v set <volname> ganesha.enable off

unexport volume via dbus   |	remove export file from the
			   |    shared storage
-----------------------------------------------------------

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

Change-Id: Ia8b0e89bc8fff24b0bc5d20a538a89212894a8e4
BUG: 1355956
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14908
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-26 04:47:51 -07:00
Jiffin Tony Thottan
2f44a97913 ganesha/scripts : Modifying ganesha-ha.sh for share storage related changes
Currently the ganesha related configurations are "scp"ied for operations like
add, delete, refresh-config in ganesha-ha.sh. This is no more required since
all the conf files are available in shared storage and every node can directly
access them from shared storage.

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

Change-Id: Ic025eb4dc246db61d6fbe969ca60214751fbf3ba
BUG: 1355956
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14909
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-26 04:47:19 -07:00
Jiffin Tony Thottan
a769be2c0d Revert "glusterd-ganesha : copy ganesha export configuration files during reboot"
This reverts commit f71e2fa49a.

Reason:
As part of sync up node reboot this patch copies ganesha export conf file
from a source node. This change is no more require if the export files are
available in shared storage.

Change-Id: Id9c1ae78377bbd7d5d80aa1c14f534e30feaae97
BUG: 1355956
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
Reviewed-on: http://review.gluster.org/14907
Reviewed-by: soumya k <skoduri@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2016-08-26 04:46:06 -07:00
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
Kaleb S. KEITHLEY
26f17994a4 common-ha: cluster HA setup sometimes fails
the "s in the VIP_foo="x.x.x.x" lines are problematic now that the
config file isn't sourced.

Revised to also handle names containing '-', e.g. host-11, and FQNs,
e.g. host-11.lab.gluster.org

Change-Id: I1a52afbf398a024cdff851d0c415d8363f699c90
BUG: 1232001
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11281
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-06-18 10:16:24 -07:00
Kaleb S. KEITHLEY
1b9a2edf2c common-ha: cluster HA setup sometimes fails
the "s in the VIP_foo="x.x.x.x" lines are problematic now that the
config file isn't sourced.

(A short term work-around is to simply eliminate them.)

Change-Id: I65f375f2d3b8453adb45dc3dbbc7d3fb07cf85d0
BUG: 1232001
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11237
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Meghana M <mmadhusu@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-06-16 08:16:57 -07:00
Meghana M
4a829e33d9 NFS-Ganesha: Automatically export vol that was exported before vol restart
Consider a volume that is exported via NFS-Ganesha. Stopping this
volume will automatically unexport the volume. Starting this volume
should automatically export it. Although the logic was already there,
there was a bug in it. Fixing the same by introducing a hook script.

Also with the new CLI options, the hook script S31ganesha-set.sh
is no longer required. Hence, removing the same.
Adding a comment to tell the user that one of the CLI
commands will take a few minutes to complete.

Change-Id: Ibff769ca04fef0c2a129c83fe31fc9c869350e8d
BUG: 1231738
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11247
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-16 05:50:14 -07:00
Meghana Madhusudhan
5cdbbf34e3 common-ha : Clean up cib state completely
Clean up cluster state on all the machines during tear down.

Change-Id: If9ca65b6ca8790ac97311f33359e28558e90c557
BUG: 1228415
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11231
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-15 08:06:55 -07:00
Aravinda VK
d28b226131 tools/glusterfind: Cleanup glusterfind dir after a volume delete
If `glusterfind delete` command was not run before volume delete, stale
session directories exists in /var/lib/glusterd/glusterfind directories.

Also shows these sessions in `glusterfind list`

When Volume is deleted, Post hook will be run which cleans up the stale
session directories

BUG: 1225465
Change-Id: I54c46c30313e92c1bb4cb07918ed2029b375462c
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/10944
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-06-12 03:01:07 -07:00
Kaleb S. KEITHLEY
04791e4d53 common-ha: handle long node names and node names with '-' and '.' in them
sourcing the /etc/ganesha/ganesha-ha.conf file seemed like a simple
and elegant solution for reading config params, but bash variable names
do not allow '-' and '.' in them.

Also fix incorrect path in shared volume mount

Change-Id: I40140e5da0903221efd316de94dce40229263e15
BUG: 1225572
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/11035
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-06-11 13:12:11 -07:00
meghana
9eef639e19 common-ha : Clean up persistent cib state
Pacemaker saves old configurations in the
directory, "/var/lib/pacemaker/cib". It's
good to clean up this directory during teardown so that
old data doesn't show up the next time.

Change-Id: If0f413ba2da599dd6672b51e60e1d35e674d576b
BUG: 1228415
Signed-off-by: meghana <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/11093
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-06-11 13:07:45 -07:00
Avra Sengupta
71f27128cb snapshot/scheduler: Reload /etc/cron.d/glusterfs_snap_cron_tasks when shared storage is available
If shared storage is not accessible, create a flag in /var/run/gluster/
So that when /etc/cron.d/glusterfs_snap_cron_tasks is
available again, the flag will tell us, to reload
/etc/cron.d/glusterfs_snap_cron_tasks

Change-Id: I41b19f57ff0b8f7e0b820eaf592b0fdedb0a5d86
BUG: 1218573
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11139
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-11 00:08:17 -07:00
Avra Sengupta
5b05d3e376 snapshot/scheduler: Check if GCRON_TASKS exists before
accessing it's mtime

Change-Id: I873c83d21620527b20d7de428d11582c5499d1af
BUG: 1228613
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11138
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-10 03:02:20 -07:00
Avra Sengupta
d835219a30 snapshot/scheduler: Handle OSError in os. callbacks
Handle OSError and not IOError in os. callbacks.

Change-Id: I2b5bfb629bacbd2d2e410d96034b4e2c11c4931e
BUG: 1218060
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11087
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-09 23:40:52 -07:00
Avra Sengupta
402589f58c glusterd/shared_storage: Provide a volume set option to create and mount the shared storage
Introducing a global volume set option(cluster.enable-shared-storage)
which helps create and set-up the shared storage meta volume.

gluster volume set all cluster.enable-shared-storage enable

On enabling this option, the system analyzes the number of peers
in the cluster, which are currently connected, and chooses three
such peers(including the node the command is issued from). From these
peers a volume(gluster_shared_storage) is created. Depending on the
number of peers available the volume is either a replica 3
volume(if there are 3 connected peers),  or a replica 2 volume(if there
are 2 connected peers). "/var/run/gluster/ss_brick" serves as the
brick path on each node for the shared storage volume. We also mount
the shared storage at "/var/run/gluster/shared_storage" on all the nodes
in the cluster as part of enabling this option. If there is only one node
in the cluster,  or only one node is up then the command will fail

Once the volume is created, and mounted the maintainance of the
volume like adding-bricks, removing bricks etc., is expected to
be the onus of the user.

On disabling the option, we provide the user a warning, and on
affirmation from the user we stop the shared storage volume, and unmount
it from all the nodes in the cluster.

gluster volume set all cluster.enable-shared-storage disable

Change-Id: Idd92d67b93f444244f99ede9f634ef18d2945dbc
BUG: 1222013
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10793
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-04 02:37:19 -07:00
nnDarshan
b15ee49c94 snapshot/scheduler: Modified main() function to take arguments.
Modified the main function to take script arguments, so that this
script can be used as a module by other programs .

Change-Id: I902f0bc7ddfbf0d335cc087f51b1a7af4b7157fc
BUG: 1220670
Signed-off-by: n Darshan <dnarayan@redhat.com>
Reviewed-on: http://review.gluster.org/10760
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-04 00:00:40 -07:00
Niels de Vos
0209b18fd6 build: fix compiling on older distributions
data-tiering is disabled on RHEL-5 because it depends on a too new
SQLite version.

This change also prevents installing some of files that are used by
geo-replication, which is also not available on RHEL-5. geo-replication
depends on a too recent version of Python.

Due to an older version of OpenSSL, some of the newer functions can not
be used. A fallback to previous functions is done. Unfortunately RHEL-5
does not seem to have TLSv1.2 support, so only older versions can be
used.

Change-Id: I672264a673f5432358d2e83b17e2a34efd9fd913
BUG: 1222317
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/10803
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: Vijay Bellur <vbellur@redhat.com>
2015-06-03 06:53:43 -07:00
Avra Sengupta
9798a24feb snapshot/scheduler: Return proper error code in case of failure
ENUM                              RETCODE     ERROR
----------------------------------------------------------
INTERNAL_ERROR                    2           Internal Error
SHARED_STORAGE_DIR_DOESNT_EXIST   3           Shared Storage Dir
                                              does not exist
SHARED_STORAGE_NOT_MOUNTED        4           Shared storage is not mounted
ANOTHER_TRANSACTION_IN_PROGRESS   5           Another transaction is in progress
INIT_FAILED                       6           Initialisation failed
SCHEDULING_ALREADY_DISABLED       7           Scheduler is already disabled
SCHEDULING_ALREADY_ENABLED        8           Scheduler is already enabled
NODE_NOT_INITIALISED              9           Node not initialised
ANOTHER_SCHEDULER_ACTIVE          10          Another scheduler is active
JOB_ALREADY_EXISTS                11          Job already exists
JOB_NOT_FOUND                     12          Job not found
INVALID_JOBNAME                   13          Jobname is invalid
INVALID_VOLNAME                   14          Volname is invalid
INVALID_SCHEDULE                  15          Schedule is invalid
INVALID_ARG                       16          Argument is invalid

Change-Id: Ia1da166659099f4c951fcdb4d755529e41167b80
BUG: 1218055
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/11005
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-06-02 23:49:35 -07:00
Kaleb S. KEITHLEY
751c4583bb common-ha: fix race between setting grace and virt IP fail-over
Also send stderr output of `pcs resource {create,delete} $node-dead_ip-1`
to /dev/null to avoid flooding the logs

Change-Id: I29d526429cc4d7521971cd5e2e69bfb64bfc5ca9
BUG: 1219485
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/10646
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: Meghana M <mmadhusu@redhat.com>
2015-06-01 11:13:45 -07:00
Kaleb S. KEITHLEY
54b193760c common-ha: handle long node names and node names with '-' and '.' in them
sourcing the /etc/ganesha/ganesha-ha.conf file seemed like a simple
and elegant solution for reading config params, but bash variable names
do not allow '-' and '.' in them.

Change-Id: I0d2e6cb21017472b1e0f764335cf28946cca95f0
BUG: 1225572
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/10952
Tested-by: NetBSD Build System
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-05-30 05:24:17 -07:00
Aravinda VK
5d912230a7 scripts: Added script stop-all-gluster-processes.sh in rpm
This script was not included as part of rpm. Fixed now

BUG: 1204641
Change-Id: I5e559b187253cc2f4f8ea7cf8ec56a32802e5ab2
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/10931
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-05-29 05:28:30 -07:00
Avra Sengupta
d67eb34b2a snapshot/scheduler: Do not enable scheduler if another scheduler is running
Check if another snapshot scheduler is running before
enabling the scheduler.

Also introducing a hidden option, disable_force

"snapshot_scheduler.py disable_force" will disable the
cli snapshot scheduler from any node, even though the node
has not been initialised for the scheduler, as long as the
shared storage is mounted

This option is hidden, because we don't want to encourage
users to use all commands from nodes that are not initialised.

Change-Id: I7ad941fbbab834225a36e740c61f8e740813e7c8
BUG: 1219442
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10641
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Tested-by: NetBSD Build System
Reviewed-by: Kaushal M <kaushal@redhat.com>
2015-05-28 19:25:18 -07:00
Meghana Madhusudhan
5e61673d6e NFS-Ganesha : Disable ACL by default
ACLs need to be disabled by default.
To enable ACLs, the user has to change the
export file manually, set Disable_ACL=False
and run ganesha-ha.sh --refresh-config.
Changing the default export file to
accommodate these changes.

Change-Id: If3fe0f237344c594a43ad6fc5d351bd391ae5256
BUG: 1221131
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/10769
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-05-14 00:38:22 -07:00
Meghana Madhusudhan
7f950ed3ae NFS-Ganesha : Improved sed expression in cleanup
The global config file should not be emptied when
tear down is called. Improving the sed expression
to delete the ".conf" files only
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>

Change-Id: Ida3d303f629cb512c02dadacce1ec7e5f07db018
BUG: 1218854
Reviewed-on: http://review.gluster.org/10630
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-05-07 08:37:52 -07:00
Meghana Madhusudhan
9096a79447 NFS-Ganesha: Add-node and delete-node changes in HA implementation
NFS-Ganesha related config files have to be copied over to the new node
and NFS-Ganesha service has to be started.
Similary NFS-Ganesha service has to be stopped when a node is
deleted from the HA cluster.

Change-Id: Ia38e72cac86713fe23b7d1b829a256637a9ca796
BUG: 1212816
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/10596
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-05-07 02:55:22 -07:00
Meghana Madhusudhan
e79edf3517 NFS-Ganesha : Do not empty global config file when cluster is torn
The global config file will need new blocks to support client lock recovery.
Current cleanup function empties the entire file. Deleting only "include"
lines in the config file.

Change-Id: I21f09e30a738d2ba01861ce480ecf906667d887b
BUG: 1218854
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/10592
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-05-06 05:34:56 -07:00
Meghana Madhusudhan
a5fc34604a Cache-invalidation : set to on/off depending on ganesha.enable value
Multi-Head NFS-Ganesha servers need upcall (cache-invalidation)
support to notify them in case of any changes to the files in the backend.
Hence, upcall xlator option "features.cache-invalidation" needs to be enabled
when ganesha.enable is set to 'on'. Similarly, this feature needs
to be disabled when ganesha.enable is set to 'off'
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>

Change-Id: Ifdd1d50e48a2bd2a388f73c0b9e318c6092ac190
BUG: 1213752
Reviewed-on: http://review.gluster.org/10581
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-05-05 12:47:00 -07:00
Avra Sengupta
466289f755 snapshot/scheduler: Use os.path.realpath() for path validation
In order to accomodate systems, where /var/run is a symlink to
/run, we are using os.path.realpath() for path validations.

Change-Id: I4eae536867ec6c88f92c762b92f5c1966b622bde
BUG: 1216931
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10464
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-05-05 02:44:52 -07:00
Avra Sengupta
0be5e3d7c5 snapshot/scheduler: Use shutil.move instead of os.rename()
os.rename is a wrapper on top of the rename function,
which fails with invalid cross-device link if /tmp
is a tmpfs. Hence using shutil.move

Change-Id: Ia026d2a810b725ccd398db895e612c53bc6a2f95
BUG: 1214574
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10347
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-30 01:28:16 -07:00
Kaleb S. KEITHLEY
d28a99d6f2 common-ha: delete-node implementation
omnibus patch consisting of:
+ completed implemenation of delete-node         (BZ 1212823)
+ teardown leaves /var/lib/nfs symlink           (BZ 1210712)
+ setup copy config, teardown clean /etc/cluster (BZ 1212823)

setup for copy config, teardown clean /etc/cluster:
1. on one (primary) node in the cluster, run:
  `ssh-keygen -f /var/lib/glusterd/nfs/secret.pem`

  Press Enter twice to avoid passphrase.

2. deploy the pubkey ~root/.ssh/authorized keys on _all_ nodes, run:
  `ssh-copy-id -i /var/lib/glusterd/nfs/secret.pem.pub root@$node`

3. copy the keys to _all_ nodes in the cluster, run:
  `scp /var/lib/glusterd/nfs/secret.*  $node:/var/lib/glusterd/nfs/`
  N.B. this allows setup, teardown, etc., to be run on any node

Change-Id: I9fcd3a57073ead24cd2d0ef0ee7a67c524f3d4b0
BUG: 1213933
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/10234
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-04-29 18:25:12 -07:00
Emmanuel Dreyfus
1fbcecb72e Fix case mistake for MKDIR_P in Makefiles
Some makefiles used $(mkdir_p) instead of the corectly defined $(MKDIR_P).
The former is substituted as an empty string, leading to possible failures
depending of the user shell tolerance. NetBSD's /bin/sh seems to choke
more easily than Linux's /bin/bash, but if the later does not fail, it
does not created the intended directories anyway.

BUG: 1129939
Change-Id: I8caed4000f3c91cb3a685453848fb854793945ed
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/10276
Tested-by: NetBSD Build System
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-04-20 04:29:26 -07:00
Soumya Koduri
08a1041ca9 geo-rep: Added GF_CPPFLAGS to Makefile.am
This change is required to include contrib files in glusterfs.h

Change-Id: I40ef2c495015a6861fdd9f6a72599f094a89eb2a
BUG: 1200262
Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Reviewed-on: http://review.gluster.org/10200
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-04-14 19:46:39 +00:00
Meghana Madhusudhan
c37045c9ab NFS-Ganesha : Use common meta-volume for shared storage
A fixed name and mount point is used to share the common volume
required by various components. Make appropriate changes on the
NFS-Ganesha to accomodate the commom meta-volume as the
shared storage.

Change-Id: I9c87e486c2bb3a414f9773c74ed46e111f3c9c14
BUG: 1210344
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/10211
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: NetBSD Build System
2015-04-14 10:23:51 +00:00
Justin Clift
db5fc47e20 Fix incorrect rfc.sh and checkpatch.pl use of "jenkins" instead of "gerrit"
Change-Id: I6e78477554097a2be5aad8e3fb196970fb30dac2
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/10203
Tested-by: NetBSD Build System
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-04-13 11:10:07 +00:00
Meghana Madhusudhan
dbd9bd7b2d NFS-Ganesha : Fixing HA script invocation and others
gluster features.ganesha disable failed invariably.
And also, there were problems in unexporting
volumes dynamically.Fixed the above problems.

Change-Id: I29aa289dc8dc7b39fe0fd9d3098a02097ca8ca0c
BUG: 1207629
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/10199
Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: NetBSD Build System
2015-04-13 10:36:58 +00:00
Avra Sengupta
7a999ac6b1 snapshot/scheduler: Adhering to the common storage for scheduler
Making snapshot scheduler use the common storage
shared by nfs, snapshot and geo-rep. The meta volume
should be named as gluster_shared_storage, and it
should be mounted at "/var/run/gluster/shared_storage/".

Each component(nfs, snapshot, and geo-rep) should have
their own repos inside the shared storage, and perform
their operations in the shared storage

Change-Id: I4f670bf089c80037bd2b0716ddf743f48d7411ca
BUG: 1210344
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10183
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 08:20:12 +00:00
Avra Sengupta
10ed06a5a1 snapshot/scheduler: Validate the number of entries in schedule
A valid schedule entry in snapshot schedule must have
six elements and adhere to the following format

* * * * *
| | | | |
| | | | +---- Day of the Week   (range: 1-7, 1 standing for Monday)
| | | +------ Month of the Year (range: 1-12)
| | +-------- Day of the Month  (range: 1-31)
| +---------- Hour              (range: 0-23)
+------------ Minute            (range: 0-59)

Change-Id: Idf03a3c43a461295dd3e2026bbcd0420319dd0e0
BUG: 1209408
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10169
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 05:03:11 +00:00
Avra Sengupta
14dcabf21d snapshot/scheduler: Fix deleting of snapshot schedule
Check if the argument has an attribute before
validating the attribute.

Change-Id: Ia4c6c91c2fca2ec3e82b47d81fbc19a5e0f17eb4
BUG: 1210204
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10168
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 05:01:39 +00:00
Avra Sengupta
3f21a34793 snapshot/scheduler: Only run if shared storage is mounted
Before running any snapshot scheduler op command,
verify if /var/run/gluster/snaps/shared_storage/ exists
and if the shared storage is mounted at it.

Change-Id: Ibb6ba6c01c227cacf9a19d1bf9264500373a4ed6
BUG: 1209112
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10135
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2015-04-10 04:59:32 +00:00
Kaleb S. KEITHLEY
6ae434eeb3 ganesha-ha: more robust pid file handling
fix bug with reading pid file to determine if ganesha.nfsd is running

Change-Id: I4050a119e2be93578045a221b67f616e152546d9
BUG: 1188184
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/10163
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-04-08 17:50:09 +00:00
Avra Sengupta
057d2bed41 snapshot/scheduler: Don't append timestamp in scheduled snapshots
The scheduled snapshots will now have names as follows:
Scheduled-<jobname>-<volume name>.

Stopped appending time-stamp in scheduled snapshots because
time-stamps are appended in snapshots by default unless
explicitly asked not to. 

Therefore snapshot created from "Job1" of "test_vol" volume
will look like
Scheduled-Job1-test_vol_GMT-2015.04.02-09.43.02

Change-Id: I75b4a87d265ed55193f08153fd7ffe521cc5ef68
BUG: 1208097
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10115
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-07 06:50:45 -07:00