Thanks Shirly,

                       As we are not planning to move to 4.2 until next month I have applied this update, it's actually in  


/usr/share/ovirt-engine-dwh/dbscripts/upgrade/


and it seems to working O.K. since yesterday.


Regards,

               Paul S.


From: Shirly Radco <sradco@redhat.com>
Sent: 06 June 2018 12:01
To: Staniforth, Paul
Cc: users@ovirt.org; Eli Mesika; Yedidyah Bar David
Subject: Re: [ovirt-users] oVirt 4.1 ETL service sampling has encounterd an error
 
In that case there is a workaround but I would recommend upgrading to 4.2 if you can.

I did not test the workaround:

You can add to /usr/share/ovirt-engine-dwh/packaging/dbscripts/upgrade/
a file called

04_01_0025__updated_vm_interface_history_id_to_bigint.sql

with the same content as in my patch:
_____________

-- Update vm_interface_* statistics table history_id to bigint

SELECT fn_db_change_column_type('vm_interface_daily_history', 'history_id', 'integer', 'bigint');
SELECT fn_db_change_column_type('vm_interface_hourly_history', 'history_id', 'integer', 'bigint');
SELECT fn_db_change_column_type('vm_interface_samples_history', 'history_id', 'integer', 'bigint');

_____________

and run engine-setup

engine-setup drops all views, makes the updates to the db and recreates the views.

--

SHIRLY RADCO

BI SeNIOR SOFTWARE ENGINEER

Red Hat Israel


On Wed, Jun 6, 2018 at 1:04 PM, Staniforth, Paul <P.Staniforth@leedsbeckett.ac.uk> wrote:

Sorry was looking at the engine database, rather than  ovirt_engine_history database.


When running


SELECT fn_db_change_column_type('vm_interface_daily_history', 'history_id', 'integer', 'bigint');


I get

 

ERROR:  cannot alter type of a column used by a view or rule
DETAIL:  rule _RETURN on view v4_1_statistics_vms_interfaces_resources_usage_daily depends on column "history_id"
CONTEXT:  SQL statement "ALTER TABLE vm_interface_daily_history ALTER COLUMN history_id TYPE bigint"
PL/pgSQL function fn_db_change_column_type(character varying,character varying,character varying,character varying) line 9 at EXECUTE statement


Thanks,

             Paul S.


From: Staniforth, Paul
Sent: 06 June 2018 09:57
To: Shirly Radco

Cc: users@ovirt.org
Subject: Re: [ovirt-users] oVirt 4.1 ETL service sampling has encounterd an error
 

Thanks Shirly,

                      unfortunately Microsoft sent your reply to my Junk Email folder so I have only noticed it today.

Is there any instructions on how to run the script? I can't find any tables or views with the vm_interface_daily_history, etc  columns.


I'm not a database expert.


Regards,

               Paul S.



From: Shirly Radco <sradco@redhat.com>
Sent: 05 June 2018 14:52
To: Staniforth, Paul
Cc: users@ovirt.org
Subject: Re: [ovirt-users] oVirt 4.1 ETL service sampling has encounterd an error
 
Hi,

in version 4.2.2.


I believe you can update manually the history_id field in tables  - vm_interface_daily_history, vm_interface_hourly_history, vm_interface_samples_history
from integer to bigint and it should fix the issue, but I did not test on 4.1.

like in:

 
Best,

--

SHIRLY RADCO

BI SeNIOR SOFTWARE ENGINEER

Red Hat Israel


On Tue, Jun 5, 2018 at 2:28 PM, Staniforth, Paul <P.Staniforth@leedsbeckett.ac.uk> wrote:

Hello,


our oVirt 4.1 system has had a DWH error since around 4am this morning,


It comes up with the error


ETL service sampling has encountered an error. Please consult the service log for more details


in the ovirt-engine-dwh.log


2018-06-05 12:00:18|QXiOTi|gAp8Q4|Cz1F21|OVIRT_ENGINE_DWH|SampleRunJobs|Default|6|Java Exception|tRunJob_5|java.lang.RuntimeException:Child job running failed|1
Exception in component tRunJob_1
java.lang.RuntimeException: Child job running failed
    at ovirt_engine_dwh.sampletimekeepingjob_4_1.SampleTimeKeepingJob.tRunJob_1Process(SampleTimeKeepingJob.java:6067)
    at ovirt_engine_dwh.sampletimekeepingjob_4_1.SampleTimeKeepingJob.tJDBCInput_2Process(SampleTimeKeepingJob.java:5809)
    at ovirt_engine_dwh.sampletimekeepingjob_4_1.SampleTimeKeepingJob.tJDBCConnection_1Process(SampleTimeKeepingJob.java:4444)
    at ovirt_engine_dwh.sampletimekeepingjob_4_1.SampleTimeKeepingJob.tJDBCConnection_2Process(SampleTimeKeepingJob.java:4319)
    at ovirt_engine_dwh.sampletimekeepingjob_4_1.SampleTimeKeepingJob.tRowGenerator_2Process(SampleTimeKeepingJob.java:4188)
    at ovirt_engine_dwh.sampletimekeepingjob_4_1.SampleTimeKeepingJob.tJDBCInput_3Process(SampleTimeKeepingJob.java:3593)
    at ovirt_engine_dwh.sampletimekeepingjob_4_1.SampleTimeKeepingJob.tJDBCInput_5Process(SampleTimeKeepingJob.java:2977)
    at ovirt_engine_dwh.sampletimekeepingjob_4_1.SampleTimeKeepingJob.tJDBCInput_4Process(SampleTimeKeepingJob.java:2295)
    at ovirt_engine_dwh.sampletimekeepingjob_4_1.SampleTimeKeepingJob.tJDBCConnection_3Process(SampleTimeKeepingJob.java:1649)
    at ovirt_engine_dwh.sampletimekeepingjob_4_1.SampleTimeKeepingJob$2.run(SampleTimeKeepingJob.java:11363)


and in the postgres log there is


ERROR:  integer out of range
STATEMENT:  INSERT INTO vm_interface_samples_history (history_datetime,vm_interface_id,receive_rate_percent,transmit_rate_percent,vm_interface_configuration_version,received_total_byte,transmitted_total_byte) VALUES ($1,$2,$3,$4,$5,$6,$7)
ERROR:  current transaction is aborted, commands ignored until end of transaction block


Thanks,

             Paul S.

To view the terms under which this email is distributed, please go to:-
http://disclaimer.leedsbeckett.ac.uk/disclaimer/disclaimer.html


_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-leave@ovirt.org
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/
List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/C6MLPVLJDKQ7AQLSPJ7Q3QVDAAFDZWUA/


To view the terms under which this email is distributed, please go to:-
http://disclaimer.leedsbeckett.ac.uk/disclaimer/disclaimer.html


To view the terms under which this email is distributed, please go to:-
http://disclaimer.leedsbeckett.ac.uk/disclaimer/disclaimer.html