Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 953148

Summary: ETL does not populate the dwh db.
Product: Red Hat Enterprise Virtualization Manager Reporter: Roman Hodain <rhodain>
Component: ovirt-engine-dwhAssignee: Yaniv Lavi <ylavi>
Status: CLOSED ERRATA QA Contact: David Botzer <dbotzer>
Severity: high Docs Contact:
Priority: urgent    
Version: 3.1.3CC: acathrow, bazulay, dconsoli, dyasny, iheim, jmann, jraju, pstehlik, Rhev-m-bugs, sgrinber, ykaul, ylavi
Target Milestone: ---   
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: beta3 - rhevm-dwh-3.2.0-10.el6ev.noarch.rpm Doc Type: Bug Fix
Doc Text:
When a virtual machine's IP exceeded 255 characters, it was not reported in the history database. The virtual machine IP column has been changed to text, allowing almost unlimited characters. The history database can now be populated with data for virtual machines with multiple IP addresses.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-10 21:58:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Postgres Logs 2
none
ovirt-engine-dwhd log 2
none
engine db 2 none

Description Roman Hodain 2013-04-17 13:12:34 UTC
Description of problem:
RHEV reports does not show any data. The reason is that the DB is not populated.

Version-Release number of selected component (if applicable):
    rhevm-dwh-3.1.0-21.el6ev

How reproducible:
    The reproducer was not found yet
  
Actual results:
    The DB is not populated

Expected results:
    The DB i spopulated by the data

Additional info:
The logs contains the following stack trace:

ovirt-engine-dwhd.log:

      1 Exception in component tJDBCOutput_5
      2 org.postgresql.util.PSQLException: ERROR: value too long for type character varying(255)
      3         at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
      4         at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
      5         at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
      6         at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
      7         at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
      8         at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:321)
      9         at ovirt_engine_dwh.statisticssync_3_1.StatisticsSync.tJDBCInput_10Process(StatisticsSync.java:9488)
     10         at ovirt_engine_dwh.statisticssync_3_1.StatisticsSync$5.run(StatisticsSync.java:15855)
     11 2013-04-03 03:23:06|CUvXYm|Y06Ard|Dsf0M9|OVIRT_ENGINE_DWH|StatisticsSync|Default|6|Java Exception|tJDBCOutput_5|org.postgresql.util.PSQLException:ERROR: value too long for type character varying(255)|1

The DB logs show the same.

postgresql-Wed.log:

      1 ERROR:  value too long for type character varying(255)
      2 STATEMENT:  INSERT INTO vm_samples_history (history_datetime,vm_id,vm_status,minutes_in_status,cpu_usage_percent,memory_usage_percent,user_cpu_usage_percent,system_cpu_usage_percent,vm_ip,current_user_name,currently_running_on_ho
      3 ERROR:  current transaction is aborted, commands ignored until end of transaction block
      4 STATEMENT:  INSERT INTO host_interface_samples_history (history_datetime,host_interface_id,receive_rate_percent,transmit_rate_percent,host_interface_configuration_version) VALUES ($1,$2,$3,$4,$5)
      5 ERROR:  current transaction is aborted, commands ignored until end of transaction block
      6 STATEMENT:  INSERT INTO vm_disk_samples_history (history_datetime,vm_disk_id,image_id,vm_disk_status,minutes_in_status,vm_disk_actual_size_mb,read_rate_bytes_per_second,read_latency_seconds,write_rate_bytes_per_second,write_laten
      7 ERROR:  current transaction is aborted, commands ignored until end of transaction block
      8 STATEMENT:  INSERT INTO vm_interface_samples_history (history_datetime,vm_interface_id,receive_rate_percent,transmit_rate_percent,vm_interface_configuration_version) VALUES ($1,$2,$3,$4,$5)
      9 ERROR:  value too long for type character varying(255)

Comment 3 Yaniv Lavi 2013-04-22 12:46:02 UTC
This caused by a value longer then 255 character to columns vm_ip or current_user_name. Can you check the values that appear in these columns that might cause this on the rhevm side amd report back the bad values?

The view to look at in the rhevm is:
dwh_vm_history_view



Yaniv

Comment 4 Barak 2013-04-22 12:55:59 UTC
Roman, Can you please provide the rhevm DB the dwh is working with

Comment 8 Yaniv Lavi 2013-04-29 10:29:59 UTC
My testing showed that this is caused by a vm that has many IP addresses. More then 255 chars worth. Barak, how do you think we should solve this? truncate at 255 chars or change the db column definition to test that has unlimited chars size?





Yaniv

Comment 11 Yaniv Lavi 2013-05-05 12:32:38 UTC
Fixed in patches:
upstream - http://gerrit.ovirt.org/#/c/14437/
downstream - https://gerrit.eng.lab.tlv.redhat.com/#/c/8000/


Yaniv

Comment 13 David Botzer 2013-05-12 07:12:33 UTC
How to test ? create a host or vm with more than 15 IPs ?

Comment 14 Yaniv Lavi 2013-05-12 07:15:35 UTC
(In reply to comment #13)
> How to test ? create a host or vm with more than 15 IPs ?

VM with more than 16 IPs



Yaniv

Comment 17 David Botzer 2013-05-14 09:07:07 UTC
Fixed, 3.2SF16
I have VM with 20 vNICs, all have data populated in history db for samples/hourly/daily
Fixed, 3.2SF16

Comment 21 errata-xmlrpc 2013-06-10 21:58:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-0926.html

Comment 22 Yaniv Lavi 2013-10-01 09:55:30 UTC
*** Bug 1012904 has been marked as a duplicate of this bug. ***

Comment 23 Jaison Raju 2013-10-07 06:29:34 UTC
Created attachment 808715 [details]
Postgres Logs 2

Comment 24 Jaison Raju 2013-10-07 06:30:46 UTC
Created attachment 808716 [details]
ovirt-engine-dwhd log 2

Comment 25 Jaison Raju 2013-10-07 06:31:38 UTC
Created attachment 808717 [details]
engine db 2