engine-backup: FATAL: Errors while restoring database ovirt_engine_history
Environment
- Red Hat Enterprise Virtualization Manager 3.4
- rhevm-tools-3.4.0-0.22.el6ev.noarch
Issue
- While trying to backup & restore RHEV3.4 environment to a new RHEV3.4 system it failed with message in
restore.log
file.
FATAL: Errors while restoring database ovirt_engine_history
- The original RHEVM3.4 environment was upgraded from RHEV3.0
Resolution
- To fix this bug upgrade the rhevm to rhevm-3.4.1
Root Cause
- In 3.1 uuid-ossp.sql was used from postgresql-contrib. This file creates functions inside the db implemented in C (using a shared library), which is considered dangerous and is thus allowed only to privileged users.
- Until 3.2 the user \'postgres\' was used, so this wasn't an issue.
- In 3.2 the use of uuid-ossp was stopped.
- In 3.3 the use of postgres was stopped, and instead created a new user ('engine_history' by default), but the functions created earlier remained in its schema. A dump and restore of such a database therefore emits errors while trying to recreate these functions.
- The private bugzilla-1118643 is addressing this issue. Contact Red Hat Technical Support to know more about this bug.
Diagnostic Steps
- Once the db restore will fail, check
/tmp/engine-backup.xxxxxxxxxx/psql-restore-log
file. It may contain the logs as mentioned below:
ERROR: permission denied for language c
ERROR: function public.uuid_generate_v1() does not exist
ERROR: permission denied for language c
ERROR: function public.uuid_generate_v1mc() does not exist
ERROR: permission denied for language c
ERROR: function public.uuid_generate_v3(uuid, text) does not exist
ERROR: permission denied for language c
ERROR: function public.uuid_generate_v4() does not exist
ERROR: permission denied for language c
ERROR: function public.uuid_generate_v5(uuid, text) does not exist
ERROR: permission denied for language c
ERROR: function public.uuid_nil() does not exist
ERROR: permission denied for language c
ERROR: function public.uuid_ns_dns() does not exist
ERROR: permission denied for language c
ERROR: function public.uuid_ns_oid() does not exist
ERROR: permission denied for language c
ERROR: function public.uuid_ns_url() does not exist
ERROR: permission denied for language c
ERROR: function public.uuid_ns_x500() does not exist
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments