Commit Graph

434 Commits

Author SHA1 Message Date
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
Avra Sengupta
1a22f3e10c snapshot/scheduler: Remove unwanted schedule enable check
Allow add, edit, list, delete of schedules even when 
snapshot scheduling is disabled.

Change-Id: Ie55ea7d6e9b3fccd914a786cc54bb323ac765a98
BUG: 1209117
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10136
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-07 06:44:27 -07:00
Avra Sengupta
6816c7d466 snapshot/scheduler: Check the correctness of Jobname and Volname
Check for the correctness of Jobname and Volname. They should
not be empty, and should contain only one word. 

If this condition is met, the rest of the whitespaces are 
also striped, before processing the command.

Change-Id: I2c9503ab86456e0f4b37e31d483ee8b2d0b0e1af
BUG: 1209120
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10137
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-07 06:37:32 -07:00
Kotresh HR
85865daa1b extras: Fix stop-all-gluster-processes.sh script
"test -n" command takes single string as argument. The
command was failing with "Too many arguments" when multiple
pids are got.

Change-Id: Icc409082f492c72522168d5e203684f00f52cf1b
BUG: 1204641
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/9970
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-04-06 10:44:35 -07:00
Avra Sengupta
f7a14c0fe5 snapshot/scheduler: Fix the snapshot create command.
The create command being executed was sent with wrong
parameters.

Change-Id: I9b3cf23b3a02cf8309d50bf70439ad02b37f191a
BUG: 1208067
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/10114
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-04-04 10:49:58 -07:00
Kotresh HR
4a339be28a geo-rep: Copy geo-rep hook-script during source install
The hook-script S56glusterd-geo-rep-create-post.sh was not
copying to glusterd working directory when geo-rep is
installed through source. Hence the geo-rep create fails
unless the script is manually copied. This patch addresses
the issue by copying the hook-script during make install.

Change-Id: I185a877ed720e8300f0e888ab481d0c8c23bf815
BUG: 1207201
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/10051
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2015-04-02 03:06:58 -07:00
Kaleb S. KEITHLEY
fb81ee0196 ganesha-ha: ganesha-ha.sh --status (one-liner) implementation
Change-Id: I17b7f6864dd8c1f89500a4bb89f1c249835e68da
BUG: 1188184
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/9974
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-03-24 13:13:47 -07:00
Niels de Vos
2308c07b9d build: let checkpatch check for a trailing dot
The subject of a patch should not end with a dot (.). It is not common
to have subjects of emails end with a dot, and neither is it common for
patches.

Change-Id: Id090241393aee3ca99df4887bdb2d7a7a8913164
BUG: 1198849
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9940
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Ira Cooper <ira@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2015-03-23 13:15:32 -07:00
Niels de Vos
61489c1725 build: correctly install the snap_scheduler tools
The current way of installing the snap-scheduler tools breaks the
building of RPMs. The tools should be installed in /usr/sbin and there
is no need to change the attributes/permissions after the installation.

Change-Id: I1b8e206748617fb000d956b1b5da52d126971c29
BUG: 1203557
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9939
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-19 07:46:52 -07:00
Avra Sengupta
7c4461329b snapshot/scheduling: A cron based scheduler for snapshot scheduling
GlusterFS volume snapshot provides point-in-time copy
of a GlusterFS volume. Currently, GlusterFS volume
snapshots can be easily scheduled by setting up 
cron jobs on one of the nodes in the GlusterFS
trusted storage pool. This has a single point failure (SPOF),
as scheduled jobs can be missed if the node running the cron
jobs dies.

The solution to the above problems is addressed in this patch.
The snap_scheduler.py helper script expects the user to install
the argparse python module before using it.

Further details for the same are available at:

http://www.gluster.org/community/documentation/index.php/Features/Scheduling_of_Snapshot

Change-Id: I2c357af5b7d3e66f270d20eef50cdeecdcbe15c7
BUG: 1198027
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/9788
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-18 18:31:54 -07:00
Aravinda VK
7e98a0e0b1 feature/glusterfind: A tool to find incremental changes
Documentation is available in patch:
http://review.gluster.org/#/c/9800/

A tool which helps to get list of modified files or list of all files in
GlusterFS Volume using Changelog or find command.

Usage
=====
glusterfind --help

Create:
-------
glusterfind create --help

The tool creates status file $GLUSTERD_WORKDIR/SESSION/VOLUME/status
and records current timestamp to initiate the session. This timestamp
will be used as start time for next runs.

As part of create also generates ssh key and distributes to all peers.
and enables build.pgfid and changelog using volume set command.

Pre:
----
glusterfind pre --help

This command is used to generate the list of files modified after session
creation time or after last run. To get list of all files/dirs in Volume,
run pre command with `--full` argument.

The tool gets all nodes details using gluster volume info and runs node
agent for each brick in respective nodes via ssh command. Once these node
agents generate the output file, tool copies to local using scp. Merges all
the output files to generate the final output file.

Post:
-----
glusterfind post --help

After consuming the list, this sub command is called to update the session
time based on pre command status file.

List:
-----
glusterfind list --help

To view all the sessions

Delete:
-------
glusterfind delete --help

Delete session.

Known Issues
------------
1. Deleted files will not get listed, since we can't convert GFID to
   Path if file/dir is deleted.
2. Only new name will get listed if Renamed.
3. All hardlinks will get listed.

Change-Id: I82991feb0aea85cb6ec035fddbf80a2b276e86b0
BUG: 1193893
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/9682
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2015-03-18 02:54:25 -07:00
Kaleb S. KEITHLEY
d81182cf69 NFS-Ganesha: Install scripts, config files, and resource agent scripts
Resubmitting after a gerrit bug bungled the merge of
http://review.gluster.org/9621 (was it really a gerrit bug?)

Scripts related to NFS-Ganesha are in extras/ganesha/scripts.
Config files are in extras/ganesha/config.
Resource Agent files are in extras/ganesha/ocf

Files are copied to appropriate locations.

Change-Id: I137169f4d653ee2b7d6df14d41e2babd0ae8d10c
BUG: 1188184
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/9912
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2015-03-17 13:39:44 -07:00
Michael Scherer
0bef7717d3 build: adjust checkpatch for HEAD.
README is called README.md in git HEAD, and we have a directory
heal.

Change-Id: I2e698b95c6924b5b21aa54257fefd6a6698255ee
BUG: 1198849
Signed-off-by: Michael Scherer <misc@zarb.org>
Reviewed-on: http://review.gluster.org/9784
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2015-03-05 13:10:44 -08:00
Kotresh HR
f3ad194918 geo-rep: Handle copying of common_secret.pem.pub to slave correctly.
Current Behaviour:
    1. Geo-replication gsec_create creates common_secret.pem.pub file
       containing public keys of the all the nodes of master cluster
       in the location /var/lib/glusterd/
    2. Geo-replication create push-pem copies the common_secret.pem.pub
       to the same location on all the slave nodes with same name.

Problem:
    Wrong public keys might get copied on to slave nodes in multiple
    geo-replication sessions simultaneosly.

     E.g.
      A geo-rep session is established between Node1(vol1:Master) to
      Node2 (vol2:Slave). And one more geo-rep session where
      Node2 (vol3) becomes master to Node3 (vol4) as below.

      Session1: Node1 (vol1) ---> Node2 (vol2)
      Session2: Node2 (vol3) ---> Node3 (vol4)

      If steps followed to create both geo-replication session is as
      follows, wrong public keys are copied on to Node3 from Node2.

      1. gsec_create is done on Node1 (vol1) -Session1
      2. gsec_create is done on Node2 (vol3) -Session2
      3. create push-pem is done Node1 - Session1.
          -This overwrites common_secret.pem.pub in Node2
           created by gsec_create in second step.
      4. create push-pem on Node2 (vol3) copies overwrited
         common_secret.pem.pub keys to Node3. -Session2

Consequence:
      Session2 fails to start with Permission denied because of wrong
      public keys

Solution:
      On geo-rep create push-pem, don't copy common_secret.pem.pub
      file with same name on to all slave nodes. Prefix master and
      slave volume names to the filename.

NOTE: This brings change in manual steps to be followed to setup
      non-root geo-replication (mountbroker). To copy ssh public
      keys, extra two arguments needs to be followed.

      set_geo_rep_pem_keys.sh <mountbroker_user> <master vol name> \
      <slave vol name>
      
      Path to set_geo_rep_pem_keys.sh:
      Source Installation: 
              /usr/local/libexec/glusterfs/set_geo_rep_pem_keys.sh
      Rpm Installatino: 
              /usr/libexec/glusterfs/set_geo_rep_pem_keys.sh

Change-Id: If38cd4e6f58d674d5fe2d93da15803c73b660c33
BUG: 1183229
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/9460
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2015-01-21 22:58:41 -08:00
Niels de Vos
10e4add35f build: add a tmpfiles.d config file for /run/gluster
New distrubutions have a /run directory on a volatile tmpfs filesystem.
This causes /run/gluster to be removed with each reboot. A tmpfiles.d
configuration is used to create the directory on boot.

EL5 and EL-6 do not use /run, current Fedora versions do. By checking
%{_tmpfilesdir} in the .spec, we can identify if the distribution uses
tmpfiles.d.

Change-Id: I231e7d6603d573cb905246558e14a51577c0eb56
BUG: 1182934
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9458
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
2015-01-19 00:55:31 -08:00
Jan-Hendrik Zab
e679d6417d Stop logrotate from complaining about missing files.
Previously logrotate reported errors for files missing in
"/var/log/glusterfs/geo-replication-slaves/*/*.log". Fixed by reordering
directives in the example config.

Change-Id: I7cdb9e0d82f08aa27d5e26664660204fdeb8e98e
BUG: 1170825
Signed-off-by: Jan-Hendrik Zab <zab@l3s.de>
Reviewed-on: http://review.gluster.org/9264
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
2014-12-11 00:04:36 -08:00
Niels de Vos
fcdac758ad build: only install geo-rep scripts when enabled
When geo-replication is not enabled, the related scripts should not get
installed. EPEL-5 does not support geo-replication, and the installed
but unpackaged scripts cause rebuilding for .el5 to fail.

BUG: 1169005
Change-Id: I1b6a352b73bd1ed1c5b330f54e26e81aed9a5a4e
Reported-by: Lalatendu Mohanty <lmohanty@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/9221
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-12-07 06:16:08 -08:00
Aravinda VK
7f7dabd7d0 extras: geo-rep: Customize the generate gfid script to dirs list
generate-gfid-file.sh now accepts dirs list file and generate
gfids only for those dirs list.

Change-Id: Ia78a0a744dc8a079db56c38578cc6fcac2a6fa90
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/8540
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-11-26 00:12:18 -08:00
Raghavendra Talur
1800fba112 extras/hookscripts: Fix set behaviour for user.cifs and user.smb
Setting either of user.cifs or user.smb to disable should disable smb
shares when the smb share is already available.

Change-Id: I213ffca9cedc14107daeb30271d1f41dd9d7fcf4
BUG: 1105147
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/9042
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-11-11 22:39:05 -08:00
Lalatendu Mohanty
a5d73daabf logrotate: gluster logrotate config should not be global
Issue : Previously glusterfs logrotate config file pollutes
global config. So moved the directives inside the curly braces,
 so they don't pollute the global config state.

Change-Id: I8836893dfcdf457d9c5d766612d687bfce64e2ae
BUG: 1126802
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/8994
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-10-29 10:40:32 -07:00
Meghana Madhusudhan
a7a8a7507c Hooks : Infinite while loop introduced by another change.
A change made to all the hook scripts introduced an
infinite while loop in the script S31ganesha-reset.sh.
It resulted in 100% CPU usage by this script.

Change-Id: If62d8f0e065c6e6511363b8b26eae433f59bc5c3
BUG: 1155489
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/8966
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-10-24 01:16:54 -07:00
Harshavardhana
7808d4b789 Revert "extras: reverse test for '}' vs. following 'else' placement"
This reverts commit 0a8371bdfd.

Change-Id: I946f449ad213cea70fbbd9cd3951f5838b9f82e5
BUG: 1120646
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8927
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
2014-10-14 06:43:32 -07:00
Jeff Darcy
0a8371bdfd extras: reverse test for '}' vs. following 'else' placement
The two-line form "}\nelse {" has been more common than the one-line
form "} else {" in our code for years, and IMO for good reason (see
the comment in the diff).

Change-Id: Ic22c76fe76f0d91300daff36e755a18a8db58852
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/8888
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-10-02 07:01:15 -07:00
Jeff Darcy
6e8ad12fba build: remove warnings for recommended style
Specifically:

 * space before function arguments

 * brace around single statement

Ideally we would *reverse* these tests so they warn under the exact
opposite conditions, but that would mean learning the internals of a
script written in a defective language with cryptic variable names and
too few comments.  Life's too short.  For now, just cutting down on some
of the spam (which might obscure more serious issues) should suffice.

BUG: 1120646
Change-Id: I5ec684d0d788a34f29af9b1761743c8860973993
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/8813
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-09-23 14:30:13 -07:00
Harshavardhana
2288fec13e extras/checkpatch.pl: update coding guidelines script
- Allow 'quoted string split across lines' since its a
  GlusterFS common practice
- Remove a useless "+" - perl 5.20 complains with following
  warning "Useless use of greediness modifier '+'"

Change-Id: Ibaf276ec84757b3ecc3e6db7f5e720b8e8a12dff
BUG: 1120646
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8811
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2014-09-23 12:29:17 -07:00
Harshavardhana
c788a7784d extras/checkpatch.pl: linux kernel style patch verification
This is to bring in adherence to coding policy, prior to patch
submission for review.

 - no tabs
 - no whitespace
 - indentation (linux style) etc.

This is in the interest at large for the GlusterFS codebase
to be more cleaner and readable.

./rfc.sh - now supports running this for all patches diverged
from "origin/master" revision.

NOTE: One should take this as a handle for good guidelines and
never use it as a tool for correctness, use common-sense in all
the cases ;-)

Change-Id: Ib9a5ed207cde152cb92b8d38cec83e8ce9ef7f28
BUG: 1120646
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8181
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anders Blomdell <anders.blomdell@control.lth.se>
2014-09-18 12:55:26 -07:00
Justin Clift
7c2c5afb8d osx: LaunchDaemon plist filename should start with org instead of com
Change-Id: I5e06bcc473224667387c555355d7e1e81bf4911b
BUG: 1141659
Reviewed-on: http://review.gluster.org/8734
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-09-15 10:03:50 -07:00
Justin Clift
926522a3fe osx: Remove legacy extras/MacOSX directory
BUG: 1141682
Change-Id: Ic84171b070985a11b70d4548aa5e507a121d2164
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/8736
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-09-15 10:03:30 -07:00
Meghana Madhusudhan
9816fe18e8 Hook scripts should exit with correct exit status.
When volume set options other than nfs-ganesha.host and nfs-ganesha.enable
are executed, the hook script S31ganesha-set.sh should exit with
exit status 0. The present behaviour results in an error message in
one of the logs that could be  misleading.

Similarly, hook script S30samba-set.sh should exit with
exit status 0 if samba is not installed. Fixing the issue
with a minor change in the script.

Change-Id: I35d1dc8400bb7043385800ed97adc5321829437f
BUG: 1122978
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/8385
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-31 11:05:04 -07:00
Emmanuel Dreyfus
33be39b42f Regression test portability: mktemp
Linux mktemp accepts to run without a template, NetBSD mandates it. Since
the template option has the same syntax, add it everywhere. While there,
also do this in scripts outside of regression testing.

BUG: 764655
Change-Id: I3ec140afbc9009257c81a56d77afcc21fef74cc4
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8432
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
2014-08-20 13:46:44 -07:00
Patrick Uiterwijk
c42339ef09 who-wrote-glusterfs: use the set $GITDM_REPO variable
Change-Id: Ic119f83fff3930e164f3c81df1c9b60d5eb2d99f
BUG: 1131272
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
Reviewed-on: http://review.gluster.org/8495
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-19 23:34:39 -07:00
Kaleb S. KEITHLEY
84cfd657e5 extras/LinuxRPM: error in Makefile.am
Change-Id: I50de95ca6eff09338ce4a6f9f2b42aeccd10cae2
BUG: 1128192
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/8444
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
2014-08-08 07:23:59 -07:00
Harshavardhana
2ec6ea43f2 build: make GLUSTERD_WORKDIR rely on localstatedir
- Break-way from '/var/lib/glusterd' hard-coded previously,
  instead rely on 'configure' value from 'localstatedir'
- Provide 's/lib/db' as default working directory for gluster
  management daemon for BSD and Darwin based installations
- loff_t is really off_t on Darwin
- fix-off the warnings generated by clang on FreeBSD/Darwin
- Now 'tests/*' use GLUSTERD_WORKDIR a common variable for all
  platforms.
- Define proper environment for running tests, define correct PATH
  and LD_LIBRARY_PATH when running tests, so that the desired version
  of glusterfs is used, regardless where it is installed.
  (Thanks to manu@netbsd.org for this additional work)

Change-Id: I2339a0d9275de5939ccad3e52b535598064a35e7
BUG: 1111774
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8246
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-08-07 01:17:29 -07:00
Meghana Madhusudhan
866a9b9621 gluster vol set nfs-ganesha.enable off fails to unexport volume.
Due to a parameter type change in upstream nfs-ganesha
( v2.1 and above ), gluster vol set <volname> nfs-ganesha.enable
 off doesn't unexport the volume in question if it was already
exported.
A minor change in the hook script would result in the
expected behaviour.

Change-Id: I46f76f3cde6b6ebd7a94d5ee16f05a3648a2840f
BUG: 1124711
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/8390
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-08-05 03:33:40 -07:00
Anders Blomdell
e8a1fc34ad Make RPM's with current git tag
1. clear autom4te.cache
2. autogen.sh
3. configure --with-previous-options

Change-Id: I90c1820d22207d18b1bb367444b21918467baea5
BUG: 1117921
Signed-off-by: Anders Blomdell <anders.blomdell@control.lth.se>
Reviewed-on: http://review.gluster.org/8293
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-07-30 08:07:11 -07:00
Avra Sengupta
f6ddb4675c gluster: Fix the recursive goto outs in the source code.
Added a script check_goto.pl, that when run from
the source code root, will scan all .c files to match
the following pattern:

label:
        if (condition)
            goto label;

On finding such a pattern the script will print the file name
and the line number. There are certain cases where the above
recursive pattern is intended. Hence adding those labels to
ignore-labels. Thanks Vijaikumar Mallikarjuna for the perl
script.

Also fixed all such existing errors

Change-Id: I1b821d0a8c296f16e40faff20bd029bdc880c2e9
BUG: 1119256
Signed-off-by: Vijaikumar Mallikarjuna <vmallika@redhat.com>
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/8307
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
2014-07-21 10:26:20 -07:00
Meghana Madhusudhan
2e831d70c7 Changing the position of nfs-ganesha.log
Changing the position of ganesha.log from /tmp/ganesha.log
to /var/log/nfs-ganesha/ganesha.nfsd.log

Change-Id: Iff95fbc7fc690f4fdbc1789d84f3e41aaca9045b
BUG: 1116723
Signed-off-by: Meghana Madhusudhan <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/8249
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-07-09 23:38:04 -07:00
Harshavardhana
1b74cf9929 porting: Port for FreeBSD rebased from Mike Ma's efforts
- Provides a working Gluster Management Daemon, CLI
- Provides a working GlusterFS server, GlusterNFS server
- Provides a working GlusterFS client
- execinfo port from FreeBSD is moved into ./contrib/libexecinfo
  for ease of portability on NetBSD. (FreeBSD 10 and OSX provide
  execinfo natively)
- More portability cleanups for Darwin, FreeBSD and NetBSD
- Provides a new rc script for FreeBSD

Change-Id: I8dff336f97479ca5a7f9b8c6b730051c0f8ac46f
BUG: 1111774
Original-Author: Mike Ma <mikemandarine@gmail.com>
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8141
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2014-07-02 17:20:34 -07:00
Amar Tumballi
d65e8a871a extras: add a script to stop all the glusterfs process
Change-Id: I9f73bf0308625695ed78db06478963d16644852a
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.org/6270
Reviewed-by: Sachidananda Urs <sacchi@gmail.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-17 04:37:21 -07:00
Varun Shastry
17f3667221 extras: bash command completion for gluster
Change-Id: Ifd6e68b0288dc65e41e467b4ad02bfc3bded341f
BUG: 1108767
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/7979
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-13 09:56:39 -07:00
Lalatendu Mohanty
115ecc8da8 Core: Fix issues reported by Cppcheck
Fixed in this patch:

[glusterfs/extras/geo-rep/gsync-sync-gfid.c:105]: (error) Resource leak: fp
[glusterfs/libglusterfs/src/xlator.c:651]: (error) Uninitialized variable: gfid
[glusterfs/libglusterfs/src/xlator.c:652]: (error) Uninitialized variable: gfid
[glusterfs/xlators/cluster/ha/src/ha.c:2699]: (error) Possible null pointer dereference: priv
[glusterfs/xlators/features/changelog/src/changelog.c:1464]: (error) Possible null pointer dereference: priv
[glusterfs/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c:865]: (error) Possible null pointer dereference: ctx
[glusterfs/xlators/mgmt/glusterd/src/glusterd-mgmt-handler.c:194]: (error) Possible null pointer dereference: ctx
[glusterfs/xlators/mgmt/glusterd/src/glusterd-syncop.c:1408]: (error) Possible null pointer dereference: this
[glusterfs/xlators/mgmt/glusterd/src/glusterd-utils.c:7002]: (error) Possible null pointer dereference: path_tokens

Fixed in 3.4 and 3.5 branch (http://review.gluster.org/#/c/7583/ ,
http://review.gluster.org/#/c/7605/ will be backported in a separate patch)

[glusterfs/xlators/mount/fuse/src/fuse-bridge.c:4688]: (error) Uninitialized variable: finh
[glusterfs/xlators/mount/fuse/src/fuse-bridge.c:3081]: (error) Possible null pointer dereference: state
[glusterfs/xlators/cluster/dht/src/dht-rebalance.c:1719]: (error) Possible null pointer dereference: ctx
[glusterfs/xlators/cluster/stripe/src/stripe.c:4940]: (error) Possible null pointer dereference: local
[glusterfs/xlators/mgmt/glusterd/src/glusterd-replace-brick.c:915]: (error) Resource leak: file
[glusterfs/xlators/mgmt/glusterd/src/glusterd-replace-brick.c:999]: (error) Resource leak: file
[glusterfs/xlators/mgmt/glusterd/src/glusterd-sm.c:248]: (error) Possible null pointer dereference: new_ev_ctx
[glusterfs/xlators/mgmt/glusterd/src/glusterd-utils.c:5297]: (error) Possible null pointer dereference: this
[glusterfs/xlators/mgmt/glusterd/src/glusterd-utils.c:6273]: (error) Possible null pointer dereference: this
[glusterfs/xlators/performance/quick-read/src/quick-read.c:586]: (error) Possible null pointer dereference: iobuf
[glusterfs/xlators/nfs/server/src/nfs-common.c:89]: (error) Dangerous usage of 'volname' (strncpy doesn't always null-terminate it).

False positives

[glusterfs/geo-replication/src/gsyncd.c:99]: (error) Memory leak: str
[glusterfs/geo-replication/src/gsyncd.c:395]: (error) Memory leak: argv
[glusterfs/xlators/nfs/server/src/nlm4.c:1199]: (error) Possible null pointer dereference: fde
[glusterfs/xlators/mgmt/glusterd/src/glusterd-geo-rep.c:1659]: (error) Possible null pointer dereference: command
[glusterfs/xlators/mgmt/glusterd/src/glusterd-utils.c:7001]: (error) Possible null pointer dereference: path_tokens

Insignificant/Don't care

[glusterfs/contrib/uuid/gen_uuid.c:369]: (warning) %ld in format string (no. 2) requires 'long *' but the argument type is 'unsigned long *'.
[glusterfs/contrib/uuid/gen_uuid.c:369]: (warning) %ld in format string (no. 3) requires 'long *' but the argument type is 'unsigned long *'.
[glusterfs/extras/test/test-ffop.c:27]: (error) Buffer overrun possible for long command line arguments.
[glusterfs/xlators/cluster/afr/src/afr-self-heal-common.c:138]: (error) Possible null pointer dereference: __ptr
[glusterfs/xlators/cluster/afr/src/afr-self-heal-common.c:140]: (error) Possible null pointer dereference: __ptr
[glusterfs/xlators/cluster/afr/src/afr-self-heal-common.c:331]: (error) Possible null pointer dereference: __ptr

Change-Id: I7696ed1a2a9553b79f9714e10210a8d563a5abd8
BUG: 1091677
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/7693
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-12 04:20:34 -07:00
Raghavendra Talur
8a2454d449 extras/hookscripts: When set option disables smb, don't start smb.
When user.smb or user.cifs option is set to disable, we remove the
share options from smb.conf. If smb process is running, a sighup is
required but we should not start the process if its not running.

Change-Id: I1e2163ff209ba858380f7da459ff1dba3cf673f2
BUG: 1105123
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/7994
Reviewed-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-06-12 03:57:14 -07:00
Harshavardhana
f0c8be68ca scripts: CTDB lockvol ping-timeout should be 10secs
commit "4044e387dd40e2d12145fd32d5fd715406fcec8e" approach
to this led to deadlocks instead we rely on an old trick at
client side - without any need to modifying the volume globally.

Change-Id: I6e3c6bf9c0a3a0dd99a51b5d2a6c1f050ed2384c
BUG: 1091600
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8007
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Poornima G <pgurusid@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-11 23:08:36 -07:00
Meghana M
294b954848 Hooks/nfs-ganesha:Change the hook script to enable new function signature of add export.
Minor changes in the hook script to avoid some
possible confusion when volume set options are used.
Adding a few additional checks to ensure correct behaviour.

Edited a few config parameters that have changed in upstream
ganesha recently.

Change-Id: I85b842cbbd4b35b7f72f3beb60abf6532ddaa8c7
BUG: 1101416
Signed-off-by: Meghana M <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/7890
Reviewed-by: soumya k <skoduri@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-06-02 22:32:32 -07:00
Avra Sengupta
f6677d1e30 glusterd/geo-rep: Use getent passwd instead of $HOME
$HOME might not be set in the env variables, as is the case
when these scripts are executed using the runner framework.
Hence using getent passwd instead of $HOME

Change-Id: I99f6bcd788d727be534b3040600d66c8dbb7ee92
BUG: 1099041
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/7803
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Kotresh HR <khiremat@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2014-05-20 03:21:30 -07:00
Emmanuel Dreyfus
618d465295 NetBSD build fixes
- Shell scripts: == is specific to bash and ksh. Use = instead.
- Shell scripts: use sh instead of bash if bash functionnality is not used
- Shell scripts: ${var/search/replace} is specific to bash
- sed: The -i option is specific to GNU sed.
- Makefiles: $< outside of generic rules only work in GNU make.
- xdrproc_t() is not universally defined as variadic. Do not specify third
  argument if it is not used
- NetBSD FUSE specific: only include <perfuse.h> in FUSE client code,
  it harms in other locations
- configure: Search for gettext() in libintl as NetBSD stores it there
- Like MacOS X, NetBSD has unmount(2) and not umount(2) (un vs u)

Some other build issues previously included in this change were
removed:
- __THROW macro, addressed in http://review.gluster.com/#/c/7757/
- getmntent() compat shared with MacOS X, in http://review.gluster.com/#/c/7722/

This patchset adds warning fixes for mount_glusterfs

BUG: 764655
Change-Id: I2f1faf8ff96362d3e2baf237b943df619011f1f4
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/7783
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
2014-05-17 11:53:34 -07:00
Meghana
6a9a52c932 Hooks:Modified S31ganesha-set.sh to enable dynamic exports via NFS-ganesha
Dbus signals have to be sent to add and remove exports on the fly,
 without restarting nfs-ganesha server. Adding those signals in
 the hook script to enable the same.

 Adding another to check to enable IP modification,
 without restarting nfs-ganesha.Adding checks to find the
 configuration file in /etc/glusterfs-ganesha.

 Removing nested volume set options. This introduces
 some issues that will be documented clearly.

Signed-off-by: Meghana <mmadhusu@redhat.com>
Change-Id: I28f7983f2d18529dc813ddc9773b33c6caee1ad4
BUG: 1095656
Signed-off-by: Meghana <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/7709
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-05-16 10:01:36 -07:00
Avra Sengupta
09e9775127 glusterd/geo-rep: Allow gverify.sh and S56glusterd-geo-rep-create-post.sh
to operate for non-root privileged slave volume

Mounting the slave-volume on local node, to perform disk checks
in order to allow gverify.sh to operate for non-root privileged
slave volume

Allowing the hook script S56glusterd-geo-rep-create-post.sh
to operate for non-root privileged slave volume

Modified peer_add_secret_pub.in to accept username as argument
and add the pem keys to the users's_home_dir/.ssh/authorized_keys

Wrote set_geo_rep_pem_keys.sh which accepts username as argument
and copies the pem keys from the user's home directory to
$GLUSTERD_WORKING_DIR/geo-replication/ and then copies the keys
to other nodes in the cluster and add them to the respective
authorized keys. The script takes as argument the user name and
assumes that the user will be present in all the nodes in the
cluster. It is not needed for root.

To summarize:
For a privileged slave user, execute the following on master node as super user:
gluster system:: execute gsec_create
gluster volume geo-replication <master_vol> [root@]<slave_ip>::<slave_vol> create push_pem

For a non-privileged slave user execute the following on master node as super user:
gluster system:: execute gsec_create
gluster volume geo-replication <master_vol> <slave_user>@<slave_ip>::<slave_vol> create push_pem
then on the slave node execute the following as super user:
/usr/local/libexec/glusterfs/set_geo_rep_pem_keys.sh <slave_user>

BUG: 1077452
Change-Id: I88020968aa5b13a2c2ab86b1d6661b60071f6f5e
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/7744
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
2014-05-14 10:24:25 -07:00
Meghana M
0088e318c1 cli/hooks : Add volume set options to enable/disable nfs-ganesha support.
1. gluster volume set nfs-ganesha.enable ON/OFF
If the option is set to ON, the volume field in the nfs-ganesha configuartion file is
edited. Gluster-nfs is disabled on that volume and the volume is exported using
nfs-ganesha.

2.gluster volume set nfs-ganesha.host IP
This is used to provide the IP of the nfs-ganesha host.

Note : nfs-ganesha.host MUST be set before using nfs-ganesha.enable ON

The switch from gluster-nfs to nfs-ganesha is mostly done by the hook-scripts
in the post phase of the 'set' option. As a result, gluster volume reset does not
function as it is expected to. By default, nfs-ganesha will be set to off but the
process  will not be killed.

Hence, a few changes have to be made post 'reset' option as well. Those changes
also have been added.

Change-Id: I7fdc14ee49d1724af96eda33c6a3ec08b1020788
BUG: 1092283
Signed-off-by: Meghana <mmadhusu@redhat.com>
Reviewed-on: http://review.gluster.org/7321
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Santosh Pradhan <spradhan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-05-03 07:24:07 -07:00
Raghavendra Talur
f48656b32e extras/hookscripts: Remove %P from smb share path value.
We had added %P in the value for path in smb share definitions to
avoid ctdb errors. However, %P does not work well for windows
clients and they fail to access the share.

Solution for the original problem:
The error messages were being generated by a monitoring script that ctdb
runs. The script reads the path value from testparm and tests if it exists
in the local machine. This particular check does not hold valid for
virtual file system backends like gluster. There is no harm in asking
ctdb to not to check the existence of such backend and can be done by
setting the following config in ctdb.conf:

CTDB_SAMBA_SKIP_SHARE_CHECK=YES.

Change-Id: I91627c8a279126a5cc24c6347847f9bfbad53dd5
BUG: 1068776
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/7598
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Reviewed-by: Poornima G <pgurusid@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
2014-05-02 20:42:30 -07:00
Harshavardhana
4044e387dd scripts: CTDB lockvol ping-timeout should be 10secs
Users often forget to update the ping-timeout, perhaps
we should take care of this automatically

Change-Id: I6d14df8aa52665847233cb1760dfd54f41baadec
BUG: 1091600
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7569
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-05-02 08:52:40 -07:00
Krishnan Parthasarathi
c61bc1f9e5 glusterd: Ping timer implmentation
This patch refactors the existing client ping timer implementation, and makes
use of the common code for implementing both client ping timer and the
glusterd ping timer.

A new gluster rpc program for ping is introduced. The ping timer is only
started for peers that have this new program. The deafult glusterd ping
timeout is 30 seconds. It is configurable by setting the option
'ping-timeout' in glusterd.vol .

Also, this patch introduces changes in the glusterd-handshake path. The client
programs for a peer are now set in the callback of dump_versions, for both
the older handshake and the newer op-version handshake. This is the only place
in the handshake process where we know what programs a peer supports.

Change-Id: I035815ac13449ca47080ecc3253c0a9afbe9016a
BUG: 1038261
Signed-off-by: Vijaikumar M <vmallika@redhat.com>
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/5202
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-29 14:23:51 -07:00
Niels de Vos
d2cdc392ac Update references to the maillinglist to gluster-devel@gluster.org
gluster-devel@nongnu.org has moved to gluster-devel@gluster.org. All
occurrences in the current (non legacy) documentation and code have been
adjusted.

Change-Id: I053162e633f7ea14fd3eed239ded017df165147c
BUG: 1091705
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7573
Reviewed-by: Justin Clift <justin@gluster.org>
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2014-04-27 21:29:36 -07:00
Harshavardhana
9819fcedf1 rpcgen: Remove autogenerated files instead build on demand
Avoid modifying autogenerated files and keeping them in
repository - autogenerate them on demand from ".x" files

Change-Id: I2cdb1fe9b99768ceb80a8cb100fa00bd1d8fe2c6
BUG: 1090807
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7526
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-25 13:29:25 -07:00
Harshavardhana
a3cb38e3ed build: MacOSX Porting fixes
git@forge.gluster.org:~schafdog/glusterfs-core/osx-glusterfs

Working functionality on MacOSX

 - GlusterD (management daemon)
 - GlusterCLI (management cli)
 - GlusterFS FUSE (using OSXFUSE)
 - GlusterNFS (without NLM - issues with rpc.statd)

Change-Id: I20193d3f8904388e47344e523b3787dbeab044ac
BUG: 1089172
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Signed-off-by: Dennis Schafroth <dennis@schafroth.com>
Tested-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Dennis Schafroth <dennis@schafroth.com>
Reviewed-on: http://review.gluster.org/7503
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-04-24 14:41:48 -07:00
Krutika Dhananjay
e55f3fe25a Add upgrade scripts for quota
Change-Id: I289662300d32f75e2fc6e789037c3224054a38a5
BUG: 969461
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/7418
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-04-17 11:38:20 -07:00
Harshavardhana
1dc3331d93 scripts: Use /bin/bash not /bin/sh
If using `/bin/sh` this is what we see

$ ./who-wrote-glusterfs.sh
./who-wrote-glusterfs.sh: 39: shift: can't shift that many

Use `/bin/bash` instead where 'shift' without an argument
is supported.

Change-Id: I2be05f0062eb8456631c1cee859757052f1b6dc7
BUG: 1087771
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7496
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-04-17 11:20:53 -07:00
Niels de Vos
f7e19ce467 scripts: add new email aliases
Two developers started to use new email addresses, marking them as
aliases. Also assign @gmail.com addresses to the "(unknown)" employer.

Change-Id: Ic5722c1611b003182c0288ba530d6ab275c2ca1b
BUG: 1087771
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/7484
Reviewed-by: Prashanth Pai <ppai@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2014-04-16 06:38:06 -07:00
Bala.FA
c193996c94 build: set run levels for glusterd init script properly
'chkconfig --add glusterd' does not set run levels for start/stop.
This patch fixes it.

Change-Id: I8962f5207d034b6875353e15eb60c4d08c5a4fe4
BUG: 1086141
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/7432
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-04-12 23:03:16 -07:00
AkshataDM
9565ac3328 Made spelling changes to 19 files
Change-Id: If91cf44578fe0b5176ea01ae5c5962e31606f640
BUG: 1075417
Signed-off-by: AkshataDM <oxta28@gmail.com>
Reviewed-on: http://review.gluster.org/7280
Reviewed-by: Varun Shastry <vshastry@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2014-03-16 11:57:21 -07:00
Harshavardhana
3076f75e57 scripts: CTDB hooks should add _netdev for network mounts
Change-Id: I86ad5e9ed291866a8d478768fb447e269f51c39e
BUG: 1075182
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7221
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-03-11 23:45:14 -07:00
Raghavendra Talur
ecc475d0a5 hook-scripts: Move smb hooks to right place.
Moved the hook-scripts to dirs corresponding to event.
Also, edited S30samba-set.sh to with changes in
other two hook scripts to bring uniformity.

Change-Id: Ib98c0a18d4bb5d0ba4b881b2e19b40d72580b1c2
BUG: 1073468
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/7201
Reviewed-by: Poornima G <pgurusid@redhat.com>
Reviewed-by: Bala FA <barumuga@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-03-10 06:38:21 -07:00
Justin Clift
d11d3f877d build: Add missing rpmbuild/BUILD dir for CentOS 5.x
The rpmbuild/BUILD directory isn't created automatically
by the build system on CentOS 5.x. This 1-line patch
adds its creation to the build process.

BUG: 1071504
Change-Id: I90ad70608776cb491f2ba92fb7d6044cff4defcc
Signed-off-by: Justin Clift <justin@gluster.org>
Reviewed-on: http://review.gluster.org/7175
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-03-01 19:00:08 -08:00
Harshavardhana
fc01b0293b extras/hookscripts: Add %P as default relative root
ctdb in its monitoring script looks for the "path" variable
values at the system level not at share level.

This relative root path, if any should be default for all
volumes, to avoid issues with ctdb when doing subdirectory shares.

Error:
2014/02/21 12:50:34.355754 [41083]: ERROR: samba directory "/foodir" not available

Fix: Add %P in your smb.conf

[gluster-foodir]
...
...
    path = %P/foodir
...
...

Change-Id: If3c110d844ba8301c901dbce40b23cac99d6d55b
BUG: 1068776
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/7147
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jose A. Rivera <jarrpa@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2014-02-24 19:56:31 -08:00
Emmanuel Dreyfus
13f1d250cc Use libglusterfs wrapper to make setxattr portable
BUG: 764655
Change-Id: I332922521bef5684f18d5f7b226cb36d5303ae47
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6982
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-02-13 01:10:07 -08:00
Aravinda VK
d4e7dd1d2f spec: geo-rep: Include hooks and upgrade scripts
Added hook script S56glusterd-geo-rep-create-post.sh to
%{_sharedstatedir}/glusterd/hooks/1/gsync-create/post/ and upgrade
scripts added to %{_datadir}/glusterfs/scripts/

BUG: 1036539
Change-Id: Id114b827824e55516181ab8f564d419c258be3e2
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/6926
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2014-02-10 16:34:02 -08:00
Vijay Bellur
add56c1fd5 tests: Add rpc coverage tests.
1. Moves rpc-coverage.sh from extras/ to tests/basic/
2. Fixes a symlink test

Change-Id: I2fb8f8441434acfd7bd7fff72deedfbd2410d08c
BUG: 764966
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/6609
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
2014-01-27 02:21:19 -08:00
Niels de Vos
fdc82748a1 build: Install /var/lib/glusterd/groups/virt by default
/var/lib/glusterd/groups/virt is not installed by default, but that
should be the case. It is provided as extras/groups-virt.example.

"make install" should correctly install this file, and the rpm packages
should include it.

Change-Id: I5284306cfc2882e3147bd72f496ad29db906fcb2
BUG: 1053854
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/6717
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-21 06:48:35 -08:00
Varun Shastry
c0a14c00bf features/quota: Make grep search more accurately
The hook script was searching the info file for "features.quota" to know the
quota status (enable/disabled). When features.quota-deem-statfs the grep is not
accurate. Fixed this issue.

Change-Id: I4104a93c1c1e0ac9fd7ef7bfef993425ab50e651
BUG: 969461
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/6380
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-16 21:30:32 -08:00
Varun Shastry
39968c0962 features/quota: Metadata cleanup
Quota and marker uses 'trusted.glusterfs.quota*' and 'trusted.pgfid*' xattrs to
store its configurations and accounting information and also to build the
parent inode chain in case of absense of path.

Problem:
After disabling and then enabling quota back, the xattrs may contain stale data
leading to impaired accounting and thus improper enforcement.

Solution:
Clean up all the quota related xattrs after quota disable.

Marker xlator implements a virtual xattr to cleanup quota and pgfid xattrs. In
this approach glusterd mounts an auxiliary mount and sends the below command to
all the files by crawling the mountpoint.

 #setfattr -n "glusterfs.quota-xattr-cleanup" -v 1 <path/to/file>

Credit:
Krishnan Parthasarathi <kparthas@redhat.com>
Varun Shastry          <vshastry@redhat.com>
Change-Id: I9380eca58a285dc27dd572de1767aac8f2cd8049
BUG: 969461
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/6369
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-01-16 02:01:23 -08:00
Louis Zuckerman
efcfb60f87 Updating extras/Ubuntu with latest upstart configs (BUG: 1047007)
Change-Id: Ia769589f6af1d7ca3577185fd4c56eb9f43b3e2e
BUG: 1047007
Signed-off-by: Louis Zuckerman <me@louiszuckerman.com>
Reviewed-on: http://review.gluster.org/6611
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-12-29 23:03:52 -08:00
Ajeet Jha
b198e072cd glusterd/geo-rep: more glusterd and cli fixes for geo-rep.
-> handle option validation cases in reset case.
    -> Creating valid conf path when glusterd restarts.
    -> Reading the gsyncd worker thread status and displaying it.
    -> Displaying status-detail per worker.
    -> Fetch checkpoint info in geo-rep status.
    -> use-tarssh value validation added.

misc: misc geo-rep fixes based on cluster, logrotate etc..
    -> cluster/dht: fix 'stime' getxattr getting overwritten.
    -> cluster/afr: return max of 'stime' values in subvol.
    -> geo-rep-logrotate: Sending SIGHUP to geo-rep auxiliary.
    -> cluster/dht: fix convoluted logic while aggregating.
    -> cluster/*: fix 'stime' min/max fetch logic.

Change-Id: I811acea0bbd6194797a3e55d89295d1ea021ac85
BUG: 1036552
Signed-off-by: Ajeet Jha <ajha@redhat.com>
Reviewed-on: http://review.gluster.org/6405
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@gmail.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-12-12 00:16:25 -08:00
Kaleb S. KEITHLEY
f4488e3455 build: FedoraSCM sources are not longer needed to build RPMs
Also some updates to .gitignore

Change-Id: I576af453ca7d1ec1f3db21ee4d8386927988e7db
BUG: 950083
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/6458
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-12-06 15:31:54 -08:00
Varun Shastry
50a6e9a740 features/quota: Add the quota config xattr to newly added brick
Issue:
Quota directory limit configuration is stored in the xattrs. When a new brick
is added these 'limit-set' xattrs have to be created to the directory in the
new brick. This is done by the dht directory healing when the directory is
created in the new brick. Since 'root' directory is already created DHT doesn't
heal the limit-set xattr root.

Solution:
When the add-brick command is issued run the below hook script to heal the
'limit-set' xattr. The hook script does the following only if limit is
configured on root.
    1. Create an auxiliary mount.
    2. getxattr 'limit-set' on the root
    3. setxattr the same value on the root
But this script needs the volume to be started to make the auxiliary mount.

To handle the case when the add-brick is issued when the volume was stopped,
symlink is created by the 'master' script to the corresponding location and
these two are by default disabled.

So, a 'master' script is added in the add-brick/pre. When add-brick command is
issued, it enables one of the scripts mentioned above based on the condition,
    if volume is started - enable add-brick/post script
    else                 - enable start/post script
After the actual script completes its job, it disables itself.

Note:
The enabling and disabling of the script is based on the glusterd's logic, that
it only runs the scripts which starts its name with 'S'. So,
    Enable     - symlink the file to 'S'*
    Disable    - unlink the symlink.

Change-Id: I2d3947a4d686c54417ec95f530af3bdd3444f4e2
BUG: 969461
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/6104
Reviewed-by: Brian Foster <bfoster@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-11-26 11:57:11 -08:00
Harshavardhana
6e7817232c group-virt: To minimize 'split-brain' enable quorum under virt profile
Quorum as default is necessary when storing virtual machine images. It
would be necessary to enable both server and client quorum

Currently defaulted values are:
----------------
server-quorum-type=server
quorum-type=auto
----------------

Change-Id: Ic2adb5856ce3c2589476e872e988cae6eeb9b25e
BUG: 1032080
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/6340
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-11-22 22:40:28 -08:00
Kaleb S. KEITHLEY
c47408e896 mgmt/glusterd: add option to specify a different base-port
This is (arguably) a hack to work around a bug in libvirt which is not
well behaved wrt to using TCP ports in the unreserved space between
49152-65535. (See RFC 6335)

Normally glusterd starts and binds to the first available port in range,
usually 49152. libvirt's live migration also tries to use ports in this
range, but has no fallback to use (an)other port(s) when the one it wants
is already in use.

Change-Id: Id8fe35c08b6ce4f268d46804bbb6dddab7a6b7bb
BUG: 1018178
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/6210
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-10-31 09:31:21 -07:00
Poornima
f063951d75 extras/hook-scripts: Enable per client logging for gluster shares served by SAMBA
Edited hook scrips to add a variable in the option 'log file', which will be
substituted for client IP.

Change-Id: I50f143bb3114eb00afab2e1237d749804c885ca6
BUG: 1020848
Signed-off-by: Poornima <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/6109
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-10-22 12:55:37 -07:00
Bala.FA
9228618f9d build: disable logging framework on rhel6
As rsyslog-mmcount is not yet available in rhel6 variant, this patch
disables logging framework on rhel6 and its dependency

BUG: 1018308
Change-Id: I6b7c04640f8d38055e00c697d1017c7a530463d0
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/6108
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-10-18 08:30:08 -07:00
Raghavendra Talur
11bb1fc584 extras/hookscripts: Fix the multiple entries in smb.conf problem.
Problem:
1. Force starts and user.smb sets were adding multiple entries to
the smb.conf file for the same volume.
Make a check for the entry and search with exact name.

2. Again, while deleting the share name from smb.conf search with
exact name so that volumes with names which are substrings of ones to
be deleted don't get deleted.

3. We don't need to use a tmp file while using sed -i, fixed that.

Change-Id: Ie0f7c9d4790ef9a177a043378a761c9ffe1628e5
BUG: 994727
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/6043
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com>
Tested-by: Lalatendu Mohanty <lmohanty@redhat.com>
2013-10-08 09:22:00 -07:00
Lalatendu Mohanty
31cacce770 hookscripts: Changes in hook scripts to make it work on all Linux/GNU distribution
Removed the hard coded values for smb.conf, smb logfile location and smbd.pid.
The current hook scripts also work for manully compiled (make, make install)
instance of gluster and Samba. But we have to manually copy the hook scripts
to respective locations.

Change-Id: I14056830fcd2ecb48b3c4df89265f4408c8de3e3
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/5947
Reviewed-by: poornima g <pgurusid@redhat.com>
Reviewed-by: susant palai <spalai@redhat.com>
Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Tested-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-10-04 17:05:35 -07:00
Aravinda VK
79ba7b3e2e geo-rep: logrotate: Logrotate handling
In existing georep logrotate was implemented by handling SIGSTOP
and SIGCONT, gsyncd was failing to start again after SIGSTOP.
New approach uses WatchedFileHandler in logging, which tracks the
log file changes or logrotate. Reopens the log file if logrotate is
triggered or if same log file is updated from other process.

As per python doc:
http://docs.python.org/2/library/logging.handlers.html:
The WatchedFileHandler class, located in the logging.handlers module,
is a FileHandler which watches the file it is logging to. If the file
changes, it is closed and reopened using the file name.

A file change can happen because of usage of programs such as newsyslog
and logrotate which perform log file rotation. This handler, intended
for use under Unix/Linux, watches the file to see if it has changed
since the last emit. (A file is deemed to have changed if its device
or inode have changed.) If the file has changed, the old file stream
is closed, and the file opened to get a new stream.

Change-Id: I30f65eb1e9778b12943d6e43b60a50344a7885c6
BUG: 1012776
Signed-off-by: Aravinda VK <avishwan@redhat.com>
Reviewed-on: http://review.gluster.org/5968
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-10-03 21:26:00 -07:00
Niels de Vos
124d93ed3e extras: add script and config for generating "Who wrote GlusterFS"
This script and configuration can be used to generate statistics similar
to the "Who wrote <linux-version>" series available on http://lwn.net.

Example usage for statistics from the initial branchpoint of 3.4 to the
current development of the release-3.4 branch:

 $ extras/who-wrote-glusterfs/who-wrote-glusterfs.sh \
       v3.4.0alpha...origin/release-3.4

By default the statistics will be calculated over the currently checked
out branch.

Change-Id: Ie7b8b655c50dcb14257e42599e2f89642c8b5b42
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5912
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-09-29 16:56:23 -07:00
Kaleb S. KEITHLEY
2e4064fe08 glusterd.service (systemd), ensure glusterd starts before local mounts
NOTICE: this patch was accepted onto the release-3.4 branch for 3.4.1,
but this same patch for master is languishing here in review.

Try (emphasis on the try) to ensure that glusterd starts, and in turn
starts glusterfsd before init attempt to mount any gluster (or gluster
NFS) volumes in /etc/fstab.

N.B. Joe Julian says this doesn't fix the problem for him, although it
worked for me in kvm. Lennart Poettering says it should, and we should
file a BZ against systemd if it doesn't. See
https://lists.fedoraproject.org/pipermail/devel/2013-July/185870.html

Change-Id: I4d8061217d8301beb0da485dc63a1984a7c57c37
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
BUG: 1004795
Reviewed-on: http://review.gluster.org/5823
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-09-20 11:50:15 -07:00
Justin Clift
90ec091755 Fix typo in systemd service definition file
Change-Id: Ia9dac04ad508fbaafbed24b2137b09872a1ca53c
BUG: 1010352
Signed-off-by: Justin Clift <jclift@redhat.com>
Reviewed-on: http://review.gluster.org/5981
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2013-09-20 11:03:22 -07:00
Venky Shankar
3bfa0dde13 glusterd/gverify.sh: Stops session being created with invalid slave details
create force will fail with proper message, if the ip is not
reachable, or is unable to fetch slave details.

Change-Id: I44a3ba777b37702ffd0e48e9cb46c51e293327d4
BUG: 988314
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/5516
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-09-04 19:29:17 -07:00
Lubomir Rintel
898edbf133 doc: Move glusterd.vol to extras/ directory
It's actually not documentation.

Change-Id: I30c84abc9a31edb2f849dd2d6ff6d3129d87392d
Signed-off-by: Lubomir Rintel <lubo.rintel@gooddata.com>
Reviewed-on: http://review.gluster.org/5474
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-08-22 23:59:01 -07:00
Raghavendra Talur
00a73eb528 extras/hookscripts: Add default logfile for glusterfs vfs plugin.
Glusterfs vfs plugin for samba makes call into gfapi which brings
up complete client process stack of gluster. Not having default
log file means not logging client process at all.

This patch adds default logfile and loglevel for vfs plugin.

Change-Id: Ie0fb6bbb445d6f3349fc35c713743094c0f08915
BUG: 999910
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/5685
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2013-08-22 12:49:26 -07:00
Bala.FA
1ea8ee6bc9 log: add logger.conf.example file
This example file can be safely renamed as logger.conf to enable
syslog logging

Change-Id: If49dd6002a046915b2eca330b7a539f4fa1f94fa
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/5622
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-08-14 13:06:31 -07:00
Bala.FA
fc82ae5ddf log: add comments to rsyslog gluster configuration file
Comments are added to rsyslog gluster configuration files to give
clear meanings and example email alerting.

Change-Id: I23577dc3b39bca89696c46ab6252dc5673d0803f
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/5621
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-08-14 13:05:50 -07:00
Bala.FA
e75071a5ee log: add rsyslog gluster configuration file
This patch comes with rsyslog gluster configuration file for fedora
and rhel >= 6.  It disables syslog at rpm build time if targetted
platform is rhel < 6 as there is no rsyslog support.

Change-Id: I95c076874b6891ff08dee1b35980f95529fb0f37
BUG: 928648
Signed-off-by: Bala.FA <barumuga@redhat.com>
Reviewed-on: http://review.gluster.org/5543
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-08-13 07:08:21 -07:00
Raghavendra Talur
993001dadf extras/hook-scripts: Don't add multiple entries in smb.conf
When volume is force started, there may be entry in smb.conf
for that volume. Always check for entry before adding one.

Change-Id: I44f893174a993abaa31c24c1a81bb38a58617808
BUG: 994727
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/5526
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2013-08-07 14:56:33 -07:00
Avra Sengupta
5757ed2727 glusterd/cli changes for distributed geo-rep
Commands:
gluster system:: execute gsec_create
gluster volume geo-rep <master> <slave-url> create [push-pem] [force]
gluster volume geo-rep <master> <slave-url> start [force]
gluster volume geo-rep <master> <slave-url> stop [force]
gluster volume geo-rep <master> <slave-url> delete
gluster volume geo-rep <master> <slave-url> config
gluster volume geo-rep <master> <slave-url> status

The geo-replication is distributed. The session will be created, and
gsyncd will be spawned on all relevant nodes, instead of only one
node.

geo-rep: Collecting status detail related data

Added persistent store for saving information about
TotalFilesSynced, TotalSyncTime, TotalBytesSynced

Changes in the status information in socket:
Existing(Ex):
FilesSynced=2;BytesSynced=2507;Uptime=00:26:01;

New(Ex):
FilesSynced=2;BytesSynced=2507;Uptime=00:26:01;SyncTime=0.69978;
TotalSyncTime=2.890044;TotalFilesSynced=6;TotalBytesSynced=143640;

Persistent details stored in
/var/lib/glusterd/geo-replication/${mastervol}/${eSlave}-detail.status

Change-Id: I1db7fc13ffca2e415c05200b0109b1254067f111
BUG: 847839
Original Author: Avra Sengupta <asengupt@redhat.com>
Original Author: Venky Shankar <vshankar@redhat.com>
Original Author: Aravinda VK <avishwan@redhat.com>
Original Author: Amar Tumballi <amarts@redhat.com>
Original Author: Csaba Henk <csaba@redhat.com>
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/5132
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2013-07-26 13:19:18 -07:00
Avra Sengupta
b13c483dca gsyncd: distribute the crawling load
* also consume changelog for change detection.
* Status fixes
* Use new libgfchangelog done API
* process (and sync) one changelog at a time

Change-Id: I24891615bb762e0741b1819ddfdef8802326cb16
BUG: 847839
Original Author: Csaba Henk <csaba@redhat.com>
Original Author: Aravinda VK <avishwan@redhat.com>
Original Author: Venky Shankar <vshankar@redhat.com>
Original Author: Amar Tumballi <amarts@redhat.com>
Original Author: Avra Sengupta <asengupt@redhat.com>
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/5131
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2013-07-26 13:18:57 -07:00
Niels de Vos
72aef87eed test-ffop: the result of (O_TRUNC|O_RDONLY) is unspecified
On RHEL-6 an open(.., O_TRUNC|O_RDONLY) fails. test-ffop expects this to
succeed, but the behaviour is unspecified according to 'man 2 open':

       O_TRUNC
              If  the  file  already exists and is a regular file and the open
              mode allows writing (i.e., is O_RDWR or  O_WRONLY)  it  will  be
              truncated to length 0.  If the file is a FIFO or terminal device
              file, the O_TRUNC flag is  ignored.   Otherwise  the  effect  of
              O_TRUNC is unspecified.

Change-Id: I76b55419871fc758cbe82532f9b75476a0c14101
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5268
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
2013-07-10 01:58:11 -07:00
Raghavendra Talur
ac62c953e4 extras/hook-scripts: Set of changes for new samba share method.
New method of creating a share of gluster volume
through samba eliminates the requirement of fuse
mount and changes in fstab.

glusterfs vfs plugin has to be specified as required
vfs object.
Path now is relative to the root of gluster volume.
/ signifies complete volume.

Change-Id: I3d80452cd58513ef59d6a816c1ab62ebc3b76a62
BUG: 953694
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/5247
Reviewed-by: José Rivera <jrivera@redhat.com>
Tested-by: José Rivera <jrivera@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-06-28 09:25:07 -07:00
Kaleb S. KEITHLEY
e216e2e6fc build: sync glusterfs.spec.in with Fedora glusterfs.spec
* fix the hardening fix for shlibs
* use %{__sed} macro
* better short ChangeLog
* fix hard-coded path in extras/systemd/glusterd.service in, use @prefix@

Change-Id: I267244b68a97cbcd6f6ab62fc322c78db45023bb
BUG: 950083
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/5264
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2013-06-28 09:23:17 -07:00
Kaleb S. KEITHLEY
f7b1245ca2 build: sync glusterfs.spec.in with Fedora glusterfs.spec
* add glusterfs-api and glusterfs-api-devel sub-packages
 * add extras/systemd/glusterd.service. Use it (or extras/init.d/glusterd)
   instead of the Fedora versions.
 * restores ability to build glusterfs RPMs from the dist tarball with
   'rpmbuild {-ts,-tb,-ta} glusterfs-XXX.tar.gz'
 * other minor cleanups mostly to sync with fedora .spec and to build
   from the dist tarball. Any differences will be resolved in the fedora
   .spec in the next release (i.e. beta4 or GA).

(still considering whether to add fedora glusterfsd.{init,service} files
to glusterfs or remove them from fedora.)

BUG: 950083
Change-Id: Ibda3cd57b24ef5c2a27446703e718e5044ec546c
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/5230
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Bala FA <barumuga@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2013-06-26 04:36:47 -07:00
Niels de Vos
689618e2fc extras: prevent "glusterd dead but subsys locked"
Commit b5bf14a6 added support for a file under /var/lock/subsys,
Hoewever, killproc does remove the $PIDFILE which cases subsequent
checks on its existence to fail. When glusterd was stopped successfully,
the $PIDFILE has been removed already, there is no need to try to remove
is again.

Upon executing '/sbin/service glusterd status', the message 'glusterd
dead but subsys locked' would be returned because the file under
/var/lock/subsys was not removed.

Bug: 960476
Change-Id: I781fe463e3c5472e42d668155cee4f63d349a568
Reported-by: Satheesaran Sundaramoorthi <sasundar@redhat.com>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5074
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2013-05-25 11:41:29 -07:00
Niels de Vos
323fe9ec80 rpm: automatically load the fuse module on EL5
The fuse module needs to be loaded before /dev/fuse can be used. On
RHEL6 and Fedora the module is loaded on demand. RHEL5 needs to load the
module manually.

This change add a script under /etc/sysconfig/modules/ that loads the
fuse module on boot and packages it in the EL5 version of
glusterfs-fuse.

One of the features of GlusterFS is to not depend on additional fuse
userspace. The conditional requires on /usr/bin/fusermount is not
needed, this command is never called in the current version (even though
is it referenced in the sources).

Change-Id: I77028dade54771cb49cea68a517100f73763dc85
BUG: 947830
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/5070
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-05-22 12:20:46 -07:00
Peter Portante
40d026e100 object-storage: final removal of ufo code
See https://git.gluster.org/gluster-swift.git for the new location of
the Gluster-Swift code.

With this patch, no OpenStack Swift related RPMs are constructed.

This patch also removes the unused code that references the
user.ufo-test xattr key in the DHT translator.

Change-Id: I2da32642cbd777737a41c5f9f6d33f059c85a2c1
BUG: 961902 (https://bugzilla.redhat.com/show_bug.cgi?id=961902)
Signed-off-by: Peter Portante <peter.portante@redhat.com>
Reviewed-on: http://review.gluster.org/4970
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-05-10 11:03:55 -07:00
Niels de Vos
b5bf14a6ab extras: /etc/init.d/glusterd should create a lockfile under /var/lock/sybsys
Without a lockfile under /var/lock/subsys, the glusterd service is not
stopped on shutdown or reboot.

Change-Id: I9dc9b4204c5c39879c22191b2e8a2b81a4f3a58a
BUG: 960476
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4960
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-05-07 11:44:29 -07:00
Niels de Vos
ee9984882e extras: include Fedora changes in init.d/glusterd
The changes in the .spec file from Fedora have largely been merged into
the glusterfs.spec.in. It seems that some dependencies have been missed,
most importantly some additions to the init-script that are called while
(un)installing or updating RPMs.

These changes come from the downstream Fedora package that carries its
own glusterd.init script. In future, Fedora/EPEL should be able to drop
that file and use the Gluster project version.

Change-Id: Iac25854b0c559b93fa1dd452a04663bd95ea3378
BUG: 954149
URL: http://lists.nongnu.org/archive/html/gluster-devel/2013-04/msg00077.html
CC: Fedora GlusterFS Packagers <glusterfs-owner@fedoraproject.org>
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4864
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-04-29 17:07:26 -07:00
Kaleb S. KEITHLEY
5e0116109e build: sync glusterfs.spec.in with Fedora glusterfs.spec
BUG: 950083
Change-Id: I96aeb8fbe8b79bbc058ff9a45167d822abb576ed
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/4876
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
2013-04-26 02:38:07 -07:00
Kaleb S. KEITHLEY
77a02c4dd8 object-storage: rebase Swift to 1.8.0 (grizzly)
Two minor tweaks found while packaging 3.4.0-0.1.alpha2 for Fedora 19

BUG: 948039
Change-Id: I97175636164702cf4042bc4a18ffead76ad386cb
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/4807
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-04-12 00:22:47 -07:00
Kaleb S. KEITHLEY
862b116452 object-storage: rebase Swift to 1.8.0 (grizzly)
Change-Id: I24265c12a45eac4cec761748096118c9647440be
BUG: 948039
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/4779
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-04-05 16:53:38 -07:00
Kaleb S. KEITHLEY
2cd9b31a5f glusterfs.spec.in: sync with fedora glusterfs.spec
add --without ufo

Change-Id: If1b77003ded537f9664fa6ad677d48d118516c64
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
BUG: 819130
Reviewed-on: http://review.gluster.org/4742
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-03-28 14:28:06 -07:00
Avra Sengupta
71cb0ad45b mount: Added the xlator-option to mount.glusterfs script.
Now all xlator-options can be set from the mount command as well.
Example :
mount -t glusterfs Hostname:/Volume_Name Mount_Point -o "xlator-option=xyz=123, xlator-option=abc=999"

Change-Id: If52d994986839d1c969e3e2e01b2e1a29a3140b7
BUG: 920583
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4660
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Shishir Gowda <sgowda@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-03-22 14:41:19 -07:00
Kaleb S. KEITHLEY
bf3db1f609 glusterfs.spec.in: sync with fedora glusterfs.spec
remove hard-coded reference to swift version and dist tarballs

minor improvements for rpm builds for regression tests, including
adding cache on build.gluster.org to avoid random failures due to
transient network or dns failures causing curl or git to fail.

BUG: 819130
Change-Id: I4f1213056ae2987dd2202f9cfbb3ed4f16ffc7cf
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/4674
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Justin Clift <jclift@redhat.com>
Tested-by: Justin Clift <jclift@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-03-22 11:55:07 -07:00
Anand Avati
6f67898842 LinuxRPM/Makefile: fix backquote which was triggering recursive make
The following Makefile snippet:

--snip--
all:
	@echo "To build RPMS run `make glusterrpms`"
--snip--

was using `backquotes` in the string, and thereby triggering a nested
make on "glusterrpms" target implicitly as part of 'make all', thus
defeating the intention.

So use single quotes instead of backquotes.

It is unexplained why this nested 'make glusterrpms' was not called on
the build server during regression test.

Change-Id: I8a8d1d4f565d03cfb27341e6183af5b09530eb60
BUG: 819130
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/4532
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-02-17 22:50:17 -08:00
Kaleb S. KEITHLEY
84f5e4b354 glusterfs.spec.in: resync with Fedora glusterfs.spec
Resync with Fedora's glusterfs.spec, being careful to preserve recent
additions to the glusterfs.spec.in such as the package-config for -devel
and the OCF sub-package

To build a set of RPMs:
 % ./autogen.sh
 % ./configure --enable-fusermount
 % make dist
 % cd extras/LinuxRPM && make glusterrpms

Updated rpm.t, hopefully build system has all the dependencies to build UFO

BUG: 819130
Change-Id: I1b1c161337ad780cf7d3ab401fa1b10648f38cbd
Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
Reviewed-on: http://review.gluster.org/4454
Reviewed-by: Peter Portante <pportant@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-17 19:32:02 -08:00
Jeff Darcy
fcc230c99d features: add a directory-protection translator
This is useful to find all calls that remove a file from the protected
directory, including renames and internal calls.  Such calls will cause
a stack trace to be logged.  There's a filter script to add the needed
translators, and then the new functionality can be invoked with one of
the following commands.

	setfattr -n trusted.glusterfs.protect -v log $dir
	setfattr -n trusted.glusterfs.protect -v reject $dir
	setfattr -n trusted.glusterfs.protect -v anything_else $dir

The first logs calls, but still allows them.  The second rejects them
with EPERM.  The third turns off protection for that directory.

Change-Id: Iee4baaf8e837106be2b4099542cb7dcaae40428c
BUG: 888072
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4496
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-17 12:04:48 -08:00
Kacper Kowalik (Xarthisius)
779004dbcd Respect autotools docdir variable
Change-Id: If20d0806a925b880e0ba9bbc66604cae6c51ce6b
BUG: 859861
Signed-off-by: Kacper Kowalik (Xarthisius) <xarthisius.kk@gmail.com>
Reviewed-on: http://review.gluster.org/3971
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-07 16:38:06 -08:00
Jeff Darcy
08d63afa1b Add scripts for size-weighted rebalance.
Change-Id: I04197e54fef2ff7b61fbee21ab837219354184f1
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/3573
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-07 14:27:47 -08:00
Mohammed Junaid
6a6ec98042 object-storage: Store the lock file in /var/run/swift.
* Openstack swift uses the /var/run/swift directory to store the pid files
  for all the servers.

* Also, added a script that would unmount the gluster client on a volume stop.

Change-Id: Ib5b9a2964987ca7696d9a2570f1f7af8490b2168
BUG: 861497
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.org/4417
Reviewed-by: Peter Portante <pportant@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-02-07 14:02:19 -08:00
Vijay Bellur
06c4ba5891 group-virt: Change profile to include remote-dio and exclude posix-aio.
remote-dio enables filtering O_DIRECT in the client xlator. This has been
found to be useful for improving performance when there are multiple VMs
talking to an image store.

Aggregated throughput results for a single thread iozone run from multiple VMs
and a single host can be seen below:

-------------------------------------------------
No. of VMs |   remote-dio on  |   remote-dio off |
-------------------------------------------------
       2   |     400 MB/s     |    202 MB/s      |
       4   |     650 MB/s     |    410 MB/s      |
--------------------------------------------------

posix-aio has not been found to improve performance consistently with VM image
workload. Hence not including that in the default virt profile.

Change-Id: I592f68b95a955036f1a985352d2f4950ced1deef
BUG: 907301
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/4460
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2013-02-04 17:42:05 -08:00
Avra Sengupta
b8d5fd2b88 glusterfs : Moved option files, and statedumps from /tmp
Change-Id: Ibdede396c4d6859225937316b7a59a661bcaf9f5
BUG: 764890
Signed-off-by: Avra Sengupta <asengupt@redhat.com>
Reviewed-on: http://review.gluster.org/4422
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2013-01-29 15:27:29 -08:00
Raghavendra Talur
ee05db0b1e extras: Don't update RETVAL with invalid value.
Problem:
Start and restart functions update the value of RETVAL internally.
Assigning $? to RETVAL after function return was updating RETVAL with
invalid value.

Fix:
Removed assignment statement after start and restart functions return.

Stop function was always returning 0 as return value due to one extra echo
command. Removed echo line.

Change-Id: Iec1a83a83463f419dd45e12daf4e5ded80568a3a
BUG: 888442
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/4349
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Anand Avati <avati@redhat.com>
2013-01-18 17:36:46 -08:00
Raghavendra Talur
fd32c05f46 extras: Changed the exit status in start function to 0.
Problem:
We were returning "1" when "glusterd start" was being called with service
already running. As per
http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
we should consider it to be a success case and return 0.

Fix:
Just changed the return status from 1 to 0.

Change-Id: I8d6d2014f0c32ba53834503e721e2a71df7330a8
BUG: 845653
Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-on: http://review.gluster.org/4348
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2013-01-11 09:12:38 -08:00
Niels de Vos
06d4cced24 build: include OCF resource agents by default and package them
This change introduces a glusterfs-resource-agents sub-package that
contains the Open Cluster Framework (OCF) Resource Agents (RA). It also
changes the build infrastructure to include the RA by default, making
them available for anyone who is interested in using them with a OCF
compatible Hight-Availability solution like Pacemaker.

Build the RPMs without RA:
$ make dist && rpmbuild -ta --without ocf *.gz

Build the RPMs with RA (default):
$ make dist && rpmbuild -ta *.gz

There is no need to run ./autogen.sh from within the .spec, the whole
autotools infrastructure is included in the 'make dist' tarball already.

This also adds a test-case which builds the rpms with mock for the
latest two EPEL releases.

Change-Id: I12ef5f30f466868825352376156fb4e56b135c58
BUG: 869559
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4130
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2012-12-12 10:58:45 -08:00
Filip Pytloun
6d58cb0476 RHEL init script: ability to overwrite options from sysconfig
Change-Id: I15df0aef73e097a9ccfb00e2d4cae81d3a5a82fc
BUG: 885739
Signed-off-by: Filip Pytloun <filip.pytloun@gooddata.com>
Reviewed-on: http://review.gluster.org/4290
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
2012-12-12 07:36:26 -08:00
Krishnan Parthasarathi
5ec55a34c9 Added virt group file - template for 'group' set
- This sample file contains the set of volume options
  that are associated with volumes that would be used to
  store VMs.

- To enable the set of options present in this file one must
  do the following,
  - # cp extras/group-virt.example /var/lib/glusterd/groups/<group-name>
    # gluster volume set <volume-name> group <group-name>

Change-Id: I8848d3d222ce114900db885aeef2f20c83ece28c
BUG: 851237
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/4232
Reviewed-by: Anand Avati <avati@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
2012-12-11 16:42:14 -08:00
Florian Haas
61c1d77f22 Add OCF compliant resource agents for glusterd and volumes
These resource agents plug glusterd into Open Cluster Framework
(OCF) compliant cluster resource managers, like Pacemaker.

The glusterd RA is fairly trivial; it simply manages the glusterd daemon
like any upstart or systemd job would, except that Pacemaker can
do it in a cluster-aware fashion.

The volume RA is a bit more involved; It starts a volume and monitors
individual brick's daemons in a cluster aware fashion, recovering bricks
when their processes fail.

Note that this does NOT imply people would deploy GlusterFS servers
in pairs, or anything of that nature. Pacemaker has the ability to
deploy cluster resources as clones, meaning glusterd and volumes would be
configured as follows in a Pacemaker cluster:

primitive p_glusterd ocf:glusterfs:glusterd \
	op monitor interval="30"
primitive p_volume_demo ocf:glusterfs:volume \
	params volname="demo" \
	op monitor interval="10"
clone cl_glusterd p_glusterd \
	meta interleave="true"
clone cl_volume_demo p_volume_demo \
	meta interleave="true" ordered="true"
colocation c_volume_on_glusterd inf: cl_volume_demo cl_glusterd
order o_glusterd_before_volume 0: cl_glusterd cl_volume_demo

The cluster status then looks as follows (in a 4-node cluster; note
the configuration above could be applied, unchanged, to a cluster
of any number of nodes):

============
Last updated: Fri Mar 30 10:54:50 2012
Last change: Thu Mar 29 17:20:17 2012 via crmd on gluster02.h
Stack: openais
Current DC: gluster03.h	- partition with quorum
Version: 1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558
4 Nodes configured, 4 expected votes
8 Resources configured.
============

Online: [ gluster02.h gluster03.h gluster04.h gluster01.h ]

 Clone Set: cl_glusterd [p_glusterd]
     Started: [ gluster02.h gluster03.h gluster04.h gluster01.h ]
 Clone Set: cl_volume_demo [p_volume_demo]
     Started: [ gluster01.h gluster02.h gluster03.h gluster04.h ]

This is also a way of providing automatic glusterd and brick recovery
in systems where neither upstart nor systemd are available.

Change-Id: Ied46657bdfd2dd72dc97cf41b0eb7adcecacd18f
BUG: 869559
Signed-off-by: Florian Haas <florian@hastexo.com>
Reviewed-on: http://review.gluster.org/3043
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-24 17:46:48 -07:00
Niels de Vos
22fdadad06 extras: hook scripts should not start Samba if it is not running
If the smb service was turned off by the administrator, the hook scripts
should not start the service on starting/stopping a volume.

By calling the service script with "condrestart" instead of plain
"start", the service script checks if samba actually was running.

Change-Id: I93408050a65445d98d2f9bb61992e216e04e0b04
BUG: 861506
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.org/4015
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-02 01:18:13 -07:00
Jeff Darcy
4efddca755 init.d: implement reload action for SUSE init script
Change-Id: Ic17832b5bb33bc43faa1ff81c5221ec4e3f9294d
BUG: 862082
Original-author: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4012
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-01 16:46:21 -07:00
Jeff Darcy
76e4895a87 init.d: use proper dependencies in SUSE init script
"/usr", the place where the binaries usually reside, requires
$remote_fs.

Change-Id: I830c45b09b78b6c3b36c1475ac3f13cf6c2df588
BUG: 862082
Original-author: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.org/4011
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-10-01 16:45:55 -07:00
M S Vishwanath Bhat
3d32220740 Made test-ffop.c exhaustive by making it to test all types of fops.
Change-Id: I26052d0cbf72f81a6aa0c52498e99b635d1273e9
BUG: 861380
Signed-off-by: M S Vishwanath Bhat <vbhat@redhat.com>
Reviewed-on: http://review.gluster.org/3931
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-10-01 12:45:45 -07:00
Vijay Bellur
36db38a572 build: Install glusterfs-logrotate as config file
Change-Id: I8255eb4249503eac0add87444da934256faffc01
BUG: 860037
Reviewed-on: http://review.gluster.org/3973
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-09-25 22:22:06 -07:00
Varun Shastry
3e2057542d All: License message change
License message changed for server-side, dual license GPLV2 and LGPLv3+.

Change-Id: Ia9e53061b9d2df3b3ef3bc9778dceff77db46a09
BUG: 852318
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/3940
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-09-13 13:19:37 -07:00
Varun Shastry
2ff5e1c2a1 All: License message change
The license message is changed to
  Copyright (c) 2008-2012 Red Hat, Inc. <http://www.redhat.com>
  This file is part of GlusterFS.

  This file is licensed to you under your choice of the GNU Lesser
  General Public License, version 3 or any later version (LGPLv3 or
  later), or the GNU General Public License, version 2 (GPLv2), in all
  cases as published by the Free Software Foundation.

Change-Id: I07d2b63ed5fbbbd1884f1e74f2dd56013d15b0f4
BUG: 852318
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/3858
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-08-28 03:45:06 -07:00
Thomas Oulevey
4b4e9a058f init.d: Fix init.d on Redhat, so it does not always return 0.
* Installing gluster with puppet, it gives an error if service "hasstatus => true" is used.
* Introduced a $RETVAL variable set to previous command return value.

Change-Id: I186ec59f892f04f25c06478315ca85183cb6232a
BUG: 836007
Signed-off-by: Thomas Oulevey <thomas.oulevey@cern.ch>
Reviewed-on: http://review.gluster.org/3847
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2012-08-28 02:58:17 -07:00
Amar Tumballi
35810fb2a7 libgfxdr.so: change license
Change-Id: I049441e465127195c192443ab0234548d2449e50
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.com/3704
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Bharata B Rao <bharata.rao@gmail.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
2012-07-20 13:04:10 -07:00
Jim Meyering
7820b2c1f8 remove useless if-before-free (and free-like) functions
See comments in http://bugzilla.redhat.com/839925 for
the code to perform this change.

Signed-off-by: Jim Meyering <meyering@redhat.com>
BUG: 839925
Change-Id: I10e4ecff16c3749fe17c2831c516737e08a3205a
Reviewed-on: http://review.gluster.com/3661
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-07-13 14:03:42 -07:00
Niels de Vos
4ba54d10f0 extras: install clear_xattrs.sh
The script was not installed by default, this breaks building the RPM
packages since Change-Id Iba695a6d19389fbc1776da5e939d67318916aadf.

Change-Id: I4fb982cb5217dc7b3ec3c7a664dd3997a2e05170
BUG: 812214
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.com/3659
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-07-12 09:27:25 -07:00
Brian Foster
cd439e79ca cluster/stripe: implement the coalesce stripe file format
The coalesce file format for cluster/stripe condenses the striped
files to a contiguous layout. The elimination of holes in striped
files eliminates space wasted via local filesystem preallocation
heuristics and significantly improves read performance.

Coalesce mode is implemented with a new 'coalesce' xlator option,
which is user-configurable and disabled by default. The format of
newly created files is marked with a new 'stripe-coalesce' xattr.
Cluster/stripe handles/preserves the format of files regardless
of the current mode of operation (i.e., a volume can
simultaneously consist of coalesced and non-coalesced files).
Files without the stripe-coalesce attribute are assumed to have
the traditional format to provide backward compatibility.

extras/stripe-merge: support traditional and coalesce stripe formats

Update the stripe-merge recovery tool to handle the traditional
and coalesced file formats. The format of the file is detected
automatically (and verified) via the stripe-coalesce attributes.

BUG: 801887
Change-Id: I682f0b4e819f496ddb68c9a01c4de4688280fdf8
Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-on: http://review.gluster.com/3282
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-06-07 19:07:52 -07:00
Amar Tumballi
63a9bbb2a8 init.d: stop only 'glusterd' process on '/etc/init.d/glusterd stop'
earlier it used to stop even brick processes and gluster NFS server
process, which is not a expected behavior for command
'/etc/init.d/glusterd stop'

Change-Id: Ibc092cdf2693b3b2ae491d32ce3f0113854149c8
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 796998
Reviewed-on: http://review.gluster.com/2919
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-05-18 18:42:15 -07:00
Raghavendra Bhat
07c9a96627 libglusterfs/fd: while dumping the fd_ctx use fd->xl_count
While dumping the fd_ctx when statedump is issued fd->xl_count should be
used to determine the number of xlators instead of using latest graph's count,
since while creating the fd only those many slots would have been allocated
as the number of xlators in the graph at that instant. Then the graph would have
changed, thus the xl count.

All the above things should happen before any operation is done on fd, otherwise
fd_ctx_set will allocate the extra slots for the new xlators present in the
graph.

Also added the program which can be used to reproduce the bug.

Change-Id: I11fe75d71ef5d37e29e2958d53752aa31098c313
BUG: 820887
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Reviewed-on: http://review.gluster.com/3335
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-05-17 03:49:55 -07:00
Krishnan Parthasarathi
352f09f8eb extras/hook-scripts: Fixed EXTRA_DIST to explicitly list *.sh files
Change-Id: I48785317b42e37a6e7768c89bdb7ca8ac41220fa
BUG: 806996
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3271
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-05-03 23:49:13 -07:00
Krishnan Parthasarathi
7ee1c22353 extras: Added hook script to help in CTDB setup
Change-Id: Ib43cd3583e791aabc8cc25fe4eea43a620f73d01
BUG: 806996
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3188
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-05-02 22:56:24 -07:00
Krishnan Parthasarathi
fdcbf065a9 glusterfs.spec: Added hook-scripts in server rpm
Change-Id: Idd0ed2a72ea9ec947eaf142b889730e8d4be63c1
BUG: 806996
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3211
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-04-23 05:31:02 -07:00
Krishnan Parthasarathi
64177411f7 extras: Added (hook) scripts to start/stop samba on volume start and stop
These are example/helper scripts that demonstrate how one could
leverage the recently added hooks interface in glusterd.
The scripts are in 'beta'.

Change-Id: I7aaf999f3bdfb276ef64e115a57cbdb36c7a896e
BUG: 806996
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/3086
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-04-19 00:12:35 -07:00
Louis Zuckerman
c3bbf6aa6c Updated the Ubuntu upstart jobs for glusterd in extras/Ubuntu.
Using upstart jobs, instead of an initscript, solves Bug 765014.
See also: https://bugs.launchpad.net/ubuntu/+source/glusterfs/+bug/876648

The new upstart jobs split the work of starting glusterd & mounting glusterfs volumes into two parts: a glusterd service runner and a glusterfs volume moung blocker which waits for the service runner.

This is the method preferred by Ubuntu developers to block a mounting event until a required service is available.  These changes will be included in the Ubuntu glusterfs-server package starting with release 12.04, Precise Pangolin.

Tested on Ubuntu 12.04

Change-Id: I9bb4e8cb05a1da0997c23f2ef7fea8737f6a2eb9
BUG: 765014
Signed-off-by: Louis Zuckerman <louiszuckerman@gmail.com>
Reviewed-on: http://review.gluster.com/2727
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-03-18 00:34:57 -07:00
Amar Tumballi
061d70e819 extras/rpc-coverage.sh : behavior fix
don't treat getfattr after 'setfattr -x' (ie, removexattr())
as an error. ignore the output so the script runs for completion

Change-Id: Id7089b91e7259a39be7cb6fce627828774c4acbc
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 787956
Reviewed-on: http://review.gluster.com/2768
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-18 05:09:07 -08:00
Kaushik BV
9636f5b16c extras: create PID file for glusterd when started from init scripts
thanks to Jaroslav Pulchart (jaroslav.pulchart@centrum.cz) for the patch

Change-Id: Id07bf50536c8638f790f06e6e5994f85555c3978
BUG: 771221
Signed-off-by: Kaushik BV <kbudiger@redhat.com>
Reviewed-on: http://review.gluster.com/2668
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-03 08:16:16 -08:00
Amar Tumballi
7d81a11e66 extras/test: add a test file to test 'f-fops'.
mainly to test f*xattr(), fchown()/fchmod()/ftruncate() on fuse
mounts.

Change-Id: I59edbe172f307a2ba94f11c650ac0176fd35564f
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 766571
Reviewed-on: http://review.gluster.com/2692
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-03 08:13:59 -08:00
Amar Tumballi
b02afc6d00 core: change lk-owner as a 1k buffer
so, NLM can send the lk-owner field directly to the locks translators,
while doing the same effort, also enabled sending maximum of 500 aux gid
over protocol.

Change-Id: I87c2514392748416f7ffe21d5154faad2e413969
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 767229
Reviewed-on: http://review.gluster.com/779
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2012-01-24 20:14:17 -08:00
Rajesh Amaravathi
5303f98f67 extras: add check for brick path existence
Adding a couple of checks to validate brick path(s)

Change-Id: I2d8538add21407d9457542373b528c2a02cd7eb6
BUG: 765572
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.com/2514
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-01-05 09:18:11 -08:00
Rajesh Amaravathi
4511ed196f extras: clean up a brick's gfid xattr
* extras/clear_xattrs.sh: This script enables a brick from a
deleted volume(stale brick) to be used in a new volume by
clearing all the trusted.gfid xattr from the brick tree.

* One should run this script on all machines which have
stale bricks if one wants to re-use the same bricks
for a new volume.

NOTE: This script *SHOULD BE RUN ONLY AFTER STOPPING A VOLUME*,
thereby ensuring that no replace-brick or rebalance operations
are on-going.

Change-Id: I35a4a2784fe502749184b87299b1a043b8e48e90
BUG: 765572
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.com/781
Reviewed-by: Amar Tumballi <amar@gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-12-25 21:41:12 -08:00
Sachidananda Urs
5aed416a5f Change the start/stop order of glusterd script at boot time.
In cases of client and server sharing the same machine, mounting GlusterFS at
boot time failed due to the start and stop order we use for glusterd. And people
had to resort to the idea of adding mount command in rc.local.

Currently the start and stop order at the boot time were 90 and 12, and netfs
started before `glusterd' and failed to mount GlusterFS. By changing
the rc order to 20 80 glusterd is started earlier than netfs, thus enabling
netfs to mount GlusterFS during boot process.

Thanks to: alex@net13.info for the suggestion in bug 2484.

Change-Id: I482f4dac5e5dd8bc5b8f5034c394f5dbe6c1fd3e
BUG: 2484
Reviewed-on: http://review.gluster.com/746
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <fharshav@redhat.com>
Tested-by: Harshavardhana <fharshav@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2011-11-23 20:50:47 -08:00
Raghavendra Bhat
78f3ee4fb1 rdd: create the file and do rdd if the file does not exist.
rdd takes input file and copies the its data to the specified output
file ( by creating it) by selecting random offset. If the input file
does not exist it will not work. This patch will create the input file
if it does not exist and then does the copy. File size is given as an
argument. If the file exists it truncates the file and then does the copy.

Change-Id: Ia09451e9e80e13f27320f1edc12c73c0dcf663a9
BUG: 3724
Reviewed-on: http://review.gluster.com/596
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-11-15 23:26:33 -08:00
Jeff Darcy
abb4cbeea3 Second round of warning suppression.
Used a #pragma to kill ~170 in rpcgen code.  Added GF_UNUSED to deal with
a few more from macros elsewhere.  The remainder are function return values
(mostly context and dict calls) that really should be checked.  Those would
be harder to fix without real understanding of the code where they occur,
so they remain as reminders.

(Patchset 2: deal with older gcc that doesn't handle #pragma GCC diagnostic)

(Patchset 3: fix include paths in generated files)

(Patchset 4: keep up with trunk, squash 9 new warnings)

(Patchset 5: six more, all in AFR)

Change-Id: I29760c8c81be4d7e6489312c5d0e92cc24814b7b
BUG: 2550
Reviewed-on: http://review.gluster.com/378
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-09-29 11:52:30 -07:00
Kaushik BV
16b7e3bf20 build: Solaris build fixes
Change-Id: Ic47d07a199ecbc42a141e391bbc75096e270e404
BUG: 3446
Reviewed-on: http://review.gluster.com/503
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
2011-09-27 05:44:41 -07:00
Amar Tumballi
f0f3b040df modify to the way we used XDR definitions files (.x files)
Earlier:
step 1: copy the existing <xdr>.x files to /tmp
step 2: generate '.[ch]' files using 'rpcgen <xdr>.x'
step 3: check diff with the to the existing files, add only your part
        of changes back to the original file. (ignore other changes).
step 4: there is another file to write wrapper functions to convert
        structures to/from XDR buffers, update it with your new structure.
step 5: use these wrapper functions in the newly written procedures.
step 6: commit :-|

Now:
step 1: update (mostly adding only) the <xdr>.x file
step 2: run '<path-to-src>/extras/generate-xdr-files.sh <xdr>.x' command
step 3: implement rpc procedure to handle the request/response.
step 4: commit :-)

Change-Id: I219f9159fc980438c86e847c6b030be96e595ea2
BUG: 3488
Reviewed-on: http://review.gluster.com/341
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2011-09-07 10:48:52 -07:00
Raghavendra Bhat
9c68f3b53f rdd: changes in rdd.c and whitespace cleanup
Change-Id: Ic117c6a3f9234a0181db1a106ef8a6574248f010
Reviewed-on: http://review.gluster.com/313
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
2011-08-25 05:37:19 -07:00
Pranith Kumar K
b58dc65f2a Change Copyright current year
Change-Id: I2d10f2be44f518f496427f257988f1858e888084
BUG: 3348
Reviewed-on: http://review.gluster.com/200
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2011-08-10 10:57:19 -07:00
Louis Zuckerman
4b640273b0 Provides an upstart job for glusterd on Ubuntu, solving Bug 3282
Mounting from localhost in fstab fails at boot on ubuntu when glusterd is started by debian initscript.

A new directory, extras/Ubuntu, contains the new upstart job (glusterd.conf) and a brief README.Ubuntu file.
This makes the upstart job available to package maintainers like the SysV initscripts are in extras/init.d.

This has been tested on Ubuntu 10.10 Maverick.

Change-Id: I6ccd06054e920cd6dc45dba4eb8ab89aa30f8b47
BUG: 3282
Reviewed-on: http://review.gluster.com/126
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2011-08-03 23:10:47 -07:00
Raghavendra G
2f07f751bf extras: Add quota-related debugging scripts.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2697 (Quota: add-brick creates the size go awkward, though it was perfect earlier)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2697
2011-06-19 20:41:21 -07:00
Lakshmipathi
29397bda24 build : use pid file to kill nfs process
Signed-off-by: Lakshmipathi.G <lakshmipathi@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2969 (add --pidfile option)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2969
2011-06-08 11:17:29 -07:00
Shehjar Tikoo
ef3d2a48f4 gnfs-loganalyse: Track fh & entry operations given filename
Introduces support for outputting only those NFS operations
that operate on a given filename and all the filehandles that
are seen in the log file for that filename.

Signed-off-by: Shehjar Tikoo <shehjart@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 913 (NFS-specific log analyzer tool)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=913
2011-05-11 19:18:16 -07:00
Amar Tumballi
44fca3bae2 add 'logrotate' config file to the package
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2053 (We need to support the standard *nix 'logrotate' for server and client log files.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2053
2011-05-04 06:00:58 -07:00
Raghavendra G
e52a0cc23b extras/quota-xattr-cleanup: don't follow symbolic links.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2664 (Quota: recreating the volume on same bricks shows similar info as for earlier one using "list")
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2664
2011-04-16 10:51:39 -07:00
Raghavendra Bhat
d7cba3b0bb script: fix the typo while doing replace brick
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 1436 (script for running basic gluster commands)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1436
2011-04-13 00:38:43 -07:00
Raghavendra G
476b672347 extras: scripts to cleanup xattrs stored by quota.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>

BUG: 2664 (Quota: recreating the volume on same bricks shows similar info as for earlier one using "list")
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2664
2011-04-07 11:40:05 -07:00
Lakshmipathi G
7b07d444a7 install gluster binaries under /opt/glusterfs/version with sym.link at /usr/bin
Signed-off-by: Lakshmipathi G <lakshmipathi@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 2279 (rpm spec file changes)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2279
2011-02-22 09:35:01 -08:00
Amar Tumballi
08ca1d3c78 removed some of the stale scripts
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 2393 ('gluster-volgen' and 'gluster-defrag' scripts are stale, but present in AMI)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2393
2011-02-10 22:18:01 -08:00