Bug 893361

Summary: [rhevm-backend] - Error for Windows guests which report unbounded value as interface name
Product: Red Hat Enterprise Virtualization Manager Reporter: David Botzer <dbotzer>
Component: ovirt-engineAssignee: Moti Asayag <masayag>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Pavlik <mpavlik>
Severity: high Docs Contact:
Priority: high    
Version: 3.2.0CC: dyasny, gklein, iheim, lpeer, masayag, mkolesni, pstehlik, Rhev-m-bugs, sgrinber, yeylon, ykaul
Target Milestone: ---Keywords: Regression
Target Release: 3.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: network
Fixed In Version: SF4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Network RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 915537    
Attachments:
Description Flags
Windows Guest Error none

Description David Botzer 2013-01-09 08:18:56 UTC
Created attachment 675301 [details]
Windows Guest Error

Description of problem:
Error for Windows guests which report unbounded value as
interface name
netIfaces = [{'name': 'Red Hat VirtIO Ethernet Adapter - Packet
Scheduler Miniport', 'inet6': [], 'inet': ['10.16.34.154'], 'hw':
'00-1a-4a-23-61-69'}] 

Version-Release number of selected component (if applicable):
3.2/sf3

How reproducible:
always

Steps to Reproduce:
1.install 3.2 sf3, and add VMs - Windows & RHEL
2.examine the engine log for errors
  
Actual results:
Gives exception in log:
PSQLException: ERROR: value too long for type character varying(50)

Expected results:
should have this error

Additional info:
Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(50)
  Where: SQL statement "INSERT INTO vm_guest_agent_interfaces(vm_id, interface_name, mac_address, ipv4_addresses, ipv6_addresses) VALUES( $1 ,  $2 ,  $3 ,  $4 ,  $5 )"
PL/pgSQL function "insertvmguestagentinterface" line 2 at SQL statement
        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:360)
        at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.execute(CachedPreparedStatement.java:297)
        at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:404)
        at org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1066) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1014) [spring-jdbc-3.1.1.RELEASE.jar:3.1.1.RELEASE]
        ... 22 more

Comment 1 David Botzer 2013-01-09 12:07:03 UTC
Eli Mesika says:
Then column type in DB should be changed to text ...

Comment 3 David Botzer 2013-01-10 06:21:09 UTC
Regression

Comment 6 David Botzer 2013-01-10 08:17:02 UTC
Moti,
U know better than me, if u say netIfaces is 3.2 feature, than its not regression,
Thanks,

Comment 8 Mike Kolesnik 2013-01-10 15:45:07 UTC
(In reply to comment #1)
> Eli Mesika says:
> Then column type in DB should be changed to text ...

I disagree that this is the best solution, we need to decide what's the maximal interface name that will be supported and if it's bigger truncate.
I don't think a NIC's name can be 2GB in size so no need to have it at that

Comment 9 Simon Grinberg 2013-01-17 11:53:07 UTC
(In reply to comment #8)
> (In reply to comment #1)
> > Eli Mesika says:
> > Then column type in DB should be changed to text ...
> 
> I disagree that this is the best solution, we need to decide what's the
> maximal interface name that will be supported and if it's bigger truncate.
> I don't think a NIC's name can be 2GB in size so no need to have it at that

Is there a limit in Windows for that? Id so then please use max(windows,linux) as the upper bound.

Comment 10 Martin Pavlik 2013-01-28 14:34:51 UTC
works in SF4

Comment 11 Itamar Heim 2013-06-11 09:29:15 UTC
3.2 has been released

Comment 12 Itamar Heim 2013-06-11 09:32:02 UTC
3.2 has been released

Comment 13 Itamar Heim 2013-06-11 09:47:51 UTC
3.2 has been released