The following lines will fail if elasticsearch_host or fluentd_elasticsearch_host are undefined:
elasticsearch_host == None or elasticsearch_host is undefinedfluentd_elasticsearch_host == None or fluentd_elasticsearch_host is undefinedwhen: (fluentd_elasticsearch_host == "elasticsearch-server.example.com") or (fluentd_elasticsearch_host is undefined)
(Comparing undefined to anything will fail, even if is undefined appears later in the logic)
Affected version
Describe the bug
If
elasticsearch_host
orfluentd_elasticsearch_host
are undefined,hosted-engine --deploy
will fail (timeout waiting for the engine to add the host).The tasks file is located here on the engine vm:
/usr/share/ansible/roles/oVirt.metrics/roles/ovirt_initial_validations/tasks/check_logging_collectors.yml
The following lines will fail if
elasticsearch_host
orfluentd_elasticsearch_host
are undefined:elasticsearch_host == None or elasticsearch_host is undefined
fluentd_elasticsearch_host == None or fluentd_elasticsearch_host is undefined
when: (fluentd_elasticsearch_host == "elasticsearch-server.example.com") or (fluentd_elasticsearch_host is undefined)
(Comparing
undefined
to anything will fail, even ifis undefined
appears later in the logic)Possible solution:
elasticsearch_host | default(None) == None
fluentd_elasticsearch_host | default(None) == None
when: (fluentd_elasticsearch_host | default == "elasticsearch-server.example.com")
In the last case, I'm not sure what it's purpose is since it's a hard-coded example... is the role generated dynamically?
To reproduce
hosted-engine --deploy --4
Install
pip3.11
and thennetaddr
on the engine VM immediately after the Python 3.11 is installed (per #867)Expected behavior
The engine should not fail while adding its host.
Additional context
For anyone looking for a quick fix:
elasticsearch_host
andfluentd_elasticsearch_host
toNone
in defaults: