Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1541029

Summary: [cockpit][vintage otopi][iscsi] iSCSI discovery systematically fails
Product: [oVirt] cockpit-ovirt Reporter: Simone Tiraboschi <stirabos>
Component: Hosted EngineAssignee: Phillip Bailey <phbailey>
Status: CLOSED DUPLICATE QA Contact: Yihui Zhao <yzhao>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 0.11.7CC: bugs, cshao, dguo, huzhao, qiyuan, rbarry, sbonazzo, yaniwang, ycui, yisong, yzhao
Target Milestone: ovirt-4.2.1Keywords: Regression
Target Release: ---Flags: rule-engine: ovirt-4.2?
ykaul: blocker+
cshao: testing_ack?
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cockpit-ovirt-0.11.8-0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-02 10:14:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Integration RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1529226    
Attachments:
Description Flags
iSCSI discovery in cockpit vintage flow none

Description Simone Tiraboschi 2018-02-01 14:51:28 UTC
Created attachment 1389541 [details]
iSCSI discovery in cockpit vintage flow

Description of problem:
iSCSI discovery from cockpit calling the vintage otopi flow systematically fails as for the attached screenshot.

Version-Release number of selected component (if applicable):
cockpit-ovirt-dashboard.noarch                0.11.7-0.1.el7.centos

How reproducible:
2 on 2 on my env

Steps to Reproduce:
1. try to deploy hosted-engine from cockpit with vintage otopi flow on iSCSI
2.
3.

Actual results:
iSCSI discovery fails and the deployment cannot continue

Expected results:
it's able to discovery iSCSI targets and luns (also with multipath) and successfully deploy HE

Additional info:
See the attached screenshot

Comment 1 Simone Tiraboschi 2018-02-01 14:56:19 UTC
I also tried emptying all the fields to fallback on otopi code but it refuses to continue.

Comment 2 Simone Tiraboschi 2018-02-01 15:14:13 UTC
Simply entering the portal address without touching retrieve target list button seams to let you move to the next step.

Comment 3 Phillip Bailey 2018-02-01 15:17:20 UTC
The target retrieval button shouldn't be displayed in the OTOPI flow. The patch I just uploaded will hide it. As Simone pointed out in comment 2, this issue can be bypassed in the meantime by entering the portal IP address and clicking "Next".

Comment 4 Simone Tiraboschi 2018-02-01 15:22:56 UTC
but after that hosted-engine-setup fails on otopi side with:

2018-02-01 15:20:08,447+0100 DEBUG otopi.plugins.gr_he_setup.storage.blockd blockd._iscsi_discovery:392 found: {u'iqn.2017-10.com.redhat.stirabos:he': {u'1': [{'ip': u'192.168.1.125', 'port': u'3260'}, {'ip': u'192.168.2.125', 'port': u'3260'}, {'ip': u'192.168.3.125', 'port': u'3260'}]}, u'iqn.2017-10.com.redhat.stirabos:data': {u'1': [{'ip': u'192.168.1.125', 'port': u'3260'}, {'ip': u'192.168.2.125', 'port': u'3260'}, {'ip': u'192.168.3.125', 'port': u'3260'}]}}
2018-02-01 15:20:08,447+0100 DEBUG otopi.plugins.gr_he_setup.storage.blockd blockd._customization:696 target: , tpgt: 1
2018-02-01 15:20:08,447+0100 DEBUG otopi.context context._executeMethod:143 method exception
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/otopi/context.py", line 133, in _executeMethod
    method['method']()
  File "/usr/share/ovirt-hosted-engine-setup/scripts/../plugins/gr-he-setup/storage/blockd.py", line 699, in _customization
    ip_port_list = valid_targets_dict[target][tpgt]
KeyError: ''

Comment 5 Simone Tiraboschi 2018-02-01 15:26:03 UTC
The issue seams here on empty target: 2018-02-01 15:20:08,447+0100 DEBUG otopi.plugins.gr_he_setup.storage.blockd blockd._customization:696 target: , tpgt: 1

Comment 6 Simone Tiraboschi 2018-02-01 15:32:38 UTC
The issue seams here:

otopi code is checking for target is None to eventually run a new discovery and customization process
https://github.com/oVirt/ovirt-hosted-engine-setup/blob/master/src/plugins/gr-he-setup/storage/blockd.py#L192

but cockpit is passing an empty string:

2018-02-01 15:20:08,472+0100 DEBUG otopi.context context.dumpEnvironment:833 ENV OVEHOSTED_STORAGE/iSCSIPortalIPAddress=str:'192.168.1.125'
2018-02-01 15:20:08,472+0100 DEBUG otopi.context context.dumpEnvironment:833 ENV OVEHOSTED_STORAGE/iSCSIPortalPassword=str:''
2018-02-01 15:20:08,472+0100 DEBUG otopi.context context.dumpEnvironment:833 ENV OVEHOSTED_STORAGE/iSCSIPortalPort=str:'3260'
2018-02-01 15:20:08,472+0100 DEBUG otopi.context context.dumpEnvironment:833 ENV OVEHOSTED_STORAGE/iSCSIPortalUser=str:''
2018-02-01 15:20:08,472+0100 DEBUG otopi.context context.dumpEnvironment:833 ENV OVEHOSTED_STORAGE/iSCSITargetName=str:''

And so it fails

Comment 7 Yihui Zhao 2018-02-02 10:07:26 UTC
*** Bug 1539598 has been marked as a duplicate of this bug. ***

Comment 8 Yihui Zhao 2018-02-02 10:14:40 UTC

*** This bug has been marked as a duplicate of bug 1539598 ***