Bug 1768969 - Duplicate iSCSI sessions in the hosted-engine deployment host when the tpgt is not 1
Summary: Duplicate iSCSI sessions in the hosted-engine deployment host when the tpgt i...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-setup
Version: 4.3.4
Hardware: All
OS: Linux
high
medium
Target Milestone: ovirt-4.5.0
: 4.5.0
Assignee: Asaf Rachmani
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On: 1772873 1922748 2059955
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-05 16:58 UTC by nijin ashok
Modified: 2023-03-24 15:54 UTC (History)
7 users (show)

Fixed In Version: ovirt-hosted-engine-setup-2.6.1-1 ovirt-ansible-collection-2.0.0-0.6.BETA.el8
Doc Type: Bug Fix
Doc Text:
Previously, during self-hosted engine deployment, the tpgt value was not used in the iSCSI login, creating duplicate iSCSI sessions. IN this release, the tpgt value is used in the iSCSI login, and no duplicate iSCSI sessions are created.
Clone Of:
: 1772873 (view as bug list)
Environment:
Last Closed: 2022-05-26 17:22:44 UTC
oVirt Team: Integration
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-ansible-collection pull 338 0 None open roles: hosted_engine_setup: Use `he_iscsi_tpgt` variable for iscsi login 2021-10-04 12:20:56 UTC
Red Hat Product Errata RHSA-2022:4764 0 None None None 2022-05-26 17:23:06 UTC
oVirt gerrit 116475 0 master MERGED storage: Pass he_iscsi_tgpt variable to hosted_engine_setup role 2021-10-20 09:12:06 UTC

Description nijin ashok 2019-11-05 16:58:37 UTC
Description of problem:

If a storage server is having a custom tpgt other than 1, then the hosted-engine deployment host will be having duplicate iSCSI sessions, one with tpgt as 1 and other with the correct tpgt.

During the deployment, the login request for the iSCSI target is passed without the "portal" parameter [1]. So it will create iSCSI database record with tpgt 1.

====
2019-11-05 20:13:35,694+0530 DEBUG (jsonrpc/3) [storage.Misc.excCmd] /usr/bin/taskset --cpu-list 0-3 /usr/bin/sudo -n /sbin/iscsiadm -m node -T iqn.2003-01.org.linux-iscsi.dhcp0-4.x8664:sn.3c30e094672f -I default -p 192.168.0.10:3260,1 --op=new (cwd None) (commands:198)

# grep tpgt /var/lib/iscsi/nodes/iqn.2003-01.org.linux-iscsi.dhcp0-4.x8664\:sn.3c30e094672f/192.168.0.10\,3260\,1/default 
node.tpgt = 1
====

Now when it adds the storage domain to RHV, the correct tpgt will be passed and will create another record.

====
2019-11-05 20:16:09,117+0530 DEBUG (jsonrpc/2) [storage.Misc.excCmd] /usr/bin/taskset --cpu-list 0-3 /usr/bin/sudo -n /sbin/iscsiadm -m node -T iqn.2003-01.org.linux-iscsi.dhcp0-4.x8664:sn.3c30e094672f -I default -p 192.168.0.10:3260,2460 --op=new (cwd None) (commands:198)

# grep tpgt /var/lib/iscsi/nodes/iqn.2003-01.org.linux-iscsi.dhcp0-4.x8664\:sn.3c30e094672f/192.168.0.10\,3260\,2460/default 
node.tpgt = 2460
=====

Now if we reboot the server, we will be having duplicate SCSI sessions.

====
# iscsiadm -m session
tcp: [1] 192.168.0.10:3260,2460 iqn.2003-01.org.linux-iscsi.dhcp0-4.x8664:sn.3c30e094672f (non-flash)
tcp: [2] 192.168.0.10:3260,2460 iqn.2003-01.org.linux-iscsi.dhcp0-4.x8664:sn.3c30e094672f (non-flash)
====

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

ovirt-ansible-hosted-engine-setup-1.0.26-1.el7ev.noarch

How reproducible:

100%

Steps to Reproduce:

1. Deploy hosted engine with an iSCSI storage with portal tpgt other than 1. targetcli allows doing this. The customer who reported this issue was using Nimble storage.

2. Reboot the server after the successful deployment and we would see duplicate iSCSI sessions.

Actual results:

Duplicate iSCSI sessions in the hosted-engine deployment host when the tpgt is not 1.

Expected results:

Pass portal while login to the iSCSI target during the hosted-engine deployment.

Additional info:

See also bug 1493914.

[1] https://github.com/oVirt/ovirt-ansible-hosted-engine-setup/blob/master/tasks/iscsi_getdevices.yml#L3

Comment 1 Simone Tiraboschi 2019-11-06 08:12:25 UTC
Please notice that for historical reason the Target Portal Group Tag (TGPT) attribute is called portal on REST API and the python SDK:
http://ovirt.github.io/ovirt-engine-sdk/master/types.m.html#ovirtsdk4.types.IscsiDetails


Then notice that ovirt_host ansible module completely lacks the portal parameter initializing IscsiDetails struct:
https://github.com/ansible/ansible/blob/devel/lib/ansible/modules/cloud/ovirt/ovirt_host.py#L596

So we need to fix that one first.

Comment 2 Sandro Bonazzola 2020-06-23 16:07:07 UTC
Re-targeting to 4.4.3 requiring a change which will land only in ansible 2.10

Comment 3 Sandro Bonazzola 2021-02-03 09:58:58 UTC
Asaf can you please check if this has been backported to ansible 2.9.17 and to ovirt-ansible-collection ?

Comment 8 Nikolai Sednev 2022-03-07 19:22:10 UTC
ovirt-hosted-engine-setup-2.6.1-1.el8ev.noarch
Moving to verified.
Works fine over iSCSI deployment.

Comment 15 errata-xmlrpc 2022-05-26 17:22:44 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 (Low: RHV RHEL Host (ovirt-host) [ovirt-4.5.0] security update), 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/RHSA-2022:4764


Note You need to log in before you can comment on or make changes to this bug.