Bug 1256026 - [UI] Detach attach storage domain doesn't clear job tasks
[UI] Detach attach storage domain doesn't clear job tasks
Status: CLOSED DUPLICATE of bug 1254230
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.6.0
Unspecified Unspecified
unspecified Severity medium
: ovirt-3.6.3
: 3.6.0
Assigned To: Tal Nisan
storage
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-23 08:12 EDT by Ori Gofen
Modified: 2016-05-25 21:50 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-25 06:16:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Storage
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
log+pic (2.51 MB, application/x-gzip)
2015-08-25 04:28 EDT, Ori Gofen
no flags Details

  None (edit)
Description Ori Gofen 2015-08-23 08:12:18 EDT
Description of problem:
When detaching a storage domain, and then attaching it back to a datacenter, the
Tasks table at Rhevm-webadmin toggles at a certain interval from 0 to 2 tasks.

Version-Release number of selected component (if applicable):
rhevm-cli-3.6.0.0-0.3.20150623git53408f5.el6ev.noarch

How reproducible:
100%

Steps to Reproduce:
1.detach a storage domain
2.attach the storage domain back to a datacenter
3.refresh the web-admin page and wait for 5 seconds

Actual results:
The Tasks table shows 2 tasks pending

Expected results:
No Tasks that are done will be shown

Additional info:
Comment 1 Tal Nisan 2015-08-24 05:07:06 EDT
Please attach logs and screenshot
Comment 2 Ori Gofen 2015-08-25 04:28:53 EDT
Created attachment 1066777 [details]
log+pic
Comment 3 Allon Mureinik 2015-08-25 06:16:43 EDT
Seems to be related to the recent changes in job persistence:

2015-08-23 16:12:43,700 ERROR [org.ovirt.engine.core.bll.job.ExecutionHandler] (org.ovirt.thread.pool-7-thread-22) [33e54478] Exception: java.lang.RuntimeException: Failed managing transaction
	at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:232) [utils.jar:]
	at org.ovirt.engine.core.bll.job.JobRepositoryImpl.updateExistingStepAndSaveNewStep(JobRepositoryImpl.java:133) [bll.jar:]
	at org.ovirt.engine.core.bll.job.ExecutionHandler.startFinalizingStep(ExecutionHandler.java:674) [bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.startFinalizingStep(CommandBase.java:508) [bll.jar:]
	at org.ovirt.engine.core.bll.CommandBase.endAction(CommandBase.java:513) [bll.jar:]
	at org.ovirt.engine.core.bll.tasks.DecoratedCommand.endAction(DecoratedCommand.java:17) [bll.jar:]
	at org.ovirt.engine.core.bll.tasks.CoCoAsyncTaskHelper.endAction(CoCoAsyncTaskHelper.java:347) [bll.jar:]
	at org.ovirt.engine.core.bll.tasks.CommandCoordinatorImpl.endAction(CommandCoordinatorImpl.java:415) [bll.jar:]
	at org.ovirt.engine.core.bll.tasks.CommandAsyncTask.endCommandAction(CommandAsyncTask.java:168) [bll.jar:]
	at org.ovirt.engine.core.bll.tasks.CommandAsyncTask.access$000(CommandAsyncTask.java:30) [bll.jar:]
	at org.ovirt.engine.core.bll.tasks.CommandAsyncTask$1.run(CommandAsyncTask.java:111) [bll.jar:]
	at org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:92) [utils.jar:]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_51]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]
Caused by: javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1201)
	at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
	at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
	at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInNewTransaction(TransactionSupport.java:227) [utils.jar:]
	... 16 more
Caused by: javax.persistence.PersistenceException: org.hibernate.exception.LockAcquisitionException: could not execute batch
	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) [hibernate-entitymanager.jar:4.2.20.Final-redhat-1]
	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1310) [hibernate-entitymanager.jar:4.2.20.Final-redhat-1]
	at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1316) [hibernate-entitymanager.jar:4.2.20.Final-redhat-1]
	at org.hibernate.ejb.AbstractEntityManagerImpl$CallbackExceptionMapperImpl.mapManagedFlushFailure(AbstractEntityManagerImpl.java:1510) [hibernate-entitymanager.jar:4.2.20.Final-redhat-1]
	at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:114) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76)
	at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273)
	at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
	at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1189)
	... 19 more
Caused by: org.hibernate.exception.LockAcquisitionException: could not execute batch
	at org.hibernate.dialect.PostgreSQL81Dialect$2.convert(PostgreSQL81Dialect.java:388) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:122) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.doExecuteBatch(BatchingBatch.java:101) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl.execute(AbstractBatchImpl.java:161) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.getBatch(JdbcCoordinatorImpl.java:196) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3187) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3138) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3468) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:304) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1195) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) [hibernate-core.jar:4.2.20.Final-redhat-1]
	at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.beforeCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:109) [hibernate-core.jar:4.2.20.Final-redhat-1]
	... 25 more
Caused by: java.sql.BatchUpdateException: Batch entry 0 update job set action_type='AddVmPoolWithVms', is_auto_cleared='1', correlation_id='8052dca', description='Creating VM Pool pool from template t1', end_time=NULL, is_external='0', visible='1', last_update_time='2015-08-23 16:12:42.631000 +03:00:00', owner_id='00000018-0018-0018-0018-0000000000c8', start_time='2015-08-23 16:12:33.767000 +03:00:00', status='STARTED' where job_id='598f30a6-fd37-492f-a2e2-8450db657e95' was aborted.  Call getNextException to see the cause.
	at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2619)
	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:405)
	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2752)
	at org.jboss.jca.adapters.jdbc.CachedPreparedStatement.executeBatch(CachedPreparedStatement.java:708)
	at org.jboss.jca.adapters.jdbc.WrappedStatement.executeBatch(WrappedStatement.java:1077)
	at org.hibernate.engine.jdbc.batch.internal.BatchingBatch.performExecution(BatchingBatch.java:113) [hibernate-core.jar:4.2.20.Final-redhat-1]

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

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