You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "Kishan Kavala (JIRA)" <ji...@apache.org> on 2013/07/25 13:15:49 UTC
[jira] [Assigned] (CLOUDSTACK-3038) [Object_Store_Refactor]
Deleting account fails when there are snapshots present on primary for this
account
[ https://issues.apache.org/jira/browse/CLOUDSTACK-3038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kishan Kavala reassigned CLOUDSTACK-3038:
-----------------------------------------
Assignee: Kishan Kavala (was: edison su)
> [Object_Store_Refactor] Deleting account fails when there are snapshots present on primary for this account
> -----------------------------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-3038
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3038
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the default.)
> Components: Management Server
> Affects Versions: 4.2.0
> Environment: Latest build on object_store branch
> Reporter: Sanjeev N
> Assignee: Kishan Kavala
> Priority: Critical
> Fix For: 4.2.0
>
> Attachments: management-server.rar
>
>
> Deleting account fails when there are snapshots present on primary for this account
> Steps to Reproduce:
> =================
> 1.Bring up CS in advanced zone with S3 as the secondary storage provider
> 2.Create a domain-admin account
> 3.With the domain-admin created at step2 deploy guest vms using the default cent os templates downloaded to S3
> 3.Create Manual/Recurring snapshots on the root/data disk of the guest vms(Snapshot will be created on primary but backing up to secondary will fail which is a know issue)
> 4. Delete the domain-admin account
> Observations:
> ===========
> Account creation failed with DB Exceptions. Following is the log snippet from management server log:
> 2013-06-17 10:27:17,911 DEBUG [cloud.async.AsyncJobManagerImpl] (Job-Executor-86:job-94) Executing org.apache.cloudstack.api.command.admin.account.DeleteAccountCmd for job-94
> 2013-06-17 10:27:17,981 DEBUG [cloud.user.AccountManagerImpl] (Job-Executor-86:job-94) Removed account 7
> 2013-06-17 10:27:17,998 DEBUG [agent.transport.Request] (Job-Executor-86:job-94) Seq 4-1483016562: Sending { Cmd , MgmtId: 6615759585382, via: 4, Ver: v1, Flags: 100111, [{"com.cloud.agent.api.DeleteSnapshotsDirCommand":{"store":{"com.cloud.agent.api.to.S3TO":{"id":1,"uuid":"9eb0800d-41ab-4338-a449-cd4624a7fe19","accessKey":"9M7I6JPYZHDNLG43TWCD","secretKey":"KL7IAVYcYO8URicgniNjeCmL7k3tYKMpJRXNHw==","endPoint":"10.147.29.57:8080","bucketName":"imagestore","httpsFlag":false,"created":"Jun 14, 2013 8:00:03 AM"}},"directory":"snapshots/7/5","wait":0}}] }
> 2013-06-17 10:27:18,099 DEBUG [agent.transport.Request] (AgentManager-Handler-15:null) Seq 4-1483016562: Processing: { Ans: , MgmtId: 6615759585382, via: 4, Ver: v1, Flags: 110, [{"com.cloud.agent.api.Answer":{"result":true,"details":"Deleted snapshot %s from bucket imagestore.","wait":0}}] }
> 2013-06-17 10:27:18,099 DEBUG [agent.manager.AgentAttache] (AgentManager-Handler-15:null) Seq 4-1483016562: No more commands found
> 2013-06-17 10:27:18,099 DEBUG [agent.transport.Request] (Job-Executor-86:job-94) Seq 4-1483016562: Received: { Ans: , MgmtId: 6615759585382, via: 4, Ver: v1, Flags: 110, { Answer } }
> 2013-06-17 10:27:18,099 DEBUG [storage.snapshot.SnapshotManagerImpl] (Job-Executor-86:job-94) Deleted all snapshots for volume: 5 under account: 7
> 2013-06-17 10:27:18,102 DEBUG [db.Transaction.Transaction] (Job-Executor-86:job-94) Rolling back the transaction: Time = 2 Name = -AsyncJobManagerImpl$1.run:401-Executors$RunnableAdapter.call:471-FutureTask$Sync.innerRun:334-FutureTask.run:166-ThreadPoolExecutor.runWorker:1110-ThreadPoolExecutor$Worker.run:603-Thread.run:679; called by -Transaction.rollback:890-Transaction.removeUpTo:833-Transaction.close:657-TransactionContextBuilder.interceptException:63-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:133-SnapshotManagerImpl.deleteSnapshotDirsForAccount:688-AccountManagerImpl.cleanupAccount:581-AccountManagerImpl.deleteAccount:544-AccountManagerImpl.deleteUserAccount:1255-ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept:125-RegionManagerImpl.deleteUserAccount:177-RegionServiceImpl.deleteUserAccount:118
> 2013-06-17 10:27:18,104 WARN [cloud.user.AccountManagerImpl] (Job-Executor-86:job-94) Failed to cleanup account Acct[7-test-WA24HE] due to
> com.cloud.utils.exception.CloudRuntimeException: DB Exception on: com.mysql.jdbc.JDBC4PreparedStatement@39a10f0: DELETE FROM snapshots WHERE snapshots.id= 1
> at com.cloud.utils.db.GenericDaoBase.expunge(GenericDaoBase.java:1137)
> at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at com.cloud.storage.snapshot.SnapshotManagerImpl.deleteSnapshotDirsForAccount(SnapshotManagerImpl.java:688)
> at com.cloud.user.AccountManagerImpl.cleanupAccount(AccountManagerImpl.java:581)
> at com.cloud.user.AccountManagerImpl.deleteAccount(AccountManagerImpl.java:544)
> at com.cloud.user.AccountManagerImpl.deleteUserAccount(AccountManagerImpl.java:1255)
> at com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125)
> at org.apache.cloudstack.region.RegionManagerImpl.deleteUserAccount(RegionManagerImpl.java:177)
> at org.apache.cloudstack.region.RegionServiceImpl.deleteUserAccount(RegionServiceImpl.java:118)
> at org.apache.cloudstack.api.command.admin.account.DeleteAccountCmd.execute(DeleteAccountCmd.java:100)
> at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:155)
> at com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:437)
> at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:679)
> Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot delete or update a parent row: a foreign key constraint fails (`cloud`.`snapshot_store_ref`, CONSTRAINT `fk_snapshot_store_ref__snapshot_id` FOREIGN KEY (`snapshot_id`) REFERENCES `snapshots` (`id`))
> at sun.reflect.GeneratedConstructorAccessor235.newInstance(Unknown Source)
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
> at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
> at com.mysql.jdbc.Util.getInstance(Util.java:386)
> at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1040)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
> at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
> at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
> at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
> at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
> at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
> at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2450)
> at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2371)
> at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2355)
> at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Del
> at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(Del
> at com.cloud.utils.db.GenericDaoBase.expunge(GenericDaoBase.java:1128)
> ... 25 more
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira