Hi all,
It's very hard to debug this without getting a full picture of the state
of the machine, including logs, versions, flow, etc. Some comments inside.
On Thu, Mar 22, 2018 at 10:12 AM, Sandro Bonazzola <sbonazzo(a)redhat.com> wrote:
>
> As Didi mentioned, we are looking for errors in the below files/dir.
> Do you mind to take a look and share the error message?
>
> /var/log/ovirt-engine/setup/*
> /var/opt/rh/rh-postgresql95/lib/pgsql/data/pg_log
> /var/log/messages
>
>
Didi, Eli, can you please have a look?
Looking at the logs Marcos shared with me I see:
2018-03-21 15:02:30,373-0400 DEBUG
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema
plugin.executeRaw:863 execute-result:
['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s',
'localhost', '-p',
'5432', '
-u', 'engine_20180321150206', '-d', 'engine_20180321150206',
'-l',
The fact that your database name is 'engine_20180321150206' most likely means
you have/had some problem, see also:
https://bugzilla.redhat.com/show_bug.cgi?id=1259782
Please check if you have other databases on your machine, why this one was
created, etc.
Some information to understand this can be found in the setup logs.
'/var/log/ovirt-engine/setup/ovirt-engine-setup-20180321150115-jjxbh3.log',
'-c', 'apply'], rc=1
2018-03-21 15:02:30,374-0400 DEBUG
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.execute:921
execute-output: ['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s',
'localhost', '-p', '5432', '-u'
, 'engine_20180321150206', '-d', 'engine_20180321150206',
'-l',
'/var/log/ovirt-engine/setup/ovirt-engine-setup-20180321150115-jjxbh3.log',
'-c', 'apply'] stdout:
Creating schema engine_20180321150206@localhost:5432/engine_20180321150206
Creating fresh schema
Creating tables...
Creating functions...
2018-03-21 15:02:30,374-0400 DEBUG
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema plugin.execute:926
execute-output: ['/usr/share/ovirt-engine/dbscripts/schema.sh', '-s',
'localhost', '-p', '5432', '-u'
, 'engine_20180321150206', '-d', 'engine_20180321150206',
'-l',
'/var/log/ovirt-engine/setup/ovirt-engine-setup-20180321150115-jjxbh3.log',
'-c', 'apply'] stderr:
psql:/usr/share/ovirt-engine/dbscripts/create_functions.sql:1095: ERROR:
must be owner of function uuid_generate_v1
FATAL: Cannot execute sql command:
--file=/usr/share/ovirt-engine/dbscripts/create_functions.sql
2018-03-21 15:02:30,374-0400 ERROR
otopi.plugins.ovirt_engine_setup.ovirt_engine.db.schema schema._misc:428
schema.sh: FATAL: Cannot execute sql command:
--file=/usr/share/ovirt-engine/dbscripts/create_functions
.sql
2018-03-21 15:02:30,375-0400 DEBUG otopi.context context._executeMethod:143
method exception
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/otopi/context.py", line 133, in
_executeMethod
method['method']()
File
"/usr/share/ovirt-engine/setup/bin/../plugins/ovirt-engine-setup/ovirt-engine/db/schema.py",
line 430, in _misc
raise RuntimeError(_('Engine schema refresh failed'))
RuntimeError: Engine schema refresh failed
2018-03-21 15:02:30,376-0400 ERROR otopi.context context._executeMethod:152
Failed to execute stage 'Misc configuration': Engine schema refresh failed
2018-03-21 15:02:30,377-0400 DEBUG otopi.transaction transaction.abort:119
aborting 'DWH Engine database Transaction'
2018-03-21 15:02:30,377-0400 DEBUG otopi.transaction transaction.abort:119
aborting 'Database Transaction'
A few lines above in the log I see:
********* QUERY **********
CREATE OR REPLACE FUNCTION uuid_generate_v1()
RETURNS uuid STABLE
AS $PROCEDURE$
DECLARE
v_val BIGINT;
v_4_1_part CHAR(4);
v_4_2_part CHAR(4);
v_4_3_part CHAR(4);
v_8_part CHAR(8);
v_12_part CHAR(12);
v_4_part_max INT;
BEGIN
PERFORM setseed(random());
-- The only part we should use modulo is the 4 digit part, all the
-- rest are really big numbers (i.e 16^8 - 1 and 16^12 - 1)
-- The use of round(random() * 1000 is for getting a different id
-- for DC/Cluster in different installations
v_4_part_max = 65535;-- this is 16^4 -1
v_val := nextval('uuid_sequence');
v_4_1_part := lpad(to_hex((v_val + (round(random() * 1000))::BIGINT)),
4, '0');
v_4_2_part := lpad(to_hex((v_val + (round(random() * 1000))::BIGINT)),
4, '0');
v_4_3_part := lpad(to_hex((v_val + (round(random() * 1000))::BIGINT)),
4, '0');
-- generate this part using the clock timestamp
v_8_part := lpad(to_hex(cast(FLOOR(EXTRACT(EPOCH FROM
clock_timestamp())) as bigint)), 8 , '0');
v_12_part := lpad(to_hex((v_val + (round(random() * 1000))::BIGINT)),
12, '0');
RETURN v_8_part || v_4_1_part || v_4_2_part || v_4_3_part || v_12_part;
END;$PROCEDURE$
LANGUAGE plpgsql;
**************************
This function was removed by:
https://gerrit.ovirt.org/#/c/84832/
which should be included in 4.2.1 :
https://bugzilla.redhat.com/show_bug.cgi?id=1515635
The log is OVESETUP_CORE/generatedByVersion=str:'4.2.1.7'
So not sure how you still have it.
I suggest to open a bug in bugzilla and attach a sosreport of the machine.
You can use this link:
https://bugzilla.redhat.com/enter_bug.cgi?alias=&assigned_to=sbonazzo...
My guess for the reason of the failure:
You updated the setup packages to 4.2.1.7, but the engine itself
failed to update - either because you ran engine-setup with
'--offline' or because you removed the repos, they were unavailable,
something like that.
Even if I am right, I'd still try to understand why it tries to use
database engine_20180321150206, as there might be some other problems.
Best regards,
--
Didi