You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2013/11/22 19:45:36 UTC

git commit: updated refs/heads/4.3 to 44a8151

Updated Branches:
  refs/heads/4.3 43119bcbd -> 44a81519c


CLOUDSTACK-5246:Xenserver - Hourly Snapshots - Creating snapshot from
ROOT volume fails with NullPointer Exception due to new jobs framework
merge.


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

Branch: refs/heads/4.3
Commit: 44a81519ce44aa1cab7ca17dcecb52d79e018cd7
Parents: 43119bc
Author: Min Chen <mi...@citrix.com>
Authored: Fri Nov 22 10:44:50 2013 -0800
Committer: Min Chen <mi...@citrix.com>
Committed: Fri Nov 22 10:45:24 2013 -0800

----------------------------------------------------------------------
 server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/44a81519/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java
index 15e9cd3..a113558 100644
--- a/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java
+++ b/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java
@@ -34,6 +34,7 @@ import org.springframework.stereotype.Component;
 import org.apache.cloudstack.api.ApiConstants;
 import org.apache.cloudstack.api.command.user.snapshot.CreateSnapshotCmd;
 import org.apache.cloudstack.framework.config.dao.ConfigurationDao;
+import org.apache.cloudstack.framework.jobs.AsyncJobDispatcher;
 import org.apache.cloudstack.framework.jobs.AsyncJobManager;
 import org.apache.cloudstack.framework.jobs.dao.AsyncJobDao;
 import org.apache.cloudstack.framework.jobs.impl.AsyncJobVO;
@@ -71,6 +72,8 @@ public class SnapshotSchedulerImpl extends ManagerBase implements SnapshotSchedu
 
     @Inject
     protected AsyncJobDao _asyncJobDao;
+    @Inject
+    protected AsyncJobDispatcher _asyncDispatcher;
     @Inject protected SnapshotDao             _snapshotDao;
     @Inject protected SnapshotScheduleDao     _snapshotScheduleDao;
     @Inject protected SnapshotPolicyDao       _snapshotPolicyDao;
@@ -252,6 +255,7 @@ public class SnapshotSchedulerImpl extends ManagerBase implements SnapshotSchedu
                 AsyncJobVO job = new AsyncJobVO(UUID.randomUUID().toString(), User.UID_SYSTEM, volume.getAccountId(), CreateSnapshotCmd.class.getName(),
                         ApiGsonHelper.getBuilder().create().toJson(params), cmd.getEntityId(),
                         cmd.getInstanceType() != null ? cmd.getInstanceType().toString() : null);
+                job.setDispatcher(_asyncDispatcher.getName());
 
                 long jobId = _asyncMgr.submitAsyncJob(job);