Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1139373

Summary: sanlock.get_hosts() off-by-one error when specifying the hostId argument
Product: Red Hat Enterprise Linux 6 Reporter: Jan Kurik <jkurik>
Component: sanlockAssignee: David Teigland <teigland>
Status: CLOSED ERRATA QA Contact: Elad <ebenahar>
Severity: high Docs Contact:
Priority: high    
Version: 6.5CC: acanan, agk, amureini, benl, cluster-maint, ebenahar, gklein, jharriga, jherrman, jkurik, nsoffer, pm-eus, salmy, scohen, teigland, tlavigne
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Prior to this update, an off-by-one error caused the sanlock.get_hosts() function to return incorrect information about the host when it was used with the host_id argument. This error has been fixed and sanlock.get_hosts() returns the correct information when host_id is used.
Story Points: ---
Clone Of: 1111210 Environment:
Last Closed: 2015-06-01 12:24:39 UTC Type: ---
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: 1111210    
Bug Blocks: 1131192, 1131194    

Description Jan Kurik 2014-09-08 19:28:53 UTC
This bug has been copied from bug #1111210 and has been proposed
to be backported to 6.5 z-stream (EUS).

Comment 4 David Teigland 2014-09-26 14:47:44 UTC
I don't know what happens to it.

Comment 5 Nir Soffer 2014-09-26 21:11:53 UTC
(In reply to David Teigland from comment #4)
> I don't know what happens to it.

What is needed to get the fix in rhel6.5.z? It seems that we have all the acks. Do we have a build?

Comment 6 Allon Mureinik 2014-09-28 13:55:08 UTC
(In reply to Nir Soffer from comment #5)
> (In reply to David Teigland from comment #4)
> > I don't know what happens to it.
> 
> What is needed to get the fix in rhel6.5.z? It seems that we have all the
> acks. Do we have a build?

Comment 7 David Teigland 2014-09-29 21:07:24 UTC
There is a 6.6 build.  Do I create a 6.5.z build, if so how?
If there's something more I need to do, someone please let me know.

Comment 13 David Teigland 2014-12-05 20:34:25 UTC
with a lot of help I've managed to create a zstream build for this:
https://brewweb.devel.redhat.com/taskinfo?taskID=8337595

I'm waiting to find out if an errata is needed and if so how to create it.

Comment 16 Elad 2014-12-24 08:37:46 UTC
Hi, 

In order to verify I need the following details:
- which OS should I test on? RHEL6.5.1?
- Sanlock build
- vdsm build (3.4/3.5)

Regardong to reproduction steps - will the steps described in https://bugzilla.redhat.com/show_bug.cgi?id=1111210#c16 be good?


Thanks

Comment 17 Nir Soffer 2014-12-24 09:52:38 UTC
(In reply to Elad from comment #16)
> - which OS should I test on? RHEL6.5.1?
All supported platforms

> - Sanlock build
David, can you help with this?

> - vdsm build (3.4/3.5)
Does not matter, vdsm does not use yet the fixed version.

> Regardong to reproduction steps - will the steps described in
> https://bugzilla.redhat.com/show_bug.cgi?id=1111210#c16 be good?
Yes

Comment 18 David Teigland 2015-01-02 15:16:31 UTC
There's a link to the build in comment 13, sanlock-2.8-2.el6_5

Comment 19 Elad 2015-01-12 07:09:35 UTC
sanlock.get_hosts function returns the right host id:


>>> sanlock.get_hosts('51ab53aa-9b94-4dec-b180-01a0c9de8915')
[{'generation': 7, 'host_id': 1, 'flags': 3, 'io_timeout': 10, 'timestamp': 1336}, {'generation': 2, 'host_id': 2, 'flags': 3, 'io_timeout': 10, 'timestamp': 1620141}]

>>> sanlock.get_hosts('51ab53aa-9b94-4dec-b180-01a0c9de8915', 1)
[{'generation': 7, 'host_id': 1, 'flags': 3, 'io_timeout': 10, 'timestamp': 1336}]






The host id is 1:
vdsm.log:

171ca5ae-273b-43b5-b381-c1f228cba21b::DEBUG::2015-01-12 08:44:42,629::clusterlock::240::Storage.SANLock::(acquireHostId) Host id for domain 51ab53aa-9b94-4dec-b180-01a0c9de8915 successfully acquired (id: 1)



Verified using:

RHEL6.6
sanlock-2.8-2.el6_5.x86_64
rhev 3.5 vt13.6
vdsm-4.16.8.1-5.el6ev.x86_64

Comment 23 Elad 2015-03-11 08:12:50 UTC
Redirecting the need-info

Comment 24 Jan Kurik 2015-03-11 09:03:16 UTC
Elad, may I ask you please to move the errata to REL_PREP ?

Comment 25 Gil Klein 2015-03-11 09:44:16 UTC
(In reply to Jan Kurik from comment #24)
> Elad, may I ask you please to move the errata to REL_PREP ?
I'll take care of this

Comment 30 errata-xmlrpc 2015-06-01 12:24:39 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://rhn.redhat.com/errata/RHBA-2015-1038.html