Bug 1475466

Summary: [geo-rep]: Scheduler help needs correction for description of --no-color
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Rahul Hinduja <rhinduja>
Component: geo-replicationAssignee: Kotresh HR <khiremat>
Status: CLOSED ERRATA QA Contact: Rahul Hinduja <rhinduja>
Severity: low Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: csaba, khiremat, rallan, rhs-bugs, sheggodu, storage-qa-internal
Target Milestone: ---   
Target Release: RHGS 3.4.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: rebase
Fixed In Version: glusterfs-3.12.2-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1495436 (view as bug list) Environment:
Last Closed: 2018-09-04 06:34:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1495436, 1496238, 1503134    

Description Rahul Hinduja 2017-07-26 18:17:21 UTC
Description of problem:
-----------------------

Currently the description of --no-color in the help of schedule_georep is "Use Color in CLI output". Whereas the default is with color, and if user provides this option, that means no color will be seen in the output and hence the description should be:

--no-color           Do not Use Color in CLI output

Output:
-------

[root@dhcp42-79 MASTER]#  python /usr/share/glusterfs/scripts/schedule_georep.py --h
usage: schedule_georep.py [-h] [--interval INTERVAL] [--timeout TIMEOUT]
                          [--no-color]
                          mastervol SLAVE slavevol

Schedule Geo-replication
------------------------
A tool to run Geo-replication when required. This can be used to
schedule the Geo-replication to run once in a day using

   # Run daily at 08:30pm
   30 20 * * * root python /usr/share/glusterfs/scripts/schedule_georep.py \
      --no-color gv1 fvm1 gv2 >> /var/log/glusterfs/schedule_georep.log 2>&1

This tool does the following,

1. Stop Geo-replication if Started
2. Start Geo-replication
3. Set Checkpoint
4. Check the Status and see Checkpoint is Complete.(LOOP)
5. If checkpoint complete, Stop Geo-replication

Usage:

    python /usr/share/glusterfs/scripts/schedule_georep.py <MASTERVOL> \
         <SLAVEHOST> <SLAVEVOL>

For example,

    python /usr/share/glusterfs/scripts/schedule_georep.py gv1 fvm1 gv2

positional arguments:
  mastervol            Master Volume Name
  SLAVE                SLAVEHOST or root@SLAVEHOST or user@SLAVEHOST
  slavevol             Slave Volume Name

optional arguments:
  -h, --help           show this help message and exit
  --interval INTERVAL  Interval in Seconds. Wait time before each status check
  --timeout TIMEOUT    Timeout in minutes. Script will stop Geo-replication if
                       Checkpoint is not complete in the specified timeout
                       time
  --no-color           Use Color in CLI output
[root@dhcp42-79 MASTER]# 


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

glusterfs-geo-replication-3.8.4-35.el7rhgs.x86_64

Comment 3 Kotresh HR 2017-09-26 03:58:37 UTC
Upstream Patch:

https://review.gluster.org/18388 (master)

Comment 6 Rahul Hinduja 2018-04-18 08:42:41 UTC
Verified this bug with build: glusterfs-geo-replication-3.12.2-7.el7rhgs.x86_64

It now correctly reflects the description of "--no-color" as

[root@dhcp41-226 scripts]#  python /usr/share/glusterfs/scripts/schedule_georep.py --h | grep "no-color"
                          [--no-color]
      --no-color gv1 fvm1 gv2 >> /var/log/glusterfs/schedule_georep.log 2>&1
  --no-color           Don't use Color in CLI output
[root@dhcp41-226 scripts]# 

Moving bug to verified state.

Comment 7 errata-xmlrpc 2018-09-04 06:34:19 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/RHSA-2018:2607