Bug 1289855 - [engine-backend] Disk creation with long alias fails with PSQLException
[engine-backend] Disk creation with long alias fails with PSQLException
Status: CLOSED DUPLICATE of bug 1280358
Product: ovirt-engine
Classification: oVirt
Component: BLL.Storage (Show other bugs)
3.6.1.1
x86_64 Unspecified
unspecified Severity high (vote)
: ovirt-4.0.0-alpha
: ---
Assigned To: Idan Shaby
Aharon Canan
storage
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-09 03:14 EST by Elad
Modified: 2016-02-10 13:50 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-10 01:38:22 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
amureini: ovirt‑4.0.0?
ebenahar: planning_ack?
ebenahar: devel_ack?
ebenahar: testing_ack?


Attachments (Terms of Use)
engine.log, server.log, vdsm.log (661.43 KB, application/x-gzip)
2015-12-09 03:14 EST, Elad
no flags Details

  None (edit)
Description Elad 2015-12-09 03:14:18 EST
Created attachment 1103807 [details]
engine.log, server.log, vdsm.log

Description of problem:
Tried to create a disk with 420 characters long alias and it failed with PSQLException in engine.log and "Internal Engine Error" in Webadmin

Version-Release number of selected component (if applicable):
rhevm-3.6.1.1-0.1.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. From Webadmin, create a disk with more then 255 characters alias 


Actual results:
Disk creation fails on engine.
Webadmin:
"
Operation Canceled
Error while executing action Add Disk to VM: Internal Engine Error
"


engine.log:

2015-12-09 07:52:35,552 INFO  [org.ovirt.engine.core.bll.AddImageFromScratchCommand] (ajp-/127.0.0.1:8702-11) [c2d1b05] Running command: AddImageFromScratchCommand internal: true. Entities affected :  ID: 504c7595
-7ca5-459c-be6f-44a3d7f1b5d7 Type: Storage
2015-12-09 07:52:35,566 INFO  [org.ovirt.engine.core.utils.transaction.TransactionSupport] (ajp-/127.0.0.1:8702-11) [c2d1b05] transaction rolled back
2015-12-09 07:52:35,567 ERROR [org.ovirt.engine.core.bll.AddImageFromScratchCommand] (ajp-/127.0.0.1:8702-11) [c2d1b05] Command 'org.ovirt.engine.core.bll.AddImageFromScratchCommand' failed: CallableStatementCallb
ack; SQL [{call insertbasedisk(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: value too long for type character varying(255)
  Where: SQL statement "INSERT INTO base_disks( disk_id, disk_interface, wipe_after_delete, propagate_errors, disk_alias, disk_description, shareable, boot, sgio, alignment, last_alignment_scan, disk_storage_type,
 cinder_volume_type) VALUES(  $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 ,  $7 ,  $8 ,  $9 ,  $10 ,  $11 ,  $12 ,  $13 )"
PL/pgSQL function "insertbasedisk" line 2 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: value too long for type character varying(255)
  Where: SQL statement "INSERT INTO base_disks( disk_id, disk_interface, wipe_after_delete, propagate_errors, disk_alias, disk_description, shareable, boot, sgio, alignment, last_alignment_scan, disk_storage_type,
 cinder_volume_type) VALUES(  $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 ,  $7 ,  $8 ,  $9 ,  $10 ,  $11 ,  $12 ,  $13 )"
PL/pgSQL function "insertbasedisk" line 2 at SQL statement
2015-12-09 07:52:35,567 ERROR [org.ovirt.engine.core.bll.AddImageFromScratchCommand] (ajp-/127.0.0.1:8702-11) [c2d1b05] Exception: org.springframework.dao.DataIntegrityViolationException: CallableStatementCallback
; SQL [{call insertbasedisk(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: value too long for type character varying(255)
  Where: SQL statement "INSERT INTO base_disks( disk_id, disk_interface, wipe_after_delete, propagate_errors, disk_alias, disk_description, shareable, boot, sgio, alignment, last_alignment_scan, disk_storage_type,
 cinder_volume_type) VALUES(  $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 ,  $7 ,  $8 ,  $9 ,  $10 ,  $11 ,  $12 ,  $13 )"
PL/pgSQL function "insertbasedisk" line 2 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: value too long for type character varying(255)
  Where: SQL statement "INSERT INTO base_disks( disk_id, disk_interface, wipe_after_delete, propagate_errors, disk_alias, disk_description, shareable, boot, sgio, alignment, last_alignment_scan, disk_storage_type, cinder_volume_type) VALUES(  $1 ,  $2 ,  $3 ,  $4 ,  $5 ,  $6 ,  $7 ,  $8 ,  $9 ,  $10 ,  $11 ,  $12 ,  $13 )"
PL/pgSQL function "insertbasedisk" line 2 at SQL statement
        at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:101) [spring-jdbc.jar:3.1.1.RELEASE]
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) [spring-jdbc.jar:3.1.1.RELEASE]
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80) [spring-jdbc.jar:3.1.1.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1030) [spring-jdbc.jar:3.1.1.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1064) [spring-jdbc.jar:3.1.1.RELEASE]
        at org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:388) [spring-jdbc.jar:3.1.1.RELEASE]
        at org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:351) [spring-jdbc.jar:3.1.1.RELEASE]
        at org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:181) [spring-jdbc.jar:3.1.1.RELEASE]



Expected results:
Disk creation should succeed or be blocked with a proper message.

Additional info:
engine.log, server.log, vdsm.log
Comment 1 Allon Mureinik 2015-12-09 07:42:10 EST
Idan, is this a dup of bug 1280358?
Comment 2 Idan Shaby 2015-12-10 01:38:22 EST
Yes, it is.
Bug 1280358 talks about the alias and description size verification, while this one is only about the alias.
Closing as duplicate.

*** This bug has been marked as a duplicate of bug 1280358 ***

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