cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/master to 392eaf3
Date Sat, 08 Nov 2014 00:34:51 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master d065bcf9b -> 392eaf3e5


Revert "BUG-ID: CS-27191: CPVM continues to be in Stopped state after a failure"

This reverts commit d065bcf9b45d9bec8e9a481cf6092967d5107a9e.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/392eaf3e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/392eaf3e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/392eaf3e

Branch: refs/heads/master
Commit: 392eaf3e56e667f210e6e0599442f22669a9c07d
Parents: d065bcf
Author: Min Chen <min.chen@citrix.com>
Authored: Fri Nov 7 16:32:42 2014 -0800
Committer: Min Chen <min.chen@citrix.com>
Committed: Fri Nov 7 16:33:45 2014 -0800

----------------------------------------------------------------------
 .../framework/jobs/dao/AsyncJobDao.java         |  2 --
 .../framework/jobs/dao/AsyncJobDaoImpl.java     | 20 --------------------
 .../jobs/impl/AsyncJobManagerImpl.java          | 14 ++------------
 3 files changed, 2 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/392eaf3e/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/AsyncJobDao.java
----------------------------------------------------------------------
diff --git a/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/AsyncJobDao.java
b/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/AsyncJobDao.java
index 169cae9..170da50 100644
--- a/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/AsyncJobDao.java
+++ b/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/AsyncJobDao.java
@@ -39,6 +39,4 @@ public interface AsyncJobDao extends GenericDao<AsyncJobVO, Long>
{
     void resetJobProcess(long msid, int jobResultCode, String jobResultMessage);
 
     List<AsyncJobVO> getExpiredCompletedJobs(Date cutTime, int limit);
-
-    List<AsyncJobVO> getResetJobs(long msid);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/392eaf3e/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/AsyncJobDaoImpl.java
----------------------------------------------------------------------
diff --git a/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/AsyncJobDaoImpl.java
b/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/AsyncJobDaoImpl.java
index 0d024eb..612573f 100644
--- a/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/AsyncJobDaoImpl.java
+++ b/framework/jobs/src/org/apache/cloudstack/framework/jobs/dao/AsyncJobDaoImpl.java
@@ -186,24 +186,4 @@ public class AsyncJobDaoImpl extends GenericDaoBase<AsyncJobVO, Long>
implements
             s_logger.warn("Unable to reset job status for management server " + msid, e);
         }
     }
-
-    @Override
-    public List<AsyncJobVO> getResetJobs(long msid) {
-        SearchCriteria<AsyncJobVO> sc = pendingAsyncJobSearch.create();
-        sc.setParameters("status", JobInfo.Status.IN_PROGRESS);
-
-        // construct query: (job_executing_msid=msid OR (job_executing_msid IS NULL AND job_init_msid=msid))
-        SearchCriteria<AsyncJobVO> msQuery = createSearchCriteria();
-        msQuery.addOr("executingMsid", SearchCriteria.Op.EQ, msid);
-        SearchCriteria<AsyncJobVO> initMsQuery = createSearchCriteria();
-        initMsQuery.addAnd("executingMsid", SearchCriteria.Op.NULL);
-        initMsQuery.addAnd("initMsid", SearchCriteria.Op.EQ, msid);
-        msQuery.addOr("initMsId", SearchCriteria.Op.SC, initMsQuery);
-
-        sc.addAnd("executingMsid", SearchCriteria.Op.SC, msQuery);
-
-        Filter filter = new Filter(AsyncJobVO.class, "created", true, null, null);
-        return listIncludingRemovedBy(sc, filter);
-
-    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/392eaf3e/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
----------------------------------------------------------------------
diff --git a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
index 91516d5..548182a 100644
--- a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
+++ b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java
@@ -232,8 +232,7 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
                 s_logger.debug("job-" + jobId + " no longer exists, we just log completion
info here. " + jobStatus + ", resultCode: " + resultCode + ", result: " +
                     resultObject);
             }
-            // still purge item from queue to avoid any blocking
-            _queueMgr.purgeAsyncJobQueueItemId(jobId);
+
             return;
         }
 
@@ -241,8 +240,7 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
             if (s_logger.isDebugEnabled()) {
                 s_logger.debug("job-" + jobId + " is already completed.");
             }
-            // still purge item from queue to avoid any blocking
-            _queueMgr.purgeAsyncJobQueueItemId(jobId);
+
             return;
         }
 
@@ -549,8 +547,6 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
                     // guard final clause as well
                     try {
                         if (job.getSyncSource() != null) {
-                            // here check queue item one more time to double make sure that
queue item is removed in case of any uncaught exception
-                            _queueMgr.purgeItem(job.getSyncSource().getId());
                             checkQueue(job.getSyncSource().getQueueId());
                         }
 
@@ -980,12 +976,6 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
                     _queueMgr.cleanupActiveQueueItems(msid, true);
                     // reset job status for all jobs running on this ms node
                     _jobDao.resetJobProcess(msid, ApiErrorCode.INTERNAL_ERROR.getHttpCode(),
"job cancelled because of management server restart or shutdown");
-                    // purge those queue items for those cancelled jobs above, which may
not be picked up by any MS node yet
-                    List<AsyncJobVO> cancelJobs = _jobDao.getResetJobs(msid);
-                    for (AsyncJobVO job : cancelJobs){
-                        _queueMgr.purgeAsyncJobQueueItemId(job.getId());
-                    }
-
                 }
             });
         } catch (Throwable e) {


Mime
View raw message