| Summary: | ovirt-engine-core: force remove of DC fails if storage domain has template residing on it | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Retired] oVirt | Reporter: | Dafna Ron <dron> | ||||
| Component: | ovirt-engine-core | Assignee: | Nobody's working on this, feel free to take it <nobody> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | unspecified | CC: | abaron, acathrow, amureini, iheim, ykaul, yzaslavs | ||||
| Target Milestone: | --- | ||||||
| Target Release: | 3.3.4 | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | storage | ||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2012-12-12 07:36:28 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | Storage | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug. |
Created attachment 559997 [details] log Description of problem: force remove DC will fail when there are template on storage domain. Version-Release number of selected component (if applicable): ovirt-engine-backend-3.0.0_0001-1.4.fc16.x86_64 How reproducible: 100% Steps to Reproduce: 1. create DC with one domain+vm+template on it 2. put domain in maintenance 3. try to force remove the DC Actual results: remove will fail Expected results: we should be able to remove Additional info: full log attached 2012-02-07 18:02:16,402 INFO [org.ovirt.engine.core.utils.transaction.TransactionSupport] (http--0.0.0.0-8080-5) transaction rolled back 2012-02-07 18:02:16,402 ERROR [org.ovirt.engine.core.bll.storage.RemoveStoragePoolCommand] (http--0.0.0.0-8080-5) Command org.ovirt.engine.core.bll.storage.RemoveStoragePoolCommand throw exception: org.springframework.dao.DataIntegrityVi olationException: CallableStatementCallback; SQL [{call force_delete_storage_domain(?)}]; ERROR: update or delete on table "image_templates" violates foreign key constraint "image_templates_vm_template_image_map" on table "vm_template_im age_map" Detail: Key (it_guid)=(00000000-0000-0000-0000-000000000000) is still referenced from table "vm_template_image_map". Where: SQL statement "delete FROM image_templates where it_guid in(select it_guid from tt_TEMPTEMPLATEIMAGESTABLE)" PL/pgSQL function "force_delete_storage_domain" line 45 at SQL statement; nested exception is org.postgresql.util.PSQLException: ERROR: update or delete on table "image_templates" violates foreign key constraint "image_templates_vm_templ ate_image_map" on table "vm_template_image_map" Detail: Key (it_guid)=(00000000-0000-0000-0000-000000000000) is still referenced from table "vm_template_image_map". Where: SQL statement "delete FROM image_templates where it_guid in(select it_guid from tt_TEMPTEMPLATEIMAGESTABLE)" PL/pgSQL function "force_delete_storage_domain" line 45 at SQL statement at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:228) [spring-jdbc-2.5.6.SEC02.jar:] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72) [spring-jdbc-2.5.6.SEC02.jar:] at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:952) [spring-jdbc-2.5.6.SEC02.jar:] at org.springframework.jdbc.core.JdbcTemplate.call(JdbcTemplate.java:985) [spring-jdbc-2.5.6.SEC02.jar:] at org.springframework.jdbc.core.simple.AbstractJdbcCall.executeCallInternal(AbstractJdbcCall.java:368) [spring-jdbc-2.5.6.SEC02.jar:] at org.springframework.jdbc.core.simple.AbstractJdbcCall.doExecute(AbstractJdbcCall.java:342) [spring-jdbc-2.5.6.SEC02.jar:] at org.springframework.jdbc.core.simple.SimpleJdbcCall.execute(SimpleJdbcCall.java:164) [spring-jdbc-2.5.6.SEC02.jar:] at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeImpl(SimpleJdbcCallsHandler.java:112) [engine-dal.jar:] at org.ovirt.engine.core.dal.dbbroker.SimpleJdbcCallsHandler.executeModification(SimpleJdbcCallsHandler.java:39) [engine-dal.jar:] at org.ovirt.engine.core.dao.StorageDomainDAODbFacadeImpl.remove(StorageDomainDAODbFacadeImpl.java:144) [engine-dal.jar:] at org.ovirt.engine.core.bll.storage.RemoveStoragePoolCommand$10.runInTransaction(RemoveStoragePoolCommand.java:262) [engine-bll.jar:] at org.ovirt.engine.core.bll.storage.RemoveStoragePoolCommand$10.runInTransaction(RemoveStoragePoolCommand.java:253) [engine-bll.jar:] at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:204) [utils-3.0.0-0001.jar:] at org.ovirt.engine.core.bll.storage.RemoveStoragePoolCommand.removeDomainFromDb(RemoveStoragePoolCommand.java:253) [engine-bll.jar:] at org.ovirt.engine.core.bll.storage.RemoveStoragePoolCommand.forceRemoveStorageDomains(RemoveStoragePoolCommand.java:121) [engine-bll.jar:] at org.ovirt.engine.core.bll.storage.RemoveStoragePoolCommand.executeCommand(RemoveStoragePoolCommand.java:74) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.ExecuteWithoutTransaction(CommandBase.java:617) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:709) [engine-bll.jar:] at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:978) [engine-bll.jar:]