Bug 1478717 - Value too long for type character varying(50) for vds_interface
Summary: Value too long for type character varying(50) for vds_interface
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Network
Version: 4.2.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ovirt-4.1.6
: ---
Assignee: Leon Goldberg
QA Contact: Meni Yakove
URL:
Whiteboard:
Depends On:
Blocks: 1458407
TreeView+ depends on / blocked
 
Reported: 2017-08-06 14:12 UTC by Michael Burman
Modified: 2017-09-19 10:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-19 10:03:40 UTC
oVirt Team: Network
Embargoed:
rule-engine: ovirt-4.1+


Attachments (Terms of Use)
engine log (187.90 KB, application/x-gzip)
2017-08-06 14:12 UTC, Michael Burman
no flags Details
vdsm logs (802.23 KB, application/x-gzip)
2017-08-07 08:01 UTC, Michael Burman
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 80340 0 master MERGED packaging: dbscripts: Increase vds_interface's network_name col size. 2017-08-17 08:43:35 UTC
oVirt gerrit 80810 0 ovirt-engine-4.1 MERGED packaging: dbscripts: Increase vds_interface's network_name col size. 2017-08-21 08:01:07 UTC

Description Michael Burman 2017-08-06 14:12:15 UTC
Created attachment 1309652 [details]
engine log

Description of problem:
Value too long for type character varying(50) for vds_interface.

vds_interface can't accept more then 50 characters.
When trying to attach network with more then 50 characters to host we failing with error:

2017-08-06 16:59:36,146+03 ERROR [org.ovirt.engine.core.dal.dbbroker.BatchProcedureExecutionConnectionCallback] (default task-8) [b91a072c-ee57-49d8-956a-084bc4076fc1] Can't execute batch: Batch entry 0 select * f
rom public.updatevds_interface(CAST ('' AS varchar),CAST (NULL AS varchar),CAST (NULL AS int4),CAST ('' AS varchar),CAST ('0' AS bool),CAST (? AS uuid),CAST ('0' AS bool),CAST ('legacy' AS varchar),CAST (NULL AS v
archar),CAST (NULL AS varchar),CAST ('ens1f0.166' AS varchar),CAST ('m1' AS varchar),CAST (NULL AS int4),CAST ('' AS varchar),CAST (0 AS int4),CAST (0 AS int4),CAST (? AS uuid),CAST ('ens1f0' AS varchar),CAST (166
 AS int4),CAST (1500 AS int4),CAST ('1' AS bool),CAST (NULL AS text),CAST (NULL AS varchar),CAST ('::' AS varchar),CAST (NULL AS int4),CAST (0 AS int4),CAST (NULL AS varchar),CAST (NULL AS int4),CAST (NULL AS varc
har)) as result was aborted.  Call getNextException to see the cause.
2017-08-06 16:59:36,147+03 ERROR [org.ovirt.engine.core.dal.dbbroker.BatchProcedureExecutionConnectionCallback] (default task-8) [b91a072c-ee57-49d8-956a-084bc4076fc1] Can't execute batch. Next exception is: ERROR
: value too long for type character varying(50)
  Where: SQL statement "UPDATE vds_interface
    SET addr = v_addr,


Version-Release number of selected component (if applicable):
4.2.0-0.0.master.20170803140556.git1e7d0dd.el7.centos

How reproducible:
100%

Steps to Reproduce:
1. Create network with more then 50 characters name
2. Try to attach the network to a host

Actual results:
db won't accept more then 50 characters

Expected results:
Must work

- Note that this bug must be cloned for 4.1.5 as well

Comment 1 Michael Burman 2017-08-07 06:22:09 UTC
Few notes for this report:

1) On vdsm side i see:
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/vdsm/network/netinfo/cache.py", line 195, in _getNetInfo
    'stp': bridges.stp_state(iface)})
  File "/usr/lib/python2.7/site-packages/vdsm/network/netinfo/bridges.py", line 66, in stp_state
    with open(BRIDGING_OPT % (bridge, 'stp_state')) as stp_file:
IOError: [Errno 2] No such file or directory: '/sys/class/net/one8a4927720a94/bridge/stp_state'

2) Although we failed to attached the network, the bridge appears on the host and vdsm report it. But it is not visible.

3) The only way to remove it from this point is with brctl command

4) Running refresh caps will cause the ovirtmgmt network to be 'undefined' in the engine

Comment 2 Michael Burman 2017-08-07 08:01:43 UTC
Created attachment 1309954 [details]
vdsm logs

Comment 3 Michael Burman 2017-08-28 13:34:46 UTC
Verified on - 4.1.6-0.1.el7


Note You need to log in before you can comment on or make changes to this bug.