summaryrefslogtreecommitdiffstats
path: root/extras
Commit message (Collapse)AuthorAgeFilesLines
* common-ha : Clean up cib state completelyMeghana Madhusudhan2015-06-151-23/+1
| | | | | | | | | | | | 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>
* tools/glusterfind: Cleanup glusterfind dir after a volume deleteAravinda VK2015-06-122-1/+65
| | | | | | | | | | | | | | | | | | 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>
* common-ha: handle long node names and node names with '-' and '.' in themKaleb S. KEITHLEY2015-06-112-12/+8
| | | | | | | | | | | | | | | 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>
* common-ha : Clean up persistent cib statemeghana2015-06-111-1/+2
| | | | | | | | | | | | | | | 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>
* snapshot/scheduler: Reload /etc/cron.d/glusterfs_snap_cron_tasks when shared ↵Avra Sengupta2015-06-111-0/+33
| | | | | | | | | | | | | | | | | 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>
* snapshot/scheduler: Check if GCRON_TASKS exists beforeAvra Sengupta2015-06-101-0/+4
| | | | | | | | | | | | 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>
* snapshot/scheduler: Handle OSError in os. callbacksAvra Sengupta2015-06-091-8/+8
| | | | | | | | | | | | | 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>
* glusterd/shared_storage: Provide a volume set option to create and mount the ↵Avra Sengupta2015-06-042-1/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* snapshot/scheduler: Modified main() function to take arguments.nnDarshan2015-06-041-3/+3
| | | | | | | | | | | | | | 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>
* build: fix compiling on older distributionsNiels de Vos2015-06-033-3/+5
| | | | | | | | | | | | | | | | | | | | | | | 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>
* snapshot/scheduler: Return proper error code in case of failureAvra Sengupta2015-06-021-61/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* common-ha: fix race between setting grace and virt IP fail-overKaleb S. KEITHLEY2015-06-011-10/+14
| | | | | | | | | | | | | | 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>
* common-ha: handle long node names and node names with '-' and '.' in themKaleb S. KEITHLEY2015-05-302-35/+59
| | | | | | | | | | | | | | 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>
* scripts: Added script stop-all-gluster-processes.sh in rpmAravinda VK2015-05-291-2/+3
| | | | | | | | | | | | 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>
* snapshot/scheduler: Do not enable scheduler if another scheduler is runningAvra Sengupta2015-05-281-2/+85
| | | | | | | | | | | | | | | | | | | | | | | 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>
* NFS-Ganesha : Disable ACL by defaultMeghana Madhusudhan2015-05-141-0/+1
| | | | | | | | | | | | | | | | | 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>
* NFS-Ganesha : Improved sed expression in cleanupMeghana Madhusudhan2015-05-071-1/+1
| | | | | | | | | | | | | | | 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>
* NFS-Ganesha: Add-node and delete-node changes in HA implementationMeghana Madhusudhan2015-05-071-4/+60
| | | | | | | | | | | | | | | 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>
* NFS-Ganesha : Do not empty global config file when cluster is tornMeghana Madhusudhan2015-05-061-1/+1
| | | | | | | | | | | | | | | 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>
* Cache-invalidation : set to on/off depending on ganesha.enable valueMeghana Madhusudhan2015-05-051-0/+3
| | | | | | | | | | | | | | | | 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>
* snapshot/scheduler: Use os.path.realpath() for path validationAvra Sengupta2015-05-051-1/+1
| | | | | | | | | | | | | | 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>
* snapshot/scheduler: Use shutil.move instead of os.rename()Avra Sengupta2015-04-301-2/+3
| | | | | | | | | | | | | | | 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>
* common-ha: delete-node implementationKaleb S. KEITHLEY2015-04-293-108/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix case mistake for MKDIR_P in MakefilesEmmanuel Dreyfus2015-04-203-5/+5
| | | | | | | | | | | | | | | | 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>
* geo-rep: Added GF_CPPFLAGS to Makefile.amv3.8devSoumya Koduri2015-04-141-0/+1
| | | | | | | | | | | | | | 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>
* NFS-Ganesha : Use common meta-volume for shared storageMeghana Madhusudhan2015-04-142-18/+17
| | | | | | | | | | | | | | | 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
* Fix incorrect rfc.sh and checkpatch.pl use of "jenkins" instead of "gerrit"Justin Clift2015-04-131-5/+5
| | | | | | | | | 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>
* NFS-Ganesha : Fixing HA script invocation and othersMeghana Madhusudhan2015-04-132-12/+12
| | | | | | | | | | | | | | 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
* snapshot/scheduler: Adhering to the common storage for schedulerAvra Sengupta2015-04-102-8/+21
| | | | | | | | | | | | | | | | | | | | 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>
* snapshot/scheduler: Validate the number of entries in scheduleAvra Sengupta2015-04-101-0/+12
| | | | | | | | | | | | | | | | | | | | | | 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>
* snapshot/scheduler: Fix deleting of snapshot scheduleAvra Sengupta2015-04-101-9/+10
| | | | | | | | | | | | | | 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>
* snapshot/scheduler: Only run if shared storage is mountedAvra Sengupta2015-04-101-39/+70
| | | | | | | | | | | | | | | 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>
* ganesha-ha: more robust pid file handlingKaleb S. KEITHLEY2015-04-082-5/+6
| | | | | | | | | | | 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>
* snapshot/scheduler: Don't append timestamp in scheduled snapshotsAvra Sengupta2015-04-071-7/+11
| | | | | | | | | | | | | | | | | | | | | 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>
* snapshot/scheduler: Remove unwanted schedule enable checkAvra Sengupta2015-04-071-109/+74
| | | | | | | | | | | | | | 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>
* snapshot/scheduler: Check the correctness of Jobname and VolnameAvra Sengupta2015-04-071-0/+27
| | | | | | | | | | | | | | | | | 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>
* extras: Fix stop-all-gluster-processes.sh scriptKotresh HR2015-04-061-2/+2
| | | | | | | | | | | | | | "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>
* snapshot/scheduler: Fix the snapshot create command.Avra Sengupta2015-04-041-1/+2
| | | | | | | | | | | | 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>
* geo-rep: Copy geo-rep hook-script during source installKotresh HR2015-04-021-0/+3
| | | | | | | | | | | | | | | | | 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>
* ganesha-ha: ganesha-ha.sh --status (one-liner) implementationKaleb S. KEITHLEY2015-03-241-0/+1
| | | | | | | | | 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>
* build: let checkpatch check for a trailing dotNiels de Vos2015-03-231-0/+11
| | | | | | | | | | | | | | | 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>
* build: correctly install the snap_scheduler toolsNiels de Vos2015-03-191-1/+1
| | | | | | | | | | | | | 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>
* snapshot/scheduling: A cron based scheduler for snapshot schedulingAvra Sengupta2015-03-185-1/+804
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* feature/glusterfind: A tool to find incremental changesAravinda VK2015-03-183-1/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* NFS-Ganesha: Install scripts, config files, and resource agent scriptsKaleb S. KEITHLEY2015-03-1712-1/+1355
| | | | | | | | | | | | | | | | | 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>
* build: adjust checkpatch for HEAD.Michael Scherer2015-03-051-1/+2
| | | | | | | | | | | | | 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>
* geo-rep: Handle copying of common_secret.pem.pub to slave correctly.Kotresh HR2015-01-211-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* build: add a tmpfiles.d config file for /run/glusterNiels de Vos2015-01-192-0/+7
| | | | | | | | | | | | | | | | | | 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>
* Stop logrotate from complaining about missing files.Jan-Hendrik Zab2014-12-111-1/+1
| | | | | | | | | | | | | | 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>
* build: only install geo-rep scripts when enabledNiels de Vos2014-12-071-1/+1
| | | | | | | | | | | | | | 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>