Bug 1595535

Summary: In a 4 node CNS cluster, need to pass 3 hosts from heketi for gluster-block cli when HA is 3, instead of all 4 IPs
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Neha Berry <nberry>
Component: heketiAssignee: Raghavendra Talur <rtalur>
Status: CLOSED ERRATA QA Contact: Neha Berry <nberry>
Severity: high Docs Contact:
Priority: unspecified    
Version: cns-3.10CC: akrishna, hchiramm, jmulligan, kramdoss, prasanna.kalever, rhs-bugs, rtalur, sankarshan, storage-qa-internal, xiubli
Target Milestone: ---   
Target Release: CNS 3.10   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, because of an off by one error, Heketi added one host more than ha count to the list of hosts provided to gluster-block cli during block volume create. This lead to the incorrect usage of one extra node. With this fix, the number of hosts used for iscsi targets is equal to ha count parameter.
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-12 09:23:45 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: 1568862    

Comment 6 Raghavendra Talur 2018-07-09 12:49:21 UTC
hacount is optional. If heketi isn't provided one, it adds all the nodes in the cluster as a host.

However, if ha count is provided, heketi chooses hosts==hacount.

The problem in heketi today is that the selection of hosts is always a for loop over the same list, hence we lose out on distributing the targets across the cluster.

Comment 7 Raghavendra Talur 2018-07-09 13:03:11 UTC
From heketi code,

gluster-block create %v/%v  ha %v auth %v prealloc full %v %vGiB --json

So, heketi sends only as many hosts as in ha count. Is it possible that gluster-block creates target on 4th node as it belongs to the same trusted storage pool?

Comment 9 Raghavendra Talur 2018-07-10 02:30:58 UTC
This is a bug in heketi and I have a patch ready. Providing acks.

Comment 13 Raghavendra Talur 2018-07-12 09:32:42 UTC
Patch posted at https://github.com/heketi/heketi/pull/1256

Comment 14 Humble Chirammal 2018-07-13 06:34:47 UTC
Fixed in version : rhgs-volmanager-rhel7:3.3.1-20

Comment 17 Anjana KD 2018-08-30 23:56:01 UTC
Updated doc text in the Doc Text field. Please review for technical accuracy.

Comment 19 Anjana KD 2018-09-07 17:59:08 UTC
Thankyou John 

I have updated the doc text based on the feed back.

Comment 20 John Mulligan 2018-09-07 18:37:56 UTC
Doc Text looks OK

Comment 22 errata-xmlrpc 2018-09-12 09:23:45 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-2018:2686