Bug 1622957

Summary: [geo-rep]: gfid-conflict-resolution config option is accepting any value instead of only boolean
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: medium Docs Contact:
Priority: unspecified    
Version: rhgs-3.4CC: amukherj, avishwan, csaba, khiremat, rhs-bugs, storage-qa-internal
Target Milestone: ---Keywords: Rebase
Target Release: RHGS 3.5.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-6.0-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-30 12:20:13 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: 1696807    

Description Rahul Hinduja 2018-08-28 09:05:12 UTC
Description of problem:
=======================

Bug 1622029 has introduced gfid-conflict-resolution option to handle gfid conflicts gracefully. This option is boolean and should accept only "1/0" , "enable/disable", "True/False", "On/Off". 

However, the option is accepting any values, for example: 

[root@rhsauto032 scripts]# gluster volume geo-replication Master rhsauto022::Slave config gfid-conflict-resolution
kadjkahkhfhf
[root@rhsauto032 scripts]# gluster volume geo-replication Master rhsauto022::Slave config gfid-conflict-resolution rahul
geo-replication config updated successfully
[root@rhsauto032 scripts]# gluster volume geo-replication Master rhsauto022::Slave config gfid-conflict-resolution
rahul
[root@rhsauto032 scripts]# gluster volume geo-replication Master rhsauto022::Slave config \!gfid-conflict-resolution
geo-replication config updated successfully
[root@rhsauto032 scripts]# gluster volume geo-replication Master rhsauto022::Slave config gfid-conflict-resolution
[root@rhsauto032 scripts]# 


In comparison to other config options, it is working differently. For example use_meta_volume config options bails out with wrong entries.

[root@rhsauto032 scripts]# gluster volume geo-replication Master rhsauto022::Slave config use_meta_volume 
true
[root@rhsauto032 scripts]# gluster volume geo-replication Master rhsauto022::Slave config use_meta_volume akhdkhfdakhf
Invalid value(akhdkhfdakhf) for option use_meta_volume
geo-replication command failed
[root@rhsauto032 scripts]# gluster volume geo-replication Master rhsauto022::Slave config use_meta_volume rahul
Invalid value(rahul) for option use_meta_volume
geo-replication command failed
[root@rhsauto032 scripts]# gluster volume geo-replication Master rhsauto022::Slave config use_meta_volume 
true
[root@rhsauto032 scripts]#


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

glusterfs-geo-replication-3.12.2-18.el7rhgs.x86_64


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

Always


Steps to Reproduce:
===================
1. gluster volume geo-replication Master rhsauto022::Slave config gfid-conflict-resolution rahul


Actual results:
===============

Config is successful


Expected results:
=================

Config should fail to set

Comment 2 Aravinda VK 2018-11-19 06:56:17 UTC
Fix available upstream https://review.gluster.org/#/c/glusterfs/+/18257/

Comment 10 errata-xmlrpc 2019-10-30 12:20:13 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/RHEA-2019:3249