Bug 1922748

Summary: [RFE] Use Ansible module instead of REST API
Product: [oVirt] ovirt-ansible-collection Reporter: Asaf Rachmani <arachman>
Component: hosted-engine-setupAssignee: Asaf Rachmani <arachman>
Status: CLOSED CURRENTRELEASE QA Contact: Nikolai Sednev <nsednev>
Severity: medium Docs Contact:
Priority: medium    
Version: 1.2.2CC: bugs, nsednev
Target Milestone: ovirt-4.4.7Keywords: FutureFeature, Triaged
Target Release: ---Flags: sbonazzo: ovirt-4.4?
pm-rhel: planning_ack?
sbonazzo: devel_ack+
pm-rhel: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-hosted-engine-setup-2.5.1-1.el8ev Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-07-06 07:28:19 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: 1926819    
Bug Blocks: 1768969    

Description Asaf Rachmani 2021-01-31 09:25:25 UTC
Task "iSCSI discover with REST API" in HE ansible role uses REST API.
We need to replace it and use "ovirt_system_option_info" module.

Comment 1 Asaf Rachmani 2021-02-01 08:47:20 UTC
I opened https://github.com/oVirt/ovirt-ansible-collection/issues/213 as "ovirt_system_option_info" module doesn't provide information about iSCSI targets.

Comment 2 Asaf Rachmani 2021-06-09 08:31:45 UTC
Doesn't work using cockpit due to bug 1964302, can be verified using 'hosted-engine --deploy' instead.

Comment 3 Nikolai Sednev 2021-06-24 13:57:31 UTC
Forth to our discussion with Asaf, regular manual iSCSI deployment of HE is sufficient for the verification.
I ran the deployment using these components on hosts:
ovirt-hosted-engine-ha-2.4.7-1.el8ev.noarch
ovirt-hosted-engine-setup-2.5.1-1.el8ev.noarch
ovirt-ansible-collection-1.5.1-1.el8ev.noarch
ansible-2.9.21-1.el8ae.noarch
Linux 4.18.0-305.7.1.el8_4.x86_64 #1 SMP Mon Jun 14 17:25:42 EDT 2021 x86_64 x86_64 x86_64 GNU/Linux
Red Hat Enterprise Linux release 8.4 (Ootpa)

Deployment was successful ans iSCSI discovery worked fine:
[ INFO  ] skipping: [localhost]
          Please specify the storage you would like to use (glusterfs, iscsi, fc, nfs)[nfs]: iscsi
          Please specify the iSCSI portal IP address: 10.35.162.66
          Please specify the iSCSI portal port [3260]: 
          Please specify the iSCSI discover user: 
          Please specify the iSCSI discover password: 
          Please specify the iSCSI portal login user: 
          Please specify the iSCSI portal login password: 
[ INFO  ] Discovering iSCSI targets
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Execute just a specific set of steps]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Force facts gathering]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Obtain SSO token using username/password credentials]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Fetch host facts]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : iSCSI discover]
[ INFO  ] ok: [localhost]
          The following targets have been found:
                [1]     iqn.2009-01.com.kaminario:storage.k2.22612
                        TPGT: 1, portals:
                                a.b.c.d:3260
                                a.b.c.e:3260
         
          Please select a target (1) [1]: 
[ INFO  ] Getting iSCSI LUNs list
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Execute just a specific set of steps]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Force facts gathering]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Obtain SSO token using username/password credentials]
[ INFO  ] ok: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : iSCSI login]
[ INFO  ] changed: [localhost]
[ INFO  ] TASK [ovirt.ovirt.hosted_engine_setup : Get iSCSI LUNs]
[ INFO  ] ok: [localhost]
          The following luns have been found on the requested target:
                [1]     20024f40058540000       0.0GiB  KMNRIO  K2
                        status: used, paths: 2 active
         
                [2]     20024f40058540005       115.0GiB        KMNRIO  K2
                        status: free, paths: 2 active
         
          Please select the destination LUN (1, 2) [1]: 2
[ INFO  ] iSCSI discard after delete is enabled
[ INFO  ] Creating Storage Domain
.
.
[ INFO  ] Hosted Engine successfully deployed

Moving to verified.

Comment 4 Sandro Bonazzola 2021-07-06 07:28:19 UTC
This bugzilla is included in oVirt 4.4.7 release, published on July 6th 2021.

Since the problem described in this bug report should be resolved in oVirt 4.4.7 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.