Description of problem: ----------------------------------------- Scheduling of snapshot for a volume is failing to create snapshots on RHEL 8.2 setup. Version-Release number of selected component: -------------------------------------------- glusterfs-6.0-32.el8rhgs.x86_64 How reproducible: -------------------------------------------- Everytime Steps to Reproduce: -------------------------------------------- 1.Create a volume and start it. 2.Mount the volume and run IO's. 3.To schedule a snapshot enable cluster.enable-shared-storage gluster volume set all cluster.enable-shared-storage enable 4.set - setsebool -P cron_system_cronjob_use_shares on 5.Run snap_scheduler.py enable 6.Run snap_scheduler.py init on each node one by one. 7.Run snap_scheduler.py status. 8.Add a snapshot schedule. snap_scheduler.py add "Job1" "* * * * *" volume_name 9. Check for he snapshot creation gluster snapshot list Actual results: --------------------------------------------- Snapshot is not created fot the scheduled time . Expected results: ---------------------------------------------- The snapshot should be created for the scheduled time. Additional info: ---------------------------------------------- Below I have mentioned the CLI outputs:- [root@dhcp47-62 ~]# gluster volume set all cluster.enable-shared-storage enable volume set: success [root@dhcp47-62 ~]# set - setsebool -P cron_system_cronjob_use_shares on [root@dhcp47-62 ~]# snap_scheduler.py enable snap_scheduler: Snapshot scheduling is enabled [root@dhcp47-62 ~]# gluster volume list gluster_shared_storage volume_replica [root@dhcp47-62 ~]# snap_scheduler.py init snap_scheduler: Successfully initialised snapshot scheduler for this node [root@dhcp47-62 ~]# snap_scheduler.py status snap_scheduler: Snapshot scheduling status: Enabled t@dhcp47-62 ~]# snap_scheduler.py add "Job1" "*/5 * * * *" volume_replica snap_scheduler: Successfully added snapshot schedule [root@dhcp47-62 ~]# snap_scheduler.py list JOB_NAME SCHEDULE OPERATION VOLUME NAME ---------------------------------------------------------------------------- Job1 */5 * * * * Snapshot Create volume_replica [root@dhcp47-62 ~]# gluster snapshot list No snapshots present [root@dhcp47-62 ~]# gluster snapshot list No snapshots present [root@dhcp47-62 ~]# gluster snapshot list No snapshots present
This bug is a blocker as snapshots are not created when scheduled and the testing for this parameter(snapshot scheduling) is blocked.
By default there is no "/usr/bin/python" present in RHEL 8,we have to create a soft link, should we create softlink using python3 or python2? So that I will create the soft link and re-try and let you know.
You can follow this document[1] to proceed further. [1]. https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/using-python3_configuring-basic-system-settings
[root@dhcp47-190 ~]# ls /usr/sbin/snap_scheduler.py /usr/sbin/snap_scheduler.py Created a new setup from the scratch. All the steps to reproduce mentioned in comment#0 were followed after creation a soft link but still the snapshot creation was failing. [root@dhcp47-190 ~]# gluster volume set all cluster.enable-shared-storage enable volume set: success [root@dhcp47-190 ~]# set - setsebool -P cron_system_cronjob_use_shares on [root@dhcp47-190 ~]# snap_scheduler.py init snap_scheduler: Successfully initialised snapshot scheduler for this node [root@dhcp47-190 ~]# snap_scheduler.py status snap_scheduler: Snapshot scheduling status: Enabled [root@dhcp47-190 ~]# snap_scheduler.py add "Job1" "*/5 * * * *" vol_rep snap_scheduler: Successfully added snapshot schedule [root@dhcp47-190 ~]# snap_scheduler.py list JOB_NAME SCHEDULE OPERATION VOLUME NAME -------------------------------------------------------------------- Job1 */5 * * * * Snapshot Create vol_rep [root@dhcp47-190 ~]# gluster snapshot list No snapshots present [root@dhcp47-190 ~]# gluster snapshot list No snapshots present [root@dhcp47-190 ~]# gluster snapshot list No snapshots present
Upstream patch: https://review.gluster.org/#/c/glusterfs/+/24364/
Tested with the following:- 1.glusterfs-6.0-33.el8rhgs.x86_64 2.4.18.0-193.el8.x86_64 Steps to reproduce are same as mentioned in comment #0. The snapshots were being created as the scheduled timing which is after 2 minutes. 1.[root@dhcp47-62 ~]#snap_scheduler.py add "Job1" "*/2 * * * *" volume_replica2 snap_scheduler: Successfully added snapshot schedule 2.[root@dhcp47-62 ~]# gluster snapshot list Scheduled-Job1-volume_replica2_GMT-2020.05.06-12.58.01 Scheduled-Job1-volume_replica2_GMT-2020.05.06-13.00.02 Scheduled-Job1-volume_replica2_GMT-2020.05.06-13.02.02 Scheduled-Job1-volume_replica2_GMT-2020.05.06-13.04.01 3.[root@dhcp47-62 ~]# gluster snapshot activate Scheduled-Job1-volume_replica2_GMT-2020.05.06-12.58.01 Snapshot activate: Scheduled-Job1-volume_replica2_GMT-2020.05.06-12.58.01: Snap activated successfully Since the issue is fixed ,moving this bug to verified state.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2020:2572