cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [3/3] git commit: updated refs/heads/vmsync to bd0c239
Date Tue, 04 Jun 2013 22:29:56 GMT
Added missing call context


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

Branch: refs/heads/vmsync
Commit: bd0c239f6826c9fa0892e01d2499619a960641be
Parents: dd11254
Author: Alex Huang <alex.huang@gmail.com>
Authored: Tue Jun 4 15:32:39 2013 -0700
Committer: Alex Huang <alex.huang@gmail.com>
Committed: Tue Jun 4 15:32:39 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/vm/SystemVmLoadScanner.java |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bd0c239f/server/src/com/cloud/vm/SystemVmLoadScanner.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/SystemVmLoadScanner.java b/server/src/com/cloud/vm/SystemVmLoadScanner.java
index 4251b40..a220757 100644
--- a/server/src/com/cloud/vm/SystemVmLoadScanner.java
+++ b/server/src/com/cloud/vm/SystemVmLoadScanner.java
@@ -22,6 +22,9 @@ import java.util.concurrent.TimeUnit;
 
 import org.apache.log4j.Logger;
 
+import org.apache.cloudstack.context.CallContext;
+
+import com.cloud.exception.CloudAuthenticationException;
 import com.cloud.utils.Pair;
 import com.cloud.utils.concurrency.NamedThreadFactory;
 import com.cloud.utils.db.GlobalLock;
@@ -67,6 +70,12 @@ public class SystemVmLoadScanner<T> {
 
             @Override
             public void run() {
+                try {
+                    CallContext.registerOnceOnly();
+                } catch (CloudAuthenticationException e) {
+                    s_logger.error("Unable to start the capacity scan task", e);
+                    System.exit(1);
+                }
                 Transaction txn = Transaction.open(Transaction.CLOUD_DB);
                 try {
                     reallyRun();


Mime
View raw message