| Summary: | [Upgrade][DWH] DWH upgrade failed when upgrading a system from 3.6.3 -> 3.6.4 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [oVirt] ovirt-engine-dwh | Reporter: | Gil Klein <gklein> | ||||
| Component: | Setup | Assignee: | Shirly Radco <sradco> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | Pavel Stehlik <pstehlik> | ||||
| Severity: | urgent | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 3.6.4 | CC: | bugs, didi, emesika | ||||
| Target Milestone: | --- | Flags: | gklein:
ovirt-3.6.z?
gklein: blocker? rule-engine: planning_ack? rule-engine: devel_ack? rule-engine: testing_ack? |
||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2016-03-21 12:33:04 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | Integration | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
Created attachment 1138522 [details]
pg_dumpall -s output on a clean system
Are you sure you did not manually add the function list_dates to the dwh database? Please check:
for f in /var/lib/ovirt-engine-dwh/backups/*.dump; do \
echo $f; \
pg_restore $f | grep list_dates; \
done
If you did add it manually, either remove it, or change its owner to the dwh db user (and engine-setup will then remove it), and try again.
(In reply to Yedidyah Bar David from comment #6) > Are you sure you did not manually add the function list_dates to the dwh > database? Please check: > > for f in /var/lib/ovirt-engine-dwh/backups/*.dump; do \ > echo $f; \ > pg_restore $f | grep list_dates; \ > done > > If you did add it manually, either remove it, or change its owner to the dwh > db user (and engine-setup will then remove it), and try again. Looks like list_dates() was added as part of an inspection of another DWH BZ. # drop function list_dates(); DROP FUNCTION I'll try to re-run engine-backup, to confirm it solves the problem I'm closing as NOTABUG. Didi, thanks for your help to trace this issue. Thanks for the report. Please make sure you regularly do tests that include upgrading from 3.0 all the way to latest/current. Thanks. |
Description of problem: Engine + PostgreSQL DB + DWH + Report all runs on the same host. DHW upgrade failed when upgrading 3.6.3 -> 3.6.4. Version-Release number of selected component (if applicable): rhevm-3.6.3.4-0.1.el6.noarch rhevm-dwh-3.6.2-1.el6ev.noarch rhevm-dwh-setup-3.6.2-1.el6ev.noarch rhevm-setup-3.6.4-0.1.el6.noarch How reproducible: Always on this system Steps to Reproduce: 1. yum install rhevm-setup rhevm-dwh-setup rhevm-reports-setup 2. engine-setup Actual results: engine-setup failed, relevant error is: ERROR: must be owner of function public.list_dates FATAL: Cannot execute sql command: --command= drop function if exists public.attach_user_to_su_role(uuid, character varying, character varying, character varying) cascade; Expected results: engine-setup should not fail Additional info: ************************** 2016-03-20 23:59:17 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema plugin.executeRaw:878 execute-result: ['/usr/share/ovirt-engine-dwh/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'engine_history', '-d', 'ovirt_engine_history', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20160320234657-za096j.log', '-c', 'apply'], rc=1 2016-03-20 23:59:17 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema plugin.execute:936 execute-output: ['/usr/share/ovirt-engine-dwh/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'engine_history', '-d', 'ovirt_engine_history', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20160320234657-za096j.log', '-c', 'apply'] stdout: Creating schema engine_history@localhost:5432/ovirt_engine_history Saving custom users permissions on database objects... upgrade script detected a change in Config, View or Stored Procedure... 2016-03-20 23:59:17 DEBUG otopi.plugins.ovirt_engine_setup.ovirt_engine_dwh.db.schema plugin.execute:941 execute-output: ['/usr/share/ovirt-engine-dwh/dbscripts/schema.sh', '-s', 'localhost', '-p', '5432', '-u', 'engine_history', '-d', 'ovirt_engine_history', '-l', '/var/log/ovirt-engine/setup/ovirt-engine-setup-20160320234657-za096j.log', '-c', 'apply'] stderr: ERROR: must be owner of function public.list_dates FATAL: Cannot execute sql command: --command= drop function if exists public.attach_user_to_su_role(uuid, character varying, character varying, character varying) cascade; drop function if exists public.attach_user_to_su_role(uuid) cascade; drop function if exists public.checkdbconnection() cascade; drop function if exists public.fn_db_add_action_group_to_role(uuid, integer) cascade; drop function if exists public.fn_db_add_column(character varying, character varying, text) cascade; drop function if exists public.fn_db_add_column_to_object_white_list(character varying, character varying) cascade; drop function if exists public.fn_db_add_config_value(character varying, character varying, character varying) cascade; drop function if exists public.fn_db_change_column_type(character varying, character varying, character varying, character varying) cascade; drop function if exists public.fn_db_create_constraint(character varying, character varying, text) cascade; drop function if exists public.fn_db_delete_config_for_version(text) cascade; drop function if exists public.fn_db_delete_config_value(character varying, text) cascade; drop function if exists public.fn_db_delete_config_value_all_versions(character varying) cascade; drop function if exists public.fn_db_drop_column(character varying, character varying) cascade; drop function if exists public.fn_db_drop_constraint(character varying, character varying) cascade; drop function if exists public.fn_db_get_async_tasks() cascade; drop function if exists public.fn_db_grant_action_group_to_all_roles_filter(integer, uuid[]) cascade; drop function if exists public.fn_db_mask_object(regclass) cascade; drop function if exists public.fn_db_rename_column(character varying, character varying, character varying) cascade; drop function if exists public.fn_db_rename_config_key(character varying, character varying, character varying) cascade; drop function if exists public.fn_db_split_config_value(character varying, character varying, character varying, character varying) cascade; drop function if exists public.fn_db_unlock_disk(uuid) cascade; drop function if exists public.fn_db_unlock_entity(character varying, character varying, boolean) cascade; drop function if exists public.fn_db_unlock_snapshot(uuid) cascade; drop function if exists public.fn_db_update_config_value(character varying, character varying, character varying) cascade; drop function if exists public.fn_db_update_default_config_value(character varying, character varying, character varying, character varying, boolean) cascade; drop function if exists public.fn_get_column_size(character varying, character varying) cascade; drop function if exists public.generate_drop_all_functions_syntax() cascade; drop function if exists public.generate_drop_all_seq_syntax() cascade; drop function if exists public.generate_drop_all_tables_syntax() cascade; drop function if exists public.generate_drop_all_user_types_syntax() cascade; drop function if exists public.generate_drop_all_views_syntax() cascade; drop function if exists public.getpathids(uuid, integer) cascade; drop function if exists public.getpathinnames(integer) cascade; drop function if exists public.list_dates() cascade; drop function if exists public.update_enum_translator(character varying, smallint, character varying, text) cascade; drop function if exists public.update_tags_path_child(timestamp with time zone) cascade; 2016-03-20 23:59:17 DEBUG otopi.context context._executeMethod:156 method exception Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/otopi/context.py", line 146, in _executeMethod method['method']() File "/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine-dwh/db/schema.py", line 364, in _misc odwhcons.DBEnv.PGPASS_FILE File "/usr/lib/python2.6/site-packages/otopi/plugin.py", line 946, in execute command=args[0], RuntimeError: Command '/usr/share/ovirt-engine-dwh/dbscripts/schema.sh' failed to execute 2016-03-20 23:59:17 ERROR otopi.context context._executeMethod:165 Failed to execute stage 'Misc configuration': Command '/usr/share/ovirt-engine-dwh/dbscripts/schema.sh' failed to execute 2016-03-20 23:59:17 DEBUG otopi.transaction transaction.abort:134 aborting 'Yum Transaction'