Re: Issue deploying self hosted engine on new install

Yes, I have had the same and posted about it here somewhere: I believe it's an incompatible Ansible change. Here is the critical part if the message below: "The 'ovirt_host_facts' module has been renamed to 'ovirt_host_info', and the renamed one no longer returns ansible_facts" and that change was made in the transition of Ansible 2.8* to 2.9, from what I gathered. I guess I should just make it a bug report if you find the same message in your logs. [ ERROR ] fatal: [localhost]: FAILED! => {"ansible_facts": {"ovirt_hosts": [{"address": "xdrd1022s.priv.atos.fr", "affinity_labels": [], "auto_numa_status": "unknown", "certificate": {"organization": "priv.atos.fr", "subject": "O=priv.atos.fr,CN=xdrd1022s.priv.atos.fr"}, "cluster": {"href": "/ovirt-engine/api/clusters/c407e776-1c3c-11ea-aeed-00163e56112a", "id": "c407e776-1c3c-11ea-aeed-00163e56112a"}, "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/a5bb73a1-f923-4568-8dda-434e07f7e243", "id": "a5bb73a1-f923-4568-8dda-434e07f7e243", "katello_errata": [], "kdump_status": "unknown", "ksm": {"enabled": false}, "max_scheduling_memory": 0, "memory": 0, "name": "xdrd1022s.priv.atos.fr", "network_attachments": [], "nics": [], "numa_nodes": [], "numa_supporte d": 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:wqpBWq9Kb9+Nb3Jwtw61QJzo+R4gGOP2dLubssU5EPs", "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"}]}, "attempts": 120, "changed": false, "deprecations": [{"msg": "The 'ovirt_host_facts' module has been renamed to 'ovirt_host_info', and the renamed one no longer returns ansible_facts", "version": "2.13"}]}

This is the reference https://lists.ovirt.org/archives/list/users@ovirt.org/thread/YWAPIHYM7RMJIWF...

On Wed, Dec 11, 2019 at 8:19 PM <thomas@hoberg.net> wrote:
Yes, I have had the same and posted about it here somewhere: I believe it's an incompatible Ansible change.
Here is the critical part if the message below: "The 'ovirt_host_facts' module has been renamed to 'ovirt_host_info', and the renamed one no longer returns ansible_facts"
and that change was made in the transition of Ansible 2.8* to 2.9, from what I gathered.
I guess I should just make it a bug report if you find the same message in your logs.
[ ERROR ] fatal: [localhost]: FAILED! => {"ansible_facts": {"ovirt_hosts": [{"address": "xdrd1022s.priv.atos.fr", "affinity_labels": [], "auto_numa_status": "unknown", "certificate": {"organization": "priv.atos.fr", "subject": "O=priv.atos.fr,CN=xdrd1022s.priv.atos.fr"}, "cluster": {"href": "/ovirt-engine/api/clusters/c407e776-1c3c-11ea-aeed-00163e56112a", "id": "c407e776-1c3c-11ea-aeed-00163e56112a"}, "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/a5bb73a1-f923-4568-8dda-434e07f7e243", "id": "a5bb73a1-f923-4568-8dda-434e07f7e243", "katello_errata": [], "kdump_status": "unknown", "ksm": {"enabled": false}, "max_scheduling_memory": 0, "memory": 0, "name": "xdrd1022s.priv.atos.fr", "network_attachments": [], "nics": [], "numa_nodes": [], "numa_supporte d": 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:wqpBWq9Kb9+Nb3Jwtw61QJzo+R4gGOP2dLubssU5EPs", "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"}]}, "attempts": 120, "changed": false, "deprecations": [{"msg": "The 'ovirt_host_facts' module has been renamed to 'ovirt_host_info', and the renamed one no longer returns ansible_facts", "version": "2.13"}]}
This error does make sense, and indeed in ovirt-ansible-hosted-engine-setup we use ovirt_host_facts and ansible_facts: https://github.com/oVirt/ovirt-ansible-hosted-engine-setup/blob/master/tasks... But: I failed to reproduce it myself. I have CentOS 8, and, from master nightly snapshot: ovirt-ansible-hosted-engine-setup-1.0.35-0.1.master.20191129201201.el8.noarch ansible-2.9.2-1.el8.noarch And in ovirt-hosted-engine-setup-ansible-bootstrap_local_vm-201911111303-otxt1f.log I did get: 2019-12-11 13:15:45,061+0200 DEBUG var changed: host "localhost" var "host_result_up_check" type "<class 'dict'>" value: "{ "ansible_facts": { "ovirt_hosts": [ ... I wonder how it worked for me. Would you like to open a bug, anyway? And attached versions of relevant packages and relevant logs? Thanks! Best regards, -- Didi

Hi, I have encountered the same error that results in the failure of hosted engine deployment. I have tried to replace "ovirt_host_facts" by "ovirt_host_info" in /usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/05_add_host.yml however it did not help with the following error message: 2019-12-31 11:23:27,595+0900 INFO otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils._process_output:109 TASK [ovirt.hosted_engine_setup : Wait for the host to be up] 2019-12-31 11:23:28,997+0900 DEBUG otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils._process_output:103 {u'msg': u"The conditional check 'host_result_up_check is succeeded and host_result_up_check.ansible_facts.ovirt_hosts|length >= 1 and ( host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'up' or host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'non_operational' )' failed. The error was: error while evaluating conditional (host_result_up_check is succeeded and host_result_up_check.ansible_facts.ovirt_hosts|length >= 1 and ( host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'up' or host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'non_operational' )): 'dict object' has no attribute 'ansible_facts'", u'_ansible_no_log': False} 2019-12-31 11:23:29,098+0900 ERROR otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils._process_output:107 fatal: [localhost]: FAILED! => {"msg": "The conditional check 'host_result_up_check is succeeded and host_result_up_check.ansible_facts.ovirt_hosts|length >= 1 and ( host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'up' or host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'non_operational' )' failed. The error was: error while evaluating conditional (host_result_up_check is succeeded and host_result_up_check.ansible_facts.ovirt_hosts|length >= 1 and ( host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'up' or host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'non_operational' )): 'dict object' has no attribute 'ansible_facts'"} According to the latest doc of Ansible (2.9) regarding "ovirt_host_facts", it is deprecated and one should use "ovirt_host_info" instead as you can refer here: https://docs.ansible.com/ansible/latest/modules/ovirt_host_facts_module.html And one of the requirements to use "ovirt_host_info" is "ovirt-engine-sdk-python >= 4.3.0" however in my installation, the installed package is "python-ovirt-engine-sdk4 (4.3.2-2.el7)" instead of "ovirt-engine-sdk-python". The "ovirt-engine-sdk-python" package is available however the version is 3.6.9.1-1.el7. I have been trying to install the latest oVirt (based in 4.3 repository) and hyperconverged mode using 3 nodes. Tried already with cockpit installation and now debugging it by using CLI installation. Is this a bug or is there already a fix? Best regards, Sang-Un

Hi, On Tue, Dec 31, 2019 at 6:38 AM <realapyo@gmail.com> wrote:
Hi,
I have encountered the same error that results in the failure of hosted engine deployment. I have tried to replace "ovirt_host_facts" by "ovirt_host_info" in /usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/05_add_host.yml however it did not help with the following error message:
2019-12-31 11:23:27,595+0900 INFO otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils._process_output:109 TASK [ovirt.hosted_engine_setup : Wait for the host to be up] 2019-12-31 11:23:28,997+0900 DEBUG otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils._process_output:103 {u'msg': u"The conditional check 'host_result_up_check is succeeded and host_result_up_check.ansible_facts.ovirt_hosts|length >= 1 and ( host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'up' or host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'non_operational' )' failed. The error was: error while evaluating conditional (host_result_up_check is succeeded and host_result_up_check.ansible_facts.ovirt_hosts|length >= 1 and ( host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'up' or host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'non_operational' )): 'dict object' has no attribute 'ansible_facts'", u'_ansible_no_log': False} 2019-12-31 11:23:29,098+0900 ERROR otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils._process_output:107 fatal: [localhost]: FAILED! => {"msg": "The conditional check 'host_result_up_check is succeeded and host_result_up_check.ansible_facts.ovirt_hosts|length >= 1 and ( host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'up' or host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'non_operational' )' failed. The error was: error while evaluating conditional (host_result_up_check is succeeded and host_result_up_check.ansible_facts.ovirt_hosts|length >= 1 and ( host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'up' or host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'non_operational' )): 'dict object' has no attribute 'ansible_facts'"}
According to the latest doc of Ansible (2.9) regarding "ovirt_host_facts", it is deprecated and one should use "ovirt_host_info" instead as you can refer here: https://docs.ansible.com/ansible/latest/modules/ovirt_host_facts_module.html
As I said previously in this thread, this is indeed a bug. Please open one, and attach all relevant logs, versions of packages, repos used to install them, etc. Thanks! That said, it did not happen for me, for some reason. I got e.g. this, in bootstrap_local_vm log: 2019-12-22 10:31:29,411+0200 DEBUG var changed: host "localhost" var "host_result_up_check" type "<class 'dict'>" value: "{ "ansible_facts": { "ovirt_hosts": [ ... "deprecations": [ { "msg": "The 'ovirt_host_facts' module has been renamed to 'ovirt_host_info', and the renamed one no longer returns ansible_facts", "version": "2.13" } ], "failed": false }" I also see the same for latest nightly 4.3 CI test: https://jenkins.ovirt.org/job/ovirt-system-tests_he-basic-suite-4.3/301/ https://jenkins.ovirt.org/job/ovirt-system-tests_he-basic-suite-4.3/301/arti...
And one of the requirements to use "ovirt_host_info" is "ovirt-engine-sdk-python >= 4.3.0" however in my installation, the installed package is "python-ovirt-engine-sdk4 (4.3.2-2.el7)" instead of "ovirt-engine-sdk-python". The "ovirt-engine-sdk-python" package is available however the version is 3.6.9.1-1.el7.
This should be ok.
I have been trying to install the latest oVirt (based in 4.3 repository) and hyperconverged mode using 3 nodes. Tried already with cockpit installation and now debugging it by using CLI installation.
Is this a bug or is there already a fix?
I am not aware of a fix yet. One should probably not be that hard to prepare, but I need to first reproduce. I wonder if your (and others') problem is elsewhere. Best regards, -- Didi

Hi Didi, I have just posted a bug report on the misleading ansible error message: https://bugzilla.redhat.com/show_bug.cgi?id=1787267 <https://bugzilla.redhat.com/show_bug.cgi?id=1787267> Please have a look and make any comments if my posting is inappropriate. Best regards, Sang-Un
On Dec 31, 2019, at 16:33, Yedidyah Bar David <didi@redhat.com> wrote:
Hi,
On Tue, Dec 31, 2019 at 6:38 AM <realapyo@gmail.com <mailto:realapyo@gmail.com>> wrote:
Hi,
I have encountered the same error that results in the failure of hosted engine deployment. I have tried to replace "ovirt_host_facts" by "ovirt_host_info" in /usr/share/ansible/roles/ovirt.hosted_engine_setup/tasks/bootstrap_local_vm/05_add_host.yml however it did not help with the following error message:
2019-12-31 11:23:27,595+0900 INFO otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils._process_output:109 TASK [ovirt.hosted_engine_setup : Wait for the host to be up] 2019-12-31 11:23:28,997+0900 DEBUG otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils._process_output:103 {u'msg': u"The conditional check 'host_result_up_check is succeeded and host_result_up_check.ansible_facts.ovirt_hosts|length >= 1 and ( host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'up' or host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'non_operational' )' failed. The error was: error while evaluating conditional (host_result_up_check is succeeded and host_result_up_check.ansible_facts.ovirt_hosts|length >= 1 and ( host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'up' or host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'non_operational' )): 'dict object' has no attribute 'ansible_facts'", u'_ansible_no_log': False} 2019-12-31 11:23:29,098+0900 ERROR otopi.ovirt_hosted_engine_setup.ansible_utils ansible_utils._process_output:107 fatal: [localhost]: FAILED! => {"msg": "The conditional check 'host_result_up_check is succeeded and host_result_up_check.ansible_facts.ovirt_hosts|length >= 1 and ( host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'up' or host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'non_operational' )' failed. The error was: error while evaluating conditional (host_result_up_check is succeeded and host_result_up_check.ansible_facts.ovirt_hosts|length >= 1 and ( host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'up' or host_result_up_check.ansible_facts.ovirt_hosts[0].status == 'non_operational' )): 'dict object' has no attribute 'ansible_facts'"}
According to the latest doc of Ansible (2.9) regarding "ovirt_host_facts", it is deprecated and one should use "ovirt_host_info" instead as you can refer here: https://docs.ansible.com/ansible/latest/modules/ovirt_host_facts_module.html
As I said previously in this thread, this is indeed a bug. Please open one, and attach all relevant logs, versions of packages, repos used to install them, etc. Thanks!
That said, it did not happen for me, for some reason. I got e.g. this, in bootstrap_local_vm log:
2019-12-22 10:31:29,411+0200 DEBUG var changed: host "localhost" var "host_result_up_check" type "<class 'dict'>" value: "{ "ansible_facts": { "ovirt_hosts": [ ... "deprecations": [ { "msg": "The 'ovirt_host_facts' module has been renamed to 'ovirt_host_info', and the renamed one no longer returns ansible_facts", "version": "2.13" } ], "failed": false }"
I also see the same for latest nightly 4.3 CI test:
https://jenkins.ovirt.org/job/ovirt-system-tests_he-basic-suite-4.3/301/ <https://jenkins.ovirt.org/job/ovirt-system-tests_he-basic-suite-4.3/301/>
https://jenkins.ovirt.org/job/ovirt-system-tests_he-basic-suite-4.3/301/arti... <https://jenkins.ovirt.org/job/ovirt-system-tests_he-basic-suite-4.3/301/artifact/exported-artifacts/test_logs/he-basic-suite-4.3/post-012_local_maintenance_sdk.py/lago-he-basic-suite-4-3-host-0/_var_log/ovirt-hosted-engine-setup/ovirt-hosted-engine-setup-ansible-bootstrap_local_vm-20191230212741-a7v9pn.log>
And one of the requirements to use "ovirt_host_info" is "ovirt-engine-sdk-python >= 4.3.0" however in my installation, the installed package is "python-ovirt-engine-sdk4 (4.3.2-2.el7)" instead of "ovirt-engine-sdk-python". The "ovirt-engine-sdk-python" package is available however the version is 3.6.9.1-1.el7.
This should be ok.
I have been trying to install the latest oVirt (based in 4.3 repository) and hyperconverged mode using 3 nodes. Tried already with cockpit installation and now debugging it by using CLI installation.
Is this a bug or is there already a fix?
I am not aware of a fix yet. One should probably not be that hard to prepare, but I need to first reproduce. I wonder if your (and others') problem is elsewhere.
Best regards, -- Didi
participants (4)
-
realapyo@gmail.com
-
Sang Un Ahn
-
thomas@hoberg.net
-
Yedidyah Bar David