Bug 1922748 - [RFE] Use Ansible module instead of REST API
Summary: [RFE] Use Ansible module instead of REST API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-ansible-collection
Classification: oVirt
Component: hosted-engine-setup
Version: 1.2.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.4.7
: ---
Assignee: Asaf Rachmani
QA Contact: Nikolai Sednev
URL:
Whiteboard:
Depends On: 1926819
Blocks: 1768969
TreeView+ depends on / blocked
 
Reported: 2021-01-31 09:25 UTC by Asaf Rachmani
Modified: 2021-07-06 07:28 UTC (History)
2 users (show)

Fixed In Version: ovirt-hosted-engine-setup-2.5.1-1.el8ev
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-07-06 07:28:19 UTC
oVirt Team: Integration
Embargoed:
sbonazzo: ovirt-4.4?
pm-rhel: planning_ack?
sbonazzo: devel_ack+
pm-rhel: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github oVirt ovirt-ansible-collection pull 275 0 None open role: hosted_engine_setup: Use ovirt_host module 2021-05-18 10:36:38 UTC
Github oVirt ovirt-ansible-collection pull 281 0 None open roles: hosted_engine_setup: Remove leftover code and omit parameters 2021-05-31 09:07:50 UTC
oVirt gerrit 114826 0 master MERGED plugins: storage: Change otopi_iscsi_targets variable structure 2021-05-27 14:14:36 UTC
oVirt gerrit 114827 0 master ABANDONED storage: Change otopi_iscsi_targets variable structure 2022-01-12 07:58:28 UTC

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.


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