Ovirt Hosted-Engine 4.5.x Deployment Fails with Error 500

I’ve been struggling with the deployment of Ovirt 4.5.0 GA and hosted-engine VM as it fails during the health check with the following error message:

[ INFO ] TASK [ovirt.ovirt.engine_setup : Check if Engine health page is up][ ERROR ] fatal: [localhost ->]: FAILED! => {"attempts": 30, "changed": false, "connection": "close", "content_encoding": "identity", "content_length": "86", "content_type": "text/html; charset=UTF-8", "date": "Tue, 03 May 2022 15:05:24 GMT", "elapsed": 0, "msg": "Status code was 500 and not [200]: HTTP Error 500: Internal Server Error", "redirected": false, "server": "Apache/2.4.37 (centos) OpenSSL/1.1.1k mod_auth_gssapi/1.6.1", "status": 500, "url": "http://localhost/ovirt-engine/services/health"}
[ INFO ] TASK [ovirt.ovirt.engine_setup : Clean temporary files]
[ INFO ] changed: [localhost ->]
[ INFO ] TASK [ovirt.ovirt.hosted_engine_setup : Sync on engine machine][ INFO ] changed: [localhost ->]
[ INFO ] TASK [ovirt.ovirt.hosted_engine_setup : Set destination directory path][ INFO ] ok: [localhost -> localhost]
[ INFO ] TASK [ovirt.ovirt.hosted_engine_setup : Create destination directory]
[ INFO ] changed: [localhost -> localhost]
[ INFO ] TASK [ovirt.ovirt.hosted_engine_setup : include_tasks]
[ INFO ] ok: [localhost][ INFO ] TASK [ovirt.ovirt.hosted_engine_setup : Find the local appliance image]
[ INFO ] ok: [localhost -> localhost]
[ INFO ] TASK [ovirt.ovirt.hosted_engine_setup : Set local_vm_disk_path]
[ INFO ] ok: [localhost -> localhost]
[ INFO ] TASK [ovirt.ovirt.hosted_engine_setup : Give the vm time to flush dirty buffers]
[ INFO ] ok: [localhost -> localhost]
[ INFO ] TASK [ovirt.ovirt.hosted_engine_setup : Copy engine logs]
[ INFO ] changed: [localhost]
[ INFO ] TASK [ovirt.ovirt.hosted_engine_setup : Change ownership of copied engine logs]
[ INFO ] changed: [localhost -> localhost]
[ INFO ] TASK [ovirt.ovirt.hosted_engine_setup : Notify the user about a failure][ ERROR ] fatal: [localhost]: FAILED! => {"changed": false, "msg": "There was a failure deploying the engine on the local engine VM. The system may not be provisioned according to the playbook results: please check the logs for the issue, fix accordingly or re-deploy from scratch.\n"}

The Cause

The root cause behind this issue is that the DB engine “Postgres” faces a problem when the engine VM updates the pachages as quoted by one of the expers

The issue is when it goes to upgrade Postgresql to a newer version. When it is installing, before it does the apt-updates, log in to the console of the hosted engine and put an exclude in for postgresql.

The Solution

A line of text must be added to a configuration file inside the engine to skip updating the DB engine as following:

1- track the deployment progress, get the temporary IP that’s assigned to the engine VM;

2- then, SSH into it quickly with the root account.

3- run the following command to exclude updating postgresql:

echo "exclude=postgresql-jdbc" >> /etc/dnf/dnf.conf

4- Exit the SSH terminal and monitor the progress of the deplyment.

Now, the deployment succeeded and you can proceed with the remaining deployment steps.

I hope this’s been informative.






One response to “Ovirt Hosted-Engine 4.5.x Deployment Fails with Error 500”

  1. alexander Avatar

    Thanks a lot ! ovirt 4.4.10

Leave a Reply

%d bloggers like this: