This is a mirror of a question I posted on serverfault.
I’m trying to setup ovirt 4.2 on a CentOS 7.5 server. I’m using the command line tool “hosted-engine” (hosted-engine --deploy) because cockpit gave me some errors with no explanation, so I thought the command line might be more verbose (and it is).
The deployment fails with the following errors:
[ INFO ] TASK [Check engine VM health]
[ ERROR ] fatal: [localhost]: FAILED! => {"attempts": 120, "changed": true, "cmd": ["hosted-engine", "--vm-status", "--json"], "delta": "0:00:00.257393", "end": "2018-09-28 16:52:49.528332", "rc": 0, "start": "2018-09-28 16:52:49.270939", "stderr": "", "stderr_lines": [], "stdout": "{\"1\": {\"conf_on_shared_storage\": true, \"live-data\": true, \"extra\": \"metadata_parse_version=1\\nmetadata_feature_version=1\\ntimestamp=7728 (Fri Sep 28 16:52:47 2018)\\nhost-id=1\\nscore=3400\\nvm_conf_refresh_time=7728 (Fri Sep 28 16:52:47 2018)\\nconf_on_shared_storage=True\\nmaintenance=False\\nstate=EngineStarting\\nstopped=False\\n\", \"hostname\": \"Odin\", \"host-id\": 1, \"engine-status\": {\"reason\": \"failed liveliness check\", \"health\": \"bad\", \"vm\": \"up\", \"detail\": \"Up\"}, \"score\": 3400, \"stopped\": false, \"maintenance\": false, \"crc32\": \"69876c6c\", \"local_conf_timestamp\": 7728, \"host-ts\": 7728}, \"global_maintenance\": false}", "stdout_lines": ["{\"1\": {\"conf_on_shared_storage\": true, \"live-data\": true, \"extra\": \"metadata_parse_version=1\\nmetadata_feature_version=1\\ntimestamp=7728 (Fri Sep 28 16:52:47 2018)\\nhost-id=1\\nscore=3400\\nvm_conf_refresh_time=7728 (Fri Sep 28 16:52:47 2018)\\nconf_on_shared_storage=True\\nmaintenance=False\\nstate=EngineStarting\\nstopped=False\\n\", \"hostname\": \"Odin\", \"host-id\": 1, \"engine-status\": {\"reason\": \"failed liveliness check\", \"health\": \"bad\", \"vm\": \"up\", \"detail\": \"Up\"}, \"score\": 3400, \"stopped\": false, \"maintenance\": false, \"crc32\": \"69876c6c\", \"local_conf_timestamp\": 7728, \"host-ts\": 7728}, \"global_maintenance\": false}"]}
[ INFO ] TASK [Check VM status at virt level]
[ INFO ] changed: [localhost]
[ INFO ] TASK [Fail if engine VM is not running]
[ INFO ] skipping: [localhost]
[ INFO ] TASK [Get target engine VM IPv4 address]
[ INFO ] changed: [localhost]
[ INFO ] TASK [Get VDSM's target engine VM stats]
[ INFO ] changed: [localhost]
[ INFO ] TASK [Convert stats to JSON format]
[ INFO ] ok: [localhost]
[ INFO ] TASK [Get target engine VM IPv4 address from VDSM stats]
[ INFO ] ok: [localhost]
[ INFO ] TASK [Fail if the Engine has no IP address]
[ INFO ] skipping: [localhost]
[ INFO ] TASK [Fail if Engine IP is different from engine's FQDN resolved IP]
[ ERROR ] fatal: [localhost]: FAILED! => {"msg": "The conditional check 'engine_vm_ip_vdsm != engine_vm_ipv4.stdout_lines[0]' failed. The error was: error while evaluating conditional (engine_vm_ip_vdsm != engine_vm_ipv4.stdout_lines[0]): list object has no element 0\n\nThe error appears to have been in '/usr/share/ovirt-hosted-engine-setup/ansible/create_target_vm.yml': line 468, column 7, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe
offending line appears to be:\n\n when: engine_vm_ip_vdsm == '' or engine_vm_ip_vdsm is not defined\n - name: Fail if Engine IP is different from engine's FQDN resolved IP\n ^ here\n"}
[ ERROR ] Failed to execute stage 'Closing up': Failed executing ansible-playbook
and I don’t know what is causing the issue - it’s my first time setting up this sort of thing. I think it may have something to do with the way I set up the host vm’s FDQN; I set it up as
192.168.0.229 ovirt.home home
in my hosts file (the address of my server is 192.168.0.228), but after the failed attempt the entry is no longer there.
I tried setting the IP of the VM manually as well as with DHCP but that made no difference. For some reason, after exiting it tells me to read a log file which doesn’t exist, so I can’t really provide any more information than this unfortunately.
Does anyone know what I could be doing wrong? The guides I read aren’t very clear on how the FDQN should be set up. The CentOS installation is brand new and the only other things I installed on it are zfs and nfs-utils.
Thank you!
