I have freshly installed ovirt node 4.5 from the iso download here;
https://resources.ovirt.org/pub/ovirt-4.5/iso/ovirt-node-ng-installer/4.5.0-2022052513/el8/

output from 'rpm -qa | grep ovirt' shows

ovirt-hosted-engine-setup-2.6.3-1.el8.noarch
ovirt-imageio-daemon-2.4.3-1.el8.x86_64
python38-ovirt-engine-sdk4-4.5.1-1.el8.x86_64
ovirt-imageio-common-2.4.3-1.el8.x86_64
ovirt-node-ng-image-update-placeholder-4.5.0.3-1.el8.noarch
ovirt-openvswitch-2.15-3.el8.noarch
python38-ovirt-imageio-client-2.4.3-1.el8.x86_64
ovirt-openvswitch-ipsec-2.15-3.el8.noarch
ovirt-openvswitch-ovn-common-2.15-3.el8.noarch
ovirt-openvswitch-ovn-host-2.15-3.el8.noarch
centos-release-ovirt45-8.7-1.el8s.noarch
ovirt-provider-ovn-driver-1.2.36-1.el8.noarch
ovirt-host-dependencies-4.5.0-3.el8.x86_64
ovirt-release-host-node-4.5.0.3-1.el8.x86_64
ovirt-ansible-collection-2.0.3-1.el8.noarch
ovirt-vmconsole-1.0.9-1.el8.noarch
python3-ovirt-engine-sdk4-4.5.1-1.el8.x86_64
ovirt-node-ng-nodectl-4.4.2-1.el8.noarch
ovirt-openvswitch-ovn-2.15-3.el8.noarch
ovirt-hosted-engine-ha-2.5.0-1.el8.noarch
ovirt-host-4.5.0-3.el8.x86_64
ovirt-engine-appliance-4.5-20220511122240.1.el8.x86_64
ovirt-vmconsole-host-1.0.9-1.el8.noarch
ovirt-python-openvswitch-2.15-3.el8.noarch
python38-ovirt-imageio-common-2.4.3-1.el8.x86_64
python3-ovirt-node-ng-nodectl-4.4.2-1.el8.noarch
cockpit-ovirt-dashboard-0.16.0-1.el8.noarch
python3-ovirt-setup-lib-1.3.3-1.el8.noarch
ovirt-imageio-client-2.4.3-1.el8.x86_64



During the hosted engine deployment process, I get thru Step 3 ( the "Prepare 
VM" step) successfully.
On Step 4 (Storage Settings), I set;
- Storage type = iSCSI
- Portal IP address = my ISCSI target's ip address
- Accept the default Portal port number, which is already set to 3260
- Leave username & password blank (as I have no CHAP configured on the ISCSI 
target system)

When I click the "Retrieve Target List" button there is a brief pause, followed 
by red error message which says "Retrieval of iSCSI targets failed"

Upon reviewing the files in /var/log/ovirt-hosted-engine-setup on the ovirt 
node, I find a new log file named 
ovirt-hosted-engine-setup-ansible-iscsi_discover-20220614084053-in517x.log

The message near the end of the log file are as follows;

------ snip ------
.....
2022-06-14 08:41:03,510-0600 INFO ansible task start {'status': 'OK', 
'ansible_type': 'task', 'ansible_playbook': 
'/usr/share/ovirt-hosted-engine-setup/ansible/trigger_role.yml', 
'ansible_task': 'ovirt.ovirt.hosted_engine_setup : iSCSI discover'}
2022-06-14 08:41:03,511-0600 DEBUG ansible on_any args TASK: 
ovirt.ovirt.hosted_engine_setup : iSCSI discover  kwargs is_conditional:False 
2022-06-14 08:41:03,511-0600 DEBUG ansible on_any args localhost TASK: 
ovirt.ovirt.hosted_engine_setup : iSCSI discover  kwargs 
2022-06-14 08:41:06,430-0600 DEBUG var changed: host "localhost" var 
"ansible_play_hosts" type "<class 'list'>" value: "[]"
2022-06-14 08:41:06,430-0600 DEBUG var changed: host "localhost" var 
"ansible_play_batch" type "<class 'list'>" value: "[]"
2022-06-14 08:41:06,430-0600 DEBUG var changed: host "localhost" var 
"play_hosts" type "<class 'list'>" value: "[]"
2022-06-14 08:41:06,431-0600 ERROR ansible failed {
    "ansible_host": "localhost",
    "ansible_playbook": 
"/usr/share/ovirt-hosted-engine-setup/ansible/trigger_role.yml",
    "ansible_result": {
        "_ansible_no_log": false,
        "changed": false,
        "exception": "Traceback (most recent call last):\n  File 
\"/tmp/ansible_ovirt_host_payload_ky4zlp1s/ansible_ovirt_host_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_host.py\",
 line 638, in main\nTypeError: int() argument must be a string, a bytes-like 
object or a number, not 'NoneType'\n",
        "invocation": {
            "module_args": {
                "activate": true,
                "address": null,
                "check_upgrade": true,
                "cluster": null,
                "comment": null,
                "enroll_certificate": false,
                "fetch_nested": false,
                "force": false,
                "hosted_engine": null,
                "id": null,
                "iscsi": {
                    "address": "192.168.1.2",
                    "password": "",
                    "port": null,
                    "username": ""
                },
                "kdump_integration": null,
                "kernel_params": null,
                "name": "ovirt-node01.internal.net",
                "nested_attributes": [],
                "override_display": null,
                "override_iptables": null,
                "password": null,
                "poll_interval": 3,
                "power_management_enabled": null,
                "public_key": false,
                "reboot_after_installation": null,
                "reboot_after_upgrade": true,
                "spm_priority": null,
                "ssh_port": null,
                "state": "iscsidiscover",
                "timeout": 600,
                "vgpu_placement": null,
                "wait": true
            }
        },
        "msg": "int() argument must be a string, a bytes-like object or a 
number, not 'NoneType'"
    },
    "ansible_task": "iSCSI discover",
    "ansible_type": "task",
    "status": "FAILED",
    "task_duration": 3
}
2022-06-14 08:41:06,431-0600 DEBUG ansible on_any args 
<ansible.executor.task_result.TaskResult object at 0x7f9c76744370>  kwargs 
ignore_errors:None 
2022-06-14 08:41:06,432-0600 INFO ansible stats {
    "ansible_playbook": 
"/usr/share/ovirt-hosted-engine-setup/ansible/trigger_role.yml",
    "ansible_playbook_duration": "00:11 Minutes",
    "ansible_result": "type: <class 'dict'>\nstr: {'localhost': {'ok': 5, 
'failures': 1, 'unreachable': 0, 'changed': 0, 'skipped': 0, 'rescued': 0, 
'ignored': 0}}",
    "ansible_type": "finish",
    "status": "FAILED"
}
2022-06-14 08:41:06,432-0600 INFO SUMMARY:
Duration        Task Name
--------        --------
[ < 1 sec ]     Execute just a specific set of steps
[  00:01  ]     Force facts gathering
[  00:03  ]     Obtain SSO token using username/password credentials
[  00:03  ]     Fetch host facts
[ FAILED  ]     iSCSI discover
2022-06-14 08:41:06,432-0600 DEBUG ansible on_any args 
<ansible.executor.stats.AggregateStats object at 0x7f9c793444c0>  kwargs 

------ snip ------


The error suggest that the iSCSI portal port number (which is defaulted to 3260 
in the UI) is not being properly passed into the python module 
ovirt/ovirt/plugins/modules/ovirt_host.py

Looking at the code at line 638 of ovirt_host.py, found here;
https://github.com/oVirt/ovirt-ansible-collection/blob/2.0.3-1/plugins/modules/ovirt_host.py

I see;

        .....
        elif state == 'iscsidiscover':
            host_id = get_id_by_name(hosts_service, module.params['name'])
            iscsi_param = module.params['iscsi']
            iscsi_targets = hosts_service.service(host_id).discover_iscsi(
                iscsi=otypes.IscsiDetails(
                    port=int(iscsi_param.get('port', 3260)),           <---- 
line 638
                    username=iscsi_param.get('username'),
                    password=iscsi_param.get('password'),
                    address=iscsi_param.get('address'),
                    portal=iscsi_param.get('portal'),
                ),
            )
            ret = {
                'changed': False,
                'id': host_id,
                'iscsi_targets': [iscsi.target for iscsi in iscsi_targets],
                'iscsi_targets_struct': [get_dict_of_struct(
                    struct=iscsi,
                    connection=connection,
                    fetch_nested=module.params.get('fetch_nested'),
                    attributes=module.params.get('nested_attributes'),
                ) for iscsi in iscsi_targets],
            }
        .....

I'm not a Python expert, so I can't tell if this logic is correct or not.

Looking at Git history on this code, it looks like the last time a change was 
made effecting ISCSI was in May of 2021;
https://github.com/oVirt/ovirt-ansible-collection/commit/1c4c18d844a69b821fba4f9d3d6561d088d726b3
By Martin Necas - https://github.com/mnecas

I gotta believe I'm not the first one to try setting up oVirt 4.5 hosted engine 
with ISCSI storage.
Is anyone else out there using ISCSI storage with oVirt 4.5.0.3 yet?
How did you get it working?
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/6XEJ3ECYDEVNQIBLK35VKSBBZIO47SLJ/

Reply via email to