You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mu...@apache.org on 2014/05/20 13:44:29 UTC

[1/2] git commit: updated refs/heads/master to 6f2a193

Repository: cloudstack
Updated Branches:
  refs/heads/master 2b325afb4 -> 6f2a193b7


CLOUDSTACK-6721: VolumeApiServiceImpl is sending wrong type for
updateAsyncJobAttachment

fix sends 'Volume' instead of 'volume'

Conflicts:
	server/src/com/cloud/storage/VolumeApiServiceImpl.java


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

Branch: refs/heads/master
Commit: 17fe6cdda4fd7452554c5ceac8724a76a99a477c
Parents: 2b325af
Author: Murali Reddy <mu...@gmail.com>
Authored: Tue May 20 16:56:03 2014 +0530
Committer: Murali Reddy <mu...@gmail.com>
Committed: Tue May 20 17:13:20 2014 +0530

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeApiServiceImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/17fe6cdd/server/src/com/cloud/storage/VolumeApiServiceImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeApiServiceImpl.java b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
index 5778725..06773c7 100644
--- a/server/src/com/cloud/storage/VolumeApiServiceImpl.java
+++ b/server/src/com/cloud/storage/VolumeApiServiceImpl.java
@@ -1227,7 +1227,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
                 s_logger.info("Trying to attaching volume " + volumeId + " to vm instance:" + vm.getId() + ", update async job-" + job.getId() + " progress status");
             }
 
-            _jobMgr.updateAsyncJobAttachment(job.getId(), "volume", volumeId);
+            _jobMgr.updateAsyncJobAttachment(job.getId(), "Volume", volumeId);
         }
 
         VolumeVO newVol = _volsDao.findById(newVolumeOnPrimaryStorage.getId());
@@ -1399,7 +1399,7 @@ public class VolumeApiServiceImpl extends ManagerBase implements VolumeApiServic
                 s_logger.info("Trying to attaching volume " + volumeId + "to vm instance:" + vm.getId() + ", update async job-" + job.getId() + " progress status");
             }
 
-            _jobMgr.updateAsyncJobAttachment(job.getId(), "volume", volumeId);
+            _jobMgr.updateAsyncJobAttachment(job.getId(), "Volume", volumeId);
         }
 
         AsyncJobExecutionContext jobContext = AsyncJobExecutionContext.getCurrentExecutionContext();


[2/2] git commit: updated refs/heads/master to 6f2a193

Posted by mu...@apache.org.
CLOUDSTACK-6720: Async job events are not published on event bus

fix ensures publishOnEventBus() is called on submit, update, complete
phase of job procesing


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

Branch: refs/heads/master
Commit: 6f2a193b7c047a9c9db832dacb3d3105ff1f3a79
Parents: 17fe6cd
Author: Murali Reddy <mu...@gmail.com>
Authored: Tue May 20 16:49:51 2014 +0530
Committer: Murali Reddy <mu...@gmail.com>
Committed: Tue May 20 17:13:58 2014 +0530

----------------------------------------------------------------------
 .../cloudstack/framework/jobs/impl/AsyncJobManagerImpl.java   | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6f2a193b/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 24abcbe..c6dd732 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
@@ -172,6 +172,7 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
         job.setSyncSource(null);        // no sync source originally
         dao.persist(job);
 
+        publishOnEventBus(job, "submit");
         scheduleExecution(job, scheduleJobExecutionInContext);
         if (s_logger.isDebugEnabled()) {
             s_logger.debug("submit async job-" + job.getId() + ", details: " + job.toString());
@@ -193,6 +194,7 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
                     job.setInitMsid(getMsid());
                     dao.persist(job);
 
+                    publishOnEventBus(job, "submit");
                     syncAsyncJobExecution(job, syncObjType, syncObjId, 1);
 
                     return job.getId();
@@ -230,6 +232,7 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
             return;
         }
 
+        publishOnEventBus(job, "complete"); // publish before the instance type and ID are wiped out
         List<Long> wakeupList = Transaction.execute(new TransactionCallback<List<Long>>() {
             @Override
             public List<Long> doInTransaction(TransactionStatus status) {
@@ -287,6 +290,7 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
             return;
         }
 
+        publishOnEventBus(job, "update");
         Transaction.execute(new TransactionCallbackNoReturn() {
             @Override
             public void doInTransactionWithoutResult(TransactionStatus status) {
@@ -307,6 +311,9 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
             s_logger.debug("Update async-job attachment, job-" + jobId + ", instanceType: " + instanceType + ", instanceId: " + instanceId);
         }
 
+        final AsyncJobVO job = _jobDao.findById(jobId);
+        publishOnEventBus(job, "update");
+
         Transaction.execute(new TransactionCallbackNoReturn() {
             @Override
             public void doInTransactionWithoutResult(TransactionStatus status) {