Description of problem: Value too long for type character varying(50) for host_interface_configuration and vm_interface_configuration tables. The ovirt-engine-history database tables host_interface_configuration and vm_interface_configuration tables doesn't seem take more the 50 character names. The ovirt-engine-dwh.log continues to stream errors [I1]. Also the pg_logs report the ERRORs as well [I2]. It appears BZ https://bugzilla.redhat.com/show_bug.cgi?id=1477204 added functionality to configure Network name length to 256 bytes but the ovirt-engine-history database tables host_interface_configuration and vm_interface_configuration tables can take up to 50 [I3]. [I1] Errors: ~~~ 2018-05-10 13:33:11|PgFdnl|I53IsN|OiSVo3|OVIRT_ENGINE_DWH|SampleTimeKeepingJob|Default|6|Java Exception|tRunJob_1|java.lang.RuntimeException:Child job running failed|1 Exception in component tJDBCOutput_5 org.postgresql.util.PSQLException: ERROR: value too long for type character varying(50) at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_5Process(ConfigurationSync.java:22977) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_22Process(ConfigurationSync.java:21194) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_4Process(ConfigurationSync.java:18622) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_34Process(ConfigurationSync.java:16097) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_33Process(ConfigurationSync.java:14895) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_20Process(ConfigurationSync.java:13697) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_3Process(ConfigurationSync.java:12325) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_18Process(ConfigurationSync.java:11345) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_1Process(ConfigurationSync.java:9812) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_15Process(ConfigurationSync.java:8382) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_2Process(ConfigurationSync.java:7015) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_11Process(ConfigurationSync.java:6053) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync.tJDBCInput_9Process(ConfigurationSync.java:4288) at ovirt_engine_dwh.configurationsync_4_1.ConfigurationSync$2.run(ConfigurationSync.java:60001) 2018-05-10 13:33:11|8fAaTq|I53IsN|gdpyaE|OVIRT_ENGINE_DWH|ConfigurationSync|Default|6|Java Exception|tJDBCOutput_5|org.postgresql.util.PSQLException:ERROR: value too long for type character varying(50)|1 Exception in component tRunJob_1 java.lang.RuntimeException: Child job running failed at ovirt_engine_dwh.samplerunjobs_4_1.SampleRunJobs.tRunJob_1Process(SampleRunJobs.java:1198) at ovirt_engine_dwh.samplerunjobs_4_1.SampleRunJobs.tRunJob_4Process(SampleRunJobs.java:1000) at ovirt_engine_dwh.samplerunjobs_4_1.SampleRunJobs.tJDBCConnection_2Process(SampleRunJobs.java:767) at ovirt_engine_dwh.samplerunjobs_4_1.SampleRunJobs.tJDBCConnection_1Process(SampleRunJobs.java:642) at ovirt_engine_dwh.samplerunjobs_4_1.SampleRunJobs$2.run(SampleRunJobs.java:2683) 2018-05-10 13:33:11|gdpyaE|I53IsN|1TTZj9|OVIRT_ENGINE_DWH|SampleRunJobs|Default|6|Java Exception|tRunJob_1|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) ~~~ [I2] pg_logs reporting error. ~~~ ERROR: value too long for type character varying(50) STATEMENT: INSERT INTO host_interface_configuration (host_interface_id,host_interface_name,host_id,host_interface_type,host_interface_speed_bps,mac_address,logical_network_name,ip_address,gateway,bond,bond_name,vlan_id,host_configuration_version,create_date,update_date,delete_date) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16) ERROR: value too long for type character varying(50) STATEMENT: INSERT INTO vm_interface_configuration (vm_interface_id,vm_interface_name,vm_id,vm_interface_type,vm_interface_speed_bps,mac_address,logical_network_name,vm_configuration_version,create_date,update_date,delete_date) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11) ~~~ [I3] host_interface_configuration and vm_interface_configuration functions. ~~~ ovirt_engine_history=# \d host_interface_configuration Table "public.host_interface_configuration" Column | Type | Modifiers ----------------------------+--------------------------+--------------------------------------------------------- history_id | integer | not null default nextval('configuration_seq'::regclass) host_interface_id | uuid | not null host_interface_name | character varying(50) | not null host_id | uuid | not null host_interface_type | smallint | host_interface_speed_bps | integer | mac_address | character varying(59) | logical_network_name | character varying(50) | ip_address | character varying(20) | gateway | character varying(20) | bond | boolean | bond_name | character varying(50) | vlan_id | integer | host_configuration_version | integer | create_date | timestamp with time zone | update_date | timestamp with time zone | delete_date | timestamp with time zone | Indexes: "host_interface_configuration_pkey" PRIMARY KEY, btree (history_id) "host_interface_configuration_host_id_idx" btree (host_id) "host_interface_configuration_host_interface_id_idx" btree (host_interface_id) ovirt_engine_history=# \d vm_interface_configuration Table "public.vm_interface_configuration" Column | Type | Modifiers --------------------------+--------------------------+--------------------------------------------------------- history_id | integer | not null default nextval('configuration_seq'::regclass) vm_interface_id | uuid | not null vm_interface_name | character varying(50) | not null vm_id | uuid | vm_interface_type | smallint | vm_interface_speed_bps | integer | mac_address | character varying(20) | logical_network_name | character varying(50) | vm_configuration_version | integer | create_date | timestamp with time zone | update_date | timestamp with time zone | delete_date | timestamp with time zone | Indexes: "vm_interface_configuration_pkey" PRIMARY KEY, btree (history_id) "vm_interface_configuration_vm_id_idx" btree (vm_id) "vm_interface_configuration_vm_interface_id_idx" btree (vm_interface_id) ~~~ Version-Release number of selected component (if applicable): ovirt-engine-setup-4.1.11.2-0.1.el7.noarch How reproducible: 100% Steps to Reproduce: 1. RHV-M UI -> Network: Add New Logical Network with over 50 character name. 2. Assign the large named network to a host and to a VM 3. Start the VM. 4. Check the /var/ovirt-engine-dwh/ovirt-engine-dwhd.log and /var/lib/pgsq/data/pg_logs for errors. Actual results: DB won't accept more then 50 characters Expected results: Should accept more the 50 characters. Additional info:
Problem is also seen on 4.2 as well.
Engine db has: v_network_name VARCHAR(256), dwh db has: network_name VARCHAR(50),
Thanks Shirly, Tested the fix. - Bimal.
After upgrade, problem still persist and error appears in dwh log from upgrade log: Running upgrade sql script '/usr/share/ovirt-engine-dwh/dbscripts/upgrade/04_02_0030_update_network_name_length.sql'... but no change done ovirt_engine_history=# \d host_interface_configuration ... logical_network_name | character varying(50) | ovirt_engine_history=# \d vm_interface_configuration ... logical_network_name | character varying(50) | tested in ovirt-engine-dwh-4.2.4-1.el7ev.noarch
If you have upgraded or installed ovirt-engine-dwh 4.2.4 or master you will need to run the following commands directly on the ovirt_engine_history db to fix this bug. ALTER TABLE host_interface_configuration ALTER COLUMN logical_network_name TYPE varchar(256); ALTER TABLE vm_interface_configuration ALTER COLUMN logical_network_name TYPE varchar(256); QE please test upgrading from 4.2.3.z and below and not from 4.2.4 to build. Thank you.
so according to last change in this bug, should be this re-target to 4.3?
(In reply to Pavol Brilla from comment #13) > so according to last change in this bug, should be this re-target to 4.3? No. Sorry. It is already fixed in the ovirt-engine-dwh-4.2.4.1. The issue was in the ovirt-engine-dwh-4.2.4 build.
After upgrade 4.1 -> 4.2.4 DWH works ok with long network name on host and VM. The same for upgrade 4.2.3 -> 4.2.4 verified in ovirt-engine-dwh-4.2.4.3-1.el7ev.noarch ovirt-engine-dbscripts-4.2.4.5-0.1.el7_3.noarch
BZ<2>Jira Resync