[Engine-devel] value too long for type character varying(20) in function "insertvds_interface"

Hi, When running VDSM on host with Infiniband HCAs I get the following errors in /usr/share/jboss-as/standalone/log/server.log on the ovirt-engine host. WARN [org.ovirt.engine.core.vdsbroker.VdsManager] (QuartzScheduler_Worker-17) ResourceManager::refreshVdsRunTimeInfo::Failed to refresh VDS , vds = 783eb0ac-9a91-11e1-a8e4-000c29de7759 : xena003, error = DataIntegrityViolationException: CallableStatementCallback; SQL [{call insertvds_interface(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: value too long for type character varying(20) Where: SQL statement "INSERT INTO vds_interface(addr, bond_name, bond_type, gateway, id, is_bond, bond_opts, mac_addr, name, network_name, speed, subnet, boot_protocol, type, VDS_ID, vlan_id, mtu, bridged) VALUES(v_addr, v_bond_name, v_bond_type, v_gateway, v_id, v_is_bond, v_bond_opts, v_mac_addr, v_name, v_network_name, v_speed, v_subnet, v_boot_protocol, v_type, v_vds_id, v_vlan_id, v_mtu, v_bridged)" More detailed log: http://pastebin.com/AHD3di5i VDSM: From git repository commit 8a14b63fbbafbdb9ee7f85a9b702bff310f4f668 oVirt-engine: From git repository comit b24dddf094e08afa6a2032a487b37476318a872d Any suggestions? Regards, Itzik

On 05/11/2012 03:52 AM, Itzik Brown wrote:
Hi,
When running VDSM on host with Infiniband HCAs I get the following errors in /usr/share/jboss-as/standalone/log/server.log on the ovirt-engine host.
WARN [org.ovirt.engine.core.vdsbroker.VdsManager] (QuartzScheduler_Worker-17) ResourceManager::refreshVdsRunTimeInfo::Failed to refresh VDS , vds = 783eb0ac-9a91-11e1-a8e4-000c29de7759 : xena003, error = DataIntegrityViolationException: CallableStatementCallback; SQL [{call insertvds_interface(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: value too long for type character varying(20) Where: SQL statement "INSERT INTO vds_interface(addr, bond_name, bond_type, gateway, id, is_bond, bond_opts, mac_addr, name, network_name, speed, subnet, boot_protocol, type, VDS_ID, vlan_id, mtu, bridged) VALUES(v_addr, v_bond_name, v_bond_type, v_gateway, v_id, v_is_bond, v_bond_opts, v_mac_addr, v_name, v_network_name, v_speed, v_subnet, v_boot_protocol, v_type, v_vds_id, v_vlan_id, v_mtu, v_bridged)"
More detailed log: http://pastebin.com/AHD3di5i
VDSM: From git repository commit 8a14b63fbbafbdb9ee7f85a9b702bff310f4f668 oVirt-engine: From git repository comit b24dddf094e08afa6a2032a487b37476318a872d
Any suggestions?
in general, you would need to send a patch to upgrade the scheme to a value longer than 20 characters for a logical network name. 1. I think bridge name is linux is limited to 15 characters, so not sure actually why 20 are allowed today. danken? 2. if changing the db scheme of the engine, also need to remember to upgrade the history db as well. 3. if different network implementation can support varying lengths, need to add validations in engine ("CanDoAction") to check the length per type of network implementation.
Regards, Itzik _______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel

On Fri, May 11, 2012 at 11:04:14AM +0300, Itamar Heim wrote:
On 05/11/2012 03:52 AM, Itzik Brown wrote:
Hi,
When running VDSM on host with Infiniband HCAs I get the following errors in /usr/share/jboss-as/standalone/log/server.log on the ovirt-engine host.
WARN [org.ovirt.engine.core.vdsbroker.VdsManager] (QuartzScheduler_Worker-17) ResourceManager::refreshVdsRunTimeInfo::Failed to refresh VDS , vds = 783eb0ac-9a91-11e1-a8e4-000c29de7759 : xena003, error = DataIntegrityViolationException: CallableStatementCallback; SQL [{call insertvds_interface(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: value too long for type character varying(20) Where: SQL statement "INSERT INTO vds_interface(addr, bond_name, bond_type, gateway, id, is_bond, bond_opts, mac_addr, name, network_name, speed, subnet, boot_protocol, type, VDS_ID, vlan_id, mtu, bridged) VALUES(v_addr, v_bond_name, v_bond_type, v_gateway, v_id, v_is_bond, v_bond_opts, v_mac_addr, v_name, v_network_name, v_speed, v_subnet, v_boot_protocol, v_type, v_vds_id, v_vlan_id, v_mtu, v_bridged)"
More detailed log: http://pastebin.com/AHD3di5i
VDSM: From git repository commit 8a14b63fbbafbdb9ee7f85a9b702bff310f4f668 oVirt-engine: From git repository comit b24dddf094e08afa6a2032a487b37476318a872d
Any suggestions?
in general, you would need to send a patch to upgrade the scheme to a value longer than 20 characters for a logical network name. 1. I think bridge name is linux is limited to 15 characters, so not sure actually why 20 are allowed today. danken?
No idea why it's 20.. IIRC vdsm silently ignore the trailing chars past the 15th.
2. if changing the db scheme of the engine, also need to remember to upgrade the history db as well. 3. if different network implementation can support varying lengths, need to add validations in engine ("CanDoAction") to check the length per type of network implementation.

On 11/05/12 11:40, Dan Kenigsberg wrote:
On Fri, May 11, 2012 at 11:04:14AM +0300, Itamar Heim wrote:
On 05/11/2012 03:52 AM, Itzik Brown wrote:
Hi,
When running VDSM on host with Infiniband HCAs I get the following errors in /usr/share/jboss-as/standalone/log/server.log on the ovirt-engine host.
WARN [org.ovirt.engine.core.vdsbroker.VdsManager] (QuartzScheduler_Worker-17) ResourceManager::refreshVdsRunTimeInfo::Failed to refresh VDS , vds = 783eb0ac-9a91-11e1-a8e4-000c29de7759 : xena003, error = DataIntegrityViolationException: CallableStatementCallback; SQL [{call insertvds_interface(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: value too long for type character varying(20) Where: SQL statement "INSERT INTO vds_interface(addr, bond_name, bond_type, gateway, id, is_bond, bond_opts, mac_addr, name, network_name, speed, subnet, boot_protocol, type, VDS_ID, vlan_id, mtu, bridged) VALUES(v_addr, v_bond_name, v_bond_type, v_gateway, v_id, v_is_bond, v_bond_opts, v_mac_addr, v_name, v_network_name, v_speed, v_subnet, v_boot_protocol, v_type, v_vds_id, v_vlan_id, v_mtu, v_bridged)"
More detailed log: http://pastebin.com/AHD3di5i
VDSM: From git repository commit 8a14b63fbbafbdb9ee7f85a9b702bff310f4f668 oVirt-engine: From git repository comit b24dddf094e08afa6a2032a487b37476318a872d
Any suggestions?
in general, you would need to send a patch to upgrade the scheme to a value longer than 20 characters for a logical network name. 1. I think bridge name is linux is limited to 15 characters, so not sure actually why 20 are allowed today. danken?
No idea why it's 20.. IIRC vdsm silently ignore the trailing chars past the 15th.
I opened a BZ on this - https://bugzilla.redhat.com/show_bug.cgi?id=821172 "VM network name should be limited to 15 chars " Livnat
2. if changing the db scheme of the engine, also need to remember to upgrade the history db as well. 3. if different network implementation can support varying lengths, need to add validations in engine ("CanDoAction") to check the length per type of network implementation.

The problem is with the mac_addr field. For my Infiniband HCA the hardware address is 59 chars long. I changed the scheme of the engine and now it works. Itzik -----Original Message----- From: Livnat Peer [mailto:lpeer@redhat.com] Sent: שבת 12 מאי 2012 21:48 To: Dan Kenigsberg Cc: Itamar Heim; Itzik Brown; engine-devel@ovirt.org; Yaniv Dary Subject: Re: [Engine-devel] value too long for type character varying(20) in function "insertvds_interface" On 11/05/12 11:40, Dan Kenigsberg wrote:
On Fri, May 11, 2012 at 11:04:14AM +0300, Itamar Heim wrote:
On 05/11/2012 03:52 AM, Itzik Brown wrote:
Hi,
When running VDSM on host with Infiniband HCAs I get the following errors in /usr/share/jboss-as/standalone/log/server.log on the ovirt-engine host.
WARN [org.ovirt.engine.core.vdsbroker.VdsManager] (QuartzScheduler_Worker-17) ResourceManager::refreshVdsRunTimeInfo::Failed to refresh VDS , vds = 783eb0ac-9a91-11e1-a8e4-000c29de7759 : xena003, error = DataIntegrityViolationException: CallableStatementCallback; SQL [{call insertvds_interface(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: value too long for type character varying(20) Where: SQL statement "INSERT INTO vds_interface(addr, bond_name, bond_type, gateway, id, is_bond, bond_opts, mac_addr, name, network_name, speed, subnet, boot_protocol, type, VDS_ID, vlan_id, mtu, bridged) VALUES(v_addr, v_bond_name, v_bond_type, v_gateway, v_id, v_is_bond, v_bond_opts, v_mac_addr, v_name, v_network_name, v_speed, v_subnet, v_boot_protocol, v_type, v_vds_id, v_vlan_id, v_mtu, v_bridged)"
More detailed log: http://pastebin.com/AHD3di5i
VDSM: From git repository commit 8a14b63fbbafbdb9ee7f85a9b702bff310f4f668 oVirt-engine: From git repository comit b24dddf094e08afa6a2032a487b37476318a872d
Any suggestions?
in general, you would need to send a patch to upgrade the scheme to a value longer than 20 characters for a logical network name. 1. I think bridge name is linux is limited to 15 characters, so not sure actually why 20 are allowed today. danken?
No idea why it's 20.. IIRC vdsm silently ignore the trailing chars past the 15th.
I opened a BZ on this - https://bugzilla.redhat.com/show_bug.cgi?id=821172 "VM network name should be limited to 15 chars " Livnat
2. if changing the db scheme of the engine, also need to remember to upgrade the history db as well. 3. if different network implementation can support varying lengths, need to add validations in engine ("CanDoAction") to check the length per type of network implementation.

On 05/14/2012 09:12 AM, Itzik Brown wrote:
The problem is with the mac_addr field. For my Infiniband HCA the hardware address is 59 chars long. I changed the scheme of the engine and now it works.
Itzik
I wonder if there is some upper bound on the varchar length we can decide upon... Yair
-----Original Message----- From: Livnat Peer [mailto:lpeer@redhat.com] Sent: שבת 12 מאי 2012 21:48 To: Dan Kenigsberg Cc: Itamar Heim; Itzik Brown; engine-devel@ovirt.org; Yaniv Dary Subject: Re: [Engine-devel] value too long for type character varying(20) in function "insertvds_interface"
On 11/05/12 11:40, Dan Kenigsberg wrote:
On Fri, May 11, 2012 at 11:04:14AM +0300, Itamar Heim wrote:
On 05/11/2012 03:52 AM, Itzik Brown wrote:
Hi,
When running VDSM on host with Infiniband HCAs I get the following errors in /usr/share/jboss-as/standalone/log/server.log on the ovirt-engine host.
WARN [org.ovirt.engine.core.vdsbroker.VdsManager] (QuartzScheduler_Worker-17) ResourceManager::refreshVdsRunTimeInfo::Failed to refresh VDS , vds = 783eb0ac-9a91-11e1-a8e4-000c29de7759 : xena003, error = DataIntegrityViolationException: CallableStatementCallback; SQL [{call insertvds_interface(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: value too long for type character varying(20) Where: SQL statement "INSERT INTO vds_interface(addr, bond_name, bond_type, gateway, id, is_bond, bond_opts, mac_addr, name, network_name, speed, subnet, boot_protocol, type, VDS_ID, vlan_id, mtu, bridged) VALUES(v_addr, v_bond_name, v_bond_type, v_gateway, v_id, v_is_bond, v_bond_opts, v_mac_addr, v_name, v_network_name, v_speed, v_subnet, v_boot_protocol, v_type, v_vds_id, v_vlan_id, v_mtu, v_bridged)"
More detailed log: http://pastebin.com/AHD3di5i
VDSM: From git repository commit 8a14b63fbbafbdb9ee7f85a9b702bff310f4f668 oVirt-engine: From git repository comit b24dddf094e08afa6a2032a487b37476318a872d
Any suggestions?
in general, you would need to send a patch to upgrade the scheme to a value longer than 20 characters for a logical network name. 1. I think bridge name is linux is limited to 15 characters, so not sure actually why 20 are allowed today. danken?
No idea why it's 20.. IIRC vdsm silently ignore the trailing chars past the 15th.
I opened a BZ on this -
https://bugzilla.redhat.com/show_bug.cgi?id=821172 "VM network name should be limited to 15 chars "
Livnat
2. if changing the db scheme of the engine, also need to remember to upgrade the history db as well. 3. if different network implementation can support varying lengths, need to add validations in engine ("CanDoAction") to check the length per type of network implementation.
_______________________________________________ Engine-devel mailing list Engine-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-devel
participants (5)
-
Dan Kenigsberg
-
Itamar Heim
-
Itzik Brown
-
Livnat Peer
-
Yair Zaslavsky