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
(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
(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.
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