Running oVirt 4.4.

While setting up ovirt with ansible, I noticed that there is no parameter for setting the ssh port of the hosts (which is present if one adds an host on the GUI).

I tried adding the port as a part of the address, but that field is apparently evaluated as FQDN only.

I did circumvent this by adding FQDN-labeled sections with Port-definition ~/.ssh/config for ovirt-user on the engine-machine (not hosted), but this only got me a step further since the configuration in the engine still is without a port definition and falls back to 22 as a result.

Running the ansible playbook with -vvv I can see the following:

Using module file /usr/lib/python3.6/site-packages/ansible/modules/cloud/ovirt/ovirt_host.py <127.0.0.1> PUT /root/.ansible/tmp/ansible-local-3041af74sxb1/tmpjlyq4ic8 TO /root/.ansible/tmp/ansible-tmp-1592049378.2474232-3179-247712281303744/AnsiballZ_ovirt_host.py <127.0.0.1> EXEC /bin/sh -c 'chmod u+x /root/.ansible/tmp/ansible-tmp-1592049378.2474232-3179-247712281303744/ /root/.ansible/tmp/ansible-tmp-1592049378.2474232-3179-247712281303744/AnsiballZ_ovirt_host.py && sleep 0' <127.0.0.1> EXEC /bin/sh -c '/usr/bin/python3.6 /root/.ansible/tmp/ansible-tmp-1592049378.2474232-3179-247712281303744/AnsiballZ_ovirt_host.py && sleep 0' <127.0.0.1> EXEC /bin/sh -c 'rm -f -r /root/.ansible/tmp/ansible-tmp-1592049378.2474232-3179-247712281303744/ > /dev/null 2>&1 && sleep 0'
The full traceback is:
Traceback (most recent call last):
File "/tmp/ansible_ovirt_host_payload_zeyzwhlj/ansible_ovirt_host_payload.zip/ansible/modules/cloud/ovirt/ovirt_host.py", line 639, in main File "/tmp/ansible_ovirt_host_payload_zeyzwhlj/ansible_ovirt_host_payload.zip/ansible/module_utils/ovirt.py", line 785, in action
    poll_interval=self._module.params['poll_interval'],
File "/tmp/ansible_ovirt_host_payload_zeyzwhlj/ansible_ovirt_host_payload.zip/ansible/module_utils/ovirt.py", line 359, in wait
    raise Exception("Error while waiting on result state of the entity.")
Exception: Error while waiting on result state of the entity.
failed: [localhost] (item=myHost) => {
    "ansible_loop_var": "item",
    "changed": false,
    "invocation": {
        "module_args": {
            "activate": true,
            "address": null,
            "check_upgrade": true,
            "cluster": null,
            "comment": null,
            "fetch_nested": false,
            "force": false,
            "hosted_engine": null,
            "id": null,
            "iscsi": null,
            "kdump_integration": null,
            "kernel_params": null,
            "name": "myHost",
            "nested_attributes": [],
            "override_display": null,
            "override_iptables": null,
            "password": null,
            "poll_interval": 3,
            "power_management_enabled": null,
            "public_key": true,
            "reboot_after_upgrade": true,
            "spm_priority": null,
            "state": "reinstalled",
            "timeout": 600,
            "vgpu_placement": null,
            "wait": true
        }
    },
    "item": {
        "address": "myHost.myDomain",
        "affinity_labels": [],
        "auto_numa_status": "unknown",
        "certificate": {
            "organization": "myDomain",
            "subject": "O=myDomain,CN=myHost.myDomain"
        },
        "cluster": {
"href": "/ovirt-engine/api/clusters/3642e08b-1311-4f8a-803b-897321513b0b",
            "id": "3642e08b-1311-4f8a-803b-897321513b0b"
        },
        "comment": "",
        "cpu": {
            "speed": 0.0,
            "topology": {}
        },
        "device_passthrough": {
            "enabled": false
        },
        "devices": [],
        "external_network_provider_configurations": [],
        "external_status": "ok",
        "hardware_information": {
            "supported_rng_sources": []
        },
        "hooks": [],
"href": "/ovirt-engine/api/hosts/22623d77-069e-4feb-86db-03b08bc67c1a",
        "id": "22623d77-069e-4feb-86db-03b08bc67c1a",
        "katello_errata": [],
        "kdump_status": "unknown",
        "ksm": {
            "enabled": false
        },
        "max_scheduling_memory": 0,
        "memory": 0,
        "name": "myHost",
        "network_attachments": [],
        "nics": [],
        "numa_nodes": [],
        "numa_supported": false,
        "os": {
            "custom_kernel_cmdline": ""
        },
        "permissions": [],
        "port": 54321,
        "power_management": {
            "automatic_pm_enabled": true,
            "enabled": false,
            "kdump_detection": true,
            "pm_proxies": []
        },
        "protocol": "stomp",
        "se_linux": {},
        "spm": {
            "priority": 5,
            "status": "none"
        },
        "ssh": {
            "fingerprint": "SHA256:abc...",
            "port": 22
        },
        "statistics": [],
        "status": "install_failed",
        "storage_connection_extensions": [],
        "summary": {
            "total": 0
        },
        "tags": [],
        "transparent_huge_pages": {
            "enabled": false
        },
        "type": "rhel",
        "unmanaged_networks": [],
        "update_available": false,
        "vgpu_placement": "consolidated"
    },
    "msg": "Error while waiting on result state of the entity."
}

The ssh-key containing the fingerprint still has the port set as 22.

Any chance of getting the port added to the ansible ovirt.hosts module?

With regards,

Poltsi
_______________________________________________
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/BPF4PRKPMIOXCRHBHRQFYRUOMFS4LEVU/

Reply via email to