Bug 1029575

Summary: Dist-geo-rep: use-tarssh option takes even garbage value and returns success
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: M S Vishwanath Bhat <vbhat>
Component: geo-replicationAssignee: Avra Sengupta <asengupt>
Status: CLOSED ERRATA QA Contact: M S Vishwanath Bhat <vbhat>
Severity: medium Docs Contact:
Priority: high    
Version: 2.1CC: aavati, amarts, asengupt, csaba, grajaiya, mzywusko
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.4.0.44rhs-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-27 15:47:36 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:

Description M S Vishwanath Bhat 2013-11-12 16:17:26 UTC
Description of problem:
geo-rep config CLI takes even the garbage value and succeeds.



Version-Release number of selected component (if applicable):
glusterfs-3.4.0.43rhs-1.el6rhs.x86_64


How reproducible:
Always

Steps to Reproduce:
1. gluster v geo master slave_url config use-tarssh blah

Actual results:

[root@harrier ~]# gluster v geo master falcon::slave config use-tarssh true
geo-replication config updated successfully
[root@harrier ~]# gluster v geo master falcon::slave config | grep tar
use_tarssh: true
ssh_command_tar: ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i /var/lib/glusterd/geo-replication/tar_ssh.pem
[root@harrier ~]# gluster v geo master falcon::slave config use-tarssh blah
geo-replication config updated successfully
[root@harrier ~]# gluster v geo master falcon::slave config | grep tar
use_tarssh: blah
ssh_command_tar: ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i /var/lib/glusterd/geo-replication/tar_ssh.pem
[root@harrier ~]# gluster v geo master falcon::slave config use-tarssh dontusetarssh
geo-replication config updated successfully
[root@harrier ~]# gluster v geo master falcon::slave config | grep tar
use_tarssh: dontusetarssh
ssh_command_tar: ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i /var/lib/glusterd/geo-replication/tar_ssh.pem



Expected results:
use-tarssh should take only true, on or some other valid and allowed values.


Additional info:

Comment 2 Avra Sengupta 2013-11-13 09:32:21 UTC
Fixed with https://code.engineering.redhat.com/gerrit/15619

Comment 3 M S Vishwanath Bhat 2013-11-13 16:03:04 UTC
With Invalid values


[root@pythagoras ]# gluster v geo master euclid::slave config use-tarssh blah
Invalid value(blah) for option use-tarssh
geo-replication command failed
[root@pythagoras ]# gluster v geo master euclid::slave config use-tarssh gibber
Invalid value(gibber) for option use-tarssh
geo-replication command failed


Now the valid values


[root@pythagoras ]# gluster v geo master euclid::slave config use-tarssh true
geo-replication config updated successfully
[root@pythagoras ]# gluster v geo master euclid::slave config | grep tar
use_tarssh: true
ssh_command_tar: ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i /var/lib/glusterd/geo-replication/tar_ssh.pem
[root@pythagoras ]# gluster v geo master euclid::slave config use-tarssh false
geo-replication config updated successfully
[root@pythagoras ]# gluster v geo master euclid::slave config | grep tar
use_tarssh: false
ssh_command_tar: ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i /var/lib/glusterd/geo-replication/tar_ssh.pem
[root@pythagoras ]# gluster v geo master euclid::slave config use-tarssh 1
geo-replication config updated successfully
[root@pythagoras ]# gluster v geo master euclid::slave config | grep tar
use_tarssh: 1
ssh_command_tar: ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i /var/lib/glusterd/geo-replication/tar_ssh.pem
[root@pythagoras ]# gluster v geo master euclid::slave config use-tarssh 0
geo-replication config updated successfully
[root@pythagoras ]# gluster v geo master euclid::slave config | grep tar
use_tarssh: 0
ssh_command_tar: ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i /var/lib/glusterd/geo-replication/tar_ssh.pem



Not it takes only true, false, yes, no, 1 and 0 as valid values. So moving the bug to verified.

Comment 4 errata-xmlrpc 2013-11-27 15:47:36 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.

http://rhn.redhat.com/errata/RHBA-2013-1769.html