Bug 1964302

Summary: HE deployment via cockpit fails to retrieve iSCSI target list
Product: Red Hat Enterprise Virtualization Manager Reporter: Asaf Rachmani <arachman>
Component: cockpit-ovirtAssignee: Aviv Turgeman <aturgema>
Status: CLOSED DEFERRED QA Contact: Guilherme Santos <gdeolive>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.4.6CC: budic, sbonazzo, sgratch, t38pa6+f7brnpkgyog6k
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-01-26 17:55:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: UX RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
iscsi_port_issue none

Description Asaf Rachmani 2021-05-25 07:17:54 UTC
Description of problem:
HE deployment via cockpit always uses the default iSCSI port (3260) for iSCSI discovery, even when changing it.


Version-Release number of selected component (if applicable):
cockpit-ovirt-dashboard-0.15.0-1.el8ev.noarch
rhvh-4.4.6.1-0.20210505.0+1

How reproducible:
100%

Steps to Reproduce:
1. Run hosted-engine deployment via cockpit
2. In the storage section choose iSCSI, change the port
3. Click on "Retrieve Target List"

Actual results:
Find targets in the default port

Expected results:
Find targets in the chosen port

Additional info:
Works fine from CLI.

/var/lib/ovirt-hosted-engine-setup/cockpit/ansibleVarFileYMoS4U.var:

he_filtered_tokens_vars: ['ADMIN_PASSWORD','APPLIANCE_PASSWORD','ISCSI_PASSWORD','ISCSI_DISCOVER_PASSWORD','ROOTPWD','he_appliance_password','he_admin_password','he_iscsi_password','he_iscsi_discover_password','ansible_ssh_pass']
he_filtered_tokens_re: ['BEGIN PRIVATE KEY(?P<filter>.*)END PRIVATE KEY']
he_iscsi_discover_username: null
he_iscsi_portal_addr: 192.168.155.231
he_iscsi_portal_port: 
he_fqdn: re-engine.asrachmani.com
he_host_name: ds4460505.asrachmani.com

ovirt-hosted-engine-setup iscsi discover log:

2021-05-25 06:35:20,413+0000 DEBUG var changed: host "localhost" var "he_iscsi_discover_username" type "<class 'NoneType'>" value: "null"
2021-05-25 06:35:20,413+0000 DEBUG var changed: host "localhost" var "he_iscsi_portal_addr" type "<class 'ansible.parsing.yaml.objects.AnsibleUnicode'>" value: ""192.168.155.231""
2021-05-25 06:35:20,413+0000 DEBUG var changed: host "localhost" var "he_iscsi_portal_port" type "<class 'NoneType'>" value: "null"
2021-05-25 06:35:20,413+0000 DEBUG var changed: host "localhost" var "he_fqdn" type "<class 'ansible.parsing.yaml.objects.AnsibleUnicode'>" value: ""re-engine.asrachmani.com""
2021-05-25 06:35:20,413+0000 DEBUG var changed: host "localhost" var "he_host_name" type "<class 'ansible.parsing.yaml.objects.AnsibleUnicode'>" value: ""ds4460505.asrachmani.com""

Comment 1 Asaf Rachmani 2021-05-25 07:19:41 UTC
Created attachment 1786745 [details]
iscsi_port_issue

Comment 2 Asaf Rachmani 2021-05-25 07:54:04 UTC
Right now, HE deployment uses REST API for iSCSI discovery,
When changing it to use ovirt_host ansible module (bug 1922748 and requires [1][2][3]), the deployment from cockpit-ovirt fails with the following error:

"msg": "int() argument must be a string, a bytes-like object or a number, not 'NoneType'"

[1] https://github.com/oVirt/ovirt-ansible-collection/pull/275
[2] https://gerrit.ovirt.org/#/c/ovirt-hosted-engine-setup/+/114826/
[3] https://gerrit.ovirt.org/#/c/cockpit-ovirt/+/114827/

Comment 3 Asaf Rachmani 2021-06-14 07:41:06 UTC
[1] is required anyway, please use it when fixing this bug.

[1] https://gerrit.ovirt.org/#/c/cockpit-ovirt/+/114827/

Comment 4 Asaf Rachmani 2021-10-03 11:08:39 UTC
*** Bug 2006766 has been marked as a duplicate of this bug. ***

Comment 5 Asaf Rachmani 2021-11-14 13:44:55 UTC
*** Bug 2022541 has been marked as a duplicate of this bug. ***

Comment 6 Sharon Gratch 2022-01-26 17:55:37 UTC
Installing hosted engine using the cockpit web interface is deprecated for 4.5. Since this issue works fine using the command line (as mentioned in comment 0), then we will close this bug as DEFERRED.