Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1565173 - [downstream clone - 4.1.11] Adding Storage domain with more than 50 character LUN ID succeeds but Storage domain removal fails
Summary: [downstream clone - 4.1.11] Adding Storage domain with more than 50 character...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 4.1.6
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: ovirt-4.1.11
: ---
Assignee: Idan Shaby
QA Contact: Elad
URL:
Whiteboard:
Depends On: 1539914
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-09 14:32 UTC by RHV bug bot
Modified: 2021-06-10 15:45 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1539914
Environment:
Last Closed: 2018-04-24 15:30:28 UTC
oVirt Team: Storage
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:1219 0 None None None 2018-04-24 15:31:17 UTC
oVirt gerrit 89985 0 master MERGED db: enlarge variable size to avoid SQL exception 2018-04-09 14:32:39 UTC
oVirt gerrit 90012 0 ovirt-engine-4.1 MERGED db: enlarge variable size to avoid SQL exception 2018-04-09 15:12:27 UTC

Description RHV bug bot 2018-04-09 14:32:19 UTC
+++ This bug is a downstream clone. The original bug is: +++
+++   bug 1539914 +++
======================================================================

Description of problem:

Adding Storage domain with more than 50 character LUN ID succeeds but Storage domain removal fails

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

RHV 4.1

How reproducible:
100%

Actual results:

No errors received when Adding Storage domain with more than 50 character LUN ID. But Storage domain removal fails with same more than 50 character LUN ID fails with PSQLException: ERROR

Expected results:

If 50 character is a limit then Addition of Storage domain should also be blocked if a LUN ID has more than 50 Characters.

Additional info: 

Below errors are received in engine.log when trying to remove the Storage domain with more than 50 character LUN ID


2018-01-24 11:12:33,549+03 ERROR [org.ovirt.engine.core.bll.storage.domain.RemoveStorageDomainCommand] (default task-45) [Correlation-ID] Command 'org.ovirt.engine.core.bll.storage.domain.RemoveStorageDomainCommand' 
failed: CallableStatementCallback; SQL [{call deletelun(?)}]; ERROR: value too long for type character varying(50)
  Where: PL/pgSQL function deletelun(character varying) line 7 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: value too long for type character varying(50)
  Where: PL/pgSQL function deletelun(character varying) line 7 at SQL statement
2018-01-24 11:12:33,549+03 ERROR [org.ovirt.engine.core.bll.storage.domain.RemoveStorageDomainCommand] (default task-45) [Correlation-ID] Exception: org.springframework.dao.DataIntegrityViolationException: CallableStatementCallback; SQL [{call deletelun(?)}]; ERROR: value too long for type character varying(50)
  Where: PL/pgSQL function deletelun(character varying) line 7 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: value too long for type character varying(50)
  Where: PL/pgSQL function deletelun(character varying) line 7 at SQL statement
        at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQLExceptionTranslator.java:102) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:81) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1094) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:1130) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:405) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:365) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:198) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:135) [dal.jar:]
        at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:130) [dal.jar:]
        at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeModification(SimpleJdbcCallsHandler.java:76) [dal.jar:]
        at org.ovirt.engine.core.dao.LunDaoImpl.remove(LunDaoImpl.java:128) [dal.jar:]
        at org.ovirt.engine.core.dao.LunDaoImpl.remove(LunDaoImpl.java:15) [dal.jar:]
        at org.ovirt.engine.core.bll.storage.connection.StorageHelperBase.removeLunFromStorageDomain(StorageHelperBase.java:154) [bll.jar:]
        at org.ovirt.engine.core.bll.storage.connection.StorageHelperBase.removeStorageDomainLuns(StorageHelperBase.java:145) [bll.jar:]
        at org.ovirt.engine.core.bll.storage.connection.ISCSIStorageHelper.storageDomainRemoved(ISCSIStorageHelper.java:265) [bll.jar:]
        at org.ovirt.engine.core.bll.storage.domain.RemoveStorageDomainCommand.lambda$executeCommand$0(RemoveStorageDomainCommand.java:75) [bll.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:202) [utils.jar:]
        at org.ovirt.engine.core.bll.storage.domain.RemoveStorageDomainCommand.executeCommand(RemoveStorageDomainCommand.java:74) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1251) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1391) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:2055) [bll.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:164) [utils.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:103) [utils.jar:]
        at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1451) [bll.jar:]

Caused by: org.postgresql.util.PSQLException: ERROR: value too long for type character varying(50)
  Where: PL/pgSQL function deletelun(character varying) line 7 at SQL statement

        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:410)
        at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.execute(CachedPreparedStatement.java:303)
        at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.execute(WrappedPreparedStatement.java:442)
        at org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1133) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate$6.doInCallableStatement(JdbcTemplate.java:1130) [spring-jdbc.jar:4.2.4.RELEASE]
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:1078) [spring-jdbc.jar:4.2.4.RELEASE]
        ... 147 more

2018-01-24 11:12:33,565+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (default task-45) [Correlation-ID] EVENT_ID: USER_REMOVE_STORAGE_DOMAIN_FAILED(961), Correlation ID: Correlation-ID, Job ID: job-id, Call Stack: null, Custom ID: null, Custom Event ID: -1, Message: Failed to remove Storage Domain main. (User: admin@internal-authz)

(Originally by Koutuk Shukla)

Comment 7 Elad 2018-04-23 14:45:19 UTC
Cannot test the scenario since it's about LUN id and not the LUN name. 
With the hardware we have in RHV QE (XtremIO, Netapp and targetcli) there is no way (that I could find) to do so.


Moving to VERIFIED based on my review of the change done in the patch attached to this bug and it would be great if the customer could test this in his environment.


Used:
rhevm-4.1.11.2-0.1.el7.noarch
vdsm-4.19.51-1.el7ev.x86_64

Comment 10 errata-xmlrpc 2018-04-24 15:30:28 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1219

Comment 11 Franta Kust 2019-05-16 13:03:54 UTC
BZ<2>Jira Resync


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