Bug 1825195 - [RHEL8.2] Snapshot Scheduler fails to create Snapshot .
Summary: [RHEL8.2] Snapshot Scheduler fails to create Snapshot .
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: snapshot
Version: rhgs-3.5
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: RHGS 3.5.z Batch Update 2
Assignee: Sunny Kumar
QA Contact: Mugdha Soni
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-17 11:07 UTC by Mugdha Soni
Modified: 2020-06-19 14:07 UTC (History)
7 users (show)

Fixed In Version: glusterfs-6.0-33
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-06-16 06:19:39 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:2572 0 None None None 2020-06-16 06:19:56 UTC

Description Mugdha Soni 2020-04-17 11:07:33 UTC
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

Comment 1 Mugdha Soni 2020-04-17 11:09:36 UTC
This bug is a blocker as snapshots are not created when scheduled and the testing for this parameter(snapshot scheduling) is blocked.

Comment 6 Mugdha Soni 2020-04-20 05:44:33 UTC
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.

Comment 9 Mugdha Soni 2020-04-22 12:00:24 UTC
[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

Comment 10 Sunny Kumar 2020-04-22 15:23:13 UTC
Upstream patch:

https://review.gluster.org/#/c/glusterfs/+/24364/

Comment 15 Mugdha Soni 2020-05-06 13:08:07 UTC
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.

Comment 20 errata-xmlrpc 2020-06-16 06:19:39 UTC
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


Note You need to log in before you can comment on or make changes to this bug.