Bug 1447360

Summary: [gluster-block]:Creates block device even with invalid host IP
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: surabhi <sbhaloth>
Component: gluster-blockAssignee: Prasanna Kumar Kalever <prasanna.kalever>
Status: CLOSED ERRATA QA Contact: surabhi <sbhaloth>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.3CC: amukherj, rhs-bugs
Target Milestone: ---   
Target Release: RHGS 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gluster-block-0.2-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-21 04:17:54 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: 1417151    

Description surabhi 2017-05-02 13:49:56 UTC
Description of problem:
***************************

When I tried to give invalid IP's for HA , the gluster-block command still creates the block-device.
It shows fail as the command output but still lists it as follows:

gluster-block create blockvol/bluff-block ha 2 px.xom,ll.xom 1GiB
IQN: (null)
PORTAL(S): (null)
REWIND ON:    px.xom ll.xom
RESULT: FAIL

# gluster-block create blockvol/bluff-block ha 2 google.com,google.com 1GiB
BLOCK with name: 'bluff-block' already EXIST


gluster-block info blockvol/bluffblock
No Block with name bluffblock

# gluster-block info blockvol/bluff-block
NAME: bluff-block
VOLUME: blockvol
GBID: 68038200-585b-49d5-ab31-9939a03cfc2d
SIZE: 1073741824
HA: 2
BLOCK CONFIG NODE(S):


gluster-block create blockvol/faulty-block ha 2 10.70.20.21,10.70.21.20 1GiB ----> invalid IP's





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

rpm -qa | grep gluster-block
gluster-block-0.1.1-1.x86_64



How reproducible:
always

Steps to Reproduce:
1. Create a block device with invalid IP's as hosts 
2. Check the gluster-block list for the volume
3.

Actual results:
**************
Even with invalid IP's the gluster-block is creating the device and listing it.
The behaviour is weird, it fails while creation but still lists it. when try to get info it says device doesn't exists.


Expected results:
********************
It should error out with proper message.



Additional info:
*********************
Also the similar issue on a stopped volume as well. 
It should error out when the volume is not started and a block device is created.

Comment 4 Prasanna Kumar Kalever 2017-05-08 06:36:30 UTC
Handled by as part of https://review.gluster.org/#/c/17069/

Comment 6 surabhi 2017-06-13 09:32:48 UTC
gluster-block create blockstor/hiblock ha 1 google.com 1GiBfailed to configure on google.com : Connection timed out
RESULT:FAIL
[root@dhcp46-152 ~]# systemctl status gluster-blockd
● gluster-blockd.service - Gluster block storage utility
   Loaded: loaded (/usr/lib/systemd/system/gluster-blockd.service; disabled; vendor preset: disabled)
   Active: active (running) since Tue 2017-06-13 05:26:18 EDT; 3min 26s ago


It does not creates block with an invalid host and provides proper error messages.
There is no crash also seen.Marking the BZ verified.

gluster-block-0.2.1-1.el7rhgs.x86_64
tcmu-runner-1.2.0-4.el7rhgs.x86_64

Comment 8 errata-xmlrpc 2017-09-21 04:17:54 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-2017:2773