summaryrefslogtreecommitdiffstats
path: root/extras/snap_scheduler/gcron.py
Commit message (Collapse)AuthorAgeFilesLines
* snapshot/scheduler: Reload /etc/cron.d/glusterfs_snap_cron_tasks when shared ↵Avra Sengupta2015-06-191-0/+33
| | | | | | | | | | | | | | | | | | | storage is available Backport of http://review.gluster.org/#/c/11139/ 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: 1230399 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11168 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>
* snapshot/scheduler: Check if GCRON_TASKS exists beforeAvra Sengupta2015-06-111-0/+4
| | | | | | | | | | | | | | | | accessing it's mtime Backport of http://review.gluster.org/#/c/11138/ Change-Id: I873c83d21620527b20d7de428d11582c5499d1af BUG: 1230167 Signed-off-by: Avra Sengupta <asengupt@redhat.com> (cherry picked from commit 5b05d3e376e984f00528f5bf2f0febd0220ca91f) Reviewed-on: http://review.gluster.org/11159 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: Adhering to the common storage for schedulerAvra Sengupta2015-04-101-2/+2
| | | | | | | | | | | | | | | | | | | | 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: 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: 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>
* snapshot/scheduling: A cron based scheduler for snapshot schedulingAvra Sengupta2015-03-181-0/+146
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>