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
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.
Re-targeting to 4.4.3 requiring a change which will land only in ansible 2.10
Asaf can you please check if this has been backported to ansible 2.9.17 and to ovirt-ansible-collection ?
ovirt-hosted-engine-setup-2.6.1-1.el8ev.noarch Moving to verified. Works fine over iSCSI deployment.
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