Bug 1331376 - [geo-rep]: schedule_georep.py doesn't work when invoked using cron
Summary: [geo-rep]: schedule_georep.py doesn't work when invoked using cron
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: geo-replication
Version: rhgs-3.1
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
: RHGS 3.1.3
Assignee: Aravinda VK
QA Contact: Rahul Hinduja
URL:
Whiteboard:
Depends On:
Blocks: 1311817 1331658 1331924
TreeView+ depends on / blocked
 
Reported: 2016-04-28 12:04 UTC by Rahul Hinduja
Modified: 2016-06-23 05:20 UTC (History)
5 users (show)

Fixed In Version: glusterfs-3.7.9-3
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1331658 (view as bug list)
Environment:
Last Closed: 2016-06-23 05:20:32 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1240 0 normal SHIPPED_LIVE Red Hat Gluster Storage 3.1 Update 3 2016-06-23 08:51:28 UTC

Description Rahul Hinduja 2016-04-28 12:04:46 UTC
Description of problem:
=======================

When ran the schedule_georep.py using cron, it failed with the following traceback:

Traceback (most recent call last):
  File "/usr/share/glusterfs/scripts/schedule_georep.py", line 470, in <module>
    main(args)
  File "/usr/share/glusterfs/scripts/schedule_georep.py", line 362, in main
    execute(cmd)
  File "/usr/share/glusterfs/scripts/schedule_georep.py", line 86, in execute
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Traceback (most recent call last):
  File "/usr/share/glusterfs/scripts/schedule_georep.py", line 470, in <module>
    main(args)
  File "/usr/share/glusterfs/scripts/schedule_georep.py", line 362, in main
    execute(cmd)
  File "/usr/share/glusterfs/scripts/schedule_georep.py", line 86, in execute
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
  File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory



Version-Release number of selected component (if applicable):
=============================================================

glusterfs-3.7.9-2.el7rhgs.x86_64


How reproducible:
=================

1/1

Comment 2 Aravinda VK 2016-04-29 08:06:26 UTC
Upstream patch sent
http://review.gluster.org/#/c/14111

Comment 4 Aravinda VK 2016-04-30 04:26:57 UTC
Downstream Patch: https://code.engineering.redhat.com/gerrit/#/c/73379/

Comment 6 Rahul Hinduja 2016-05-02 14:50:13 UTC
Verified with the build: 
glusterfs-3.7.9-3.el7rhgs.x86_64
glusterfs-geo-replication-3.7.9-3.el7rhgs.x86_64

Ran the script using cron and didn't observe the crash. 

Crontab entry:
==============

45 14 * * * python /usr/share/glusterfs/scripts/schedule_georep.py --no-color Tom 10.70.37.122 Jerry >> /var/log/glusterfs/schedule_georep.log 2>&1


Script logs:
============

[root@dhcp37-182 scripts]# tailf /var/log/glusterfs/schedule_georep.log
[    OK] Stopped Geo-replication
[    OK] Set Checkpoint
[    OK] Started Geo-replication and watching Status for Checkpoint completion
[    OK] All Checkpoints NOT COMPLETE, All status OK (Turns   1)
[    OK] All Checkpoints COMPLETE, All status OK (Turns   2)
[    OK] Stopping Geo-replication session now
^C
[root@dhcp37-182 scripts]# 


Date:
=====

[root@dhcp37-182 scripts]# date
Mon May  2 14:48:46 UTC 2016
[root@dhcp37-182 scripts]# 


Arequalchecksum match:
======================


Master
++++++

[root@dj ~]# /usr/local/bin/arequal-checksum -p /mnt/master/

Entry counts
Regular files   : 930
Directories     : 202
Symbolic links  : 96
Other           : 0
Total           : 1228

Metadata checksums
Regular files   : 7430
Directories     : 1a41
Symbolic links  : 3e9
Other           : 3e9

Checksums
Regular files   : 590d350acf726008400852adf2facbbc
Directories     : 31b4e334d6f5775
Symbolic links  : 4612693534791c16
Other           : 0
Total           : 5c0c40a1449ee0d7
[root@dj ~]# 


Slave
+++++

[root@dj ~]# /usr/local/bin/arequal-checksum -p /mnt/slave/

Entry counts
Regular files   : 930
Directories     : 202
Symbolic links  : 96
Other           : 0
Total           : 1228

Metadata checksums
Regular files   : 7430
Directories     : 1a41
Symbolic links  : 3e9
Other           : 3e9

Checksums
Regular files   : 590d350acf726008400852adf2facbbc
Directories     : 31b4e334d6f5775
Symbolic links  : 4612693534791c16
Other           : 0
Total           : 5c0c40a1449ee0d7
[root@dj ~]# 


Moving the bug to verified state

Comment 9 errata-xmlrpc 2016-06-23 05:20:32 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-2016:1240


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