cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [2/2] git commit: updated refs/heads/vmsync to 2e1e2ba
Date Wed, 05 Jun 2013 03:07:47 GMT
More fixes on starting from jobs


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

Branch: refs/heads/vmsync
Commit: 2e1e2babcb524c5cd36d48e26bc4d5eb0d62a9e3
Parents: 2c75352
Author: Alex Huang <alex.huang@gmail.com>
Authored: Tue Jun 4 20:10:03 2013 -0700
Committer: Alex Huang <alex.huang@gmail.com>
Committed: Tue Jun 4 20:10:29 2013 -0700

----------------------------------------------------------------------
 .../org/apache/cloudstack/context/CallContext.java |    2 +-
 .../src/com/cloud/vm/VirtualMachineManager.java    |   10 ---
 .../apache/cloudstack/framework/jobs/AsyncJob.java |    2 -
 .../cloudstack/framework/jobs/impl/AsyncJobVO.java |   13 +---
 server/src/com/cloud/api/ApiServer.java            |    2 +-
 .../com/cloud/async/AsyncJobExecutionContext.java  |   15 ++++-
 .../src/com/cloud/async/AsyncJobManagerImpl.java   |    4 -
 .../storage/snapshot/SnapshotSchedulerImpl.java    |    3 +-
 server/src/com/cloud/vm/SystemVmLoadScanner.java   |    2 +
 .../com/cloud/vm/VirtualMachineManagerImpl.java    |   58 +++++++++------
 server/src/com/cloud/vm/VmWorkJobDispatcher.java   |   20 ++++--
 .../vm/VmWorkMockVirtualMachineManagerImpl.java    |   18 -----
 12 files changed, 70 insertions(+), 79 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e1e2bab/api/src/org/apache/cloudstack/context/CallContext.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/context/CallContext.java b/api/src/org/apache/cloudstack/context/CallContext.java
index bc8ad00..4eb46d1 100644
--- a/api/src/org/apache/cloudstack/context/CallContext.java
+++ b/api/src/org/apache/cloudstack/context/CallContext.java
@@ -95,7 +95,7 @@ public class CallContext {
         CallContext callingContext = new CallContext(callingUser, callingAccount, sessionId);
         s_currentContext.set(callingContext);
         if (sessionId != null) {
-            NDC.push(sessionId);
+            NDC.push("job-" + sessionId);
         }
         s_logger.debug("Setting calling context: " + s_currentContext.get());
         return callingContext;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e1e2bab/engine/components-api/src/com/cloud/vm/VirtualMachineManager.java
----------------------------------------------------------------------
diff --git a/engine/components-api/src/com/cloud/vm/VirtualMachineManager.java b/engine/components-api/src/com/cloud/vm/VirtualMachineManager.java
index 97d1ff1..922a1f4 100644
--- a/engine/components-api/src/com/cloud/vm/VirtualMachineManager.java
+++ b/engine/components-api/src/com/cloud/vm/VirtualMachineManager.java
@@ -27,7 +27,6 @@ import com.cloud.agent.api.to.NicTO;
 import com.cloud.agent.api.to.VirtualMachineTO;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
-import com.cloud.exception.AgentUnavailableException;
 import com.cloud.exception.ConcurrentOperationException;
 import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.exception.InsufficientServerCapacityException;
@@ -201,14 +200,5 @@ public interface VirtualMachineManager extends Manager {
             throws ResourceUnavailableException, ConcurrentOperationException,
             ManagementServerException, VirtualMachineMigrationException;
 
-    //
-    // VM work handlers
-    //
-    VirtualMachine processVmStartWork(String vmUuid, Map<VirtualMachineProfile.Param,
Object> params, User caller, Account account, DeploymentPlan planToDeploy)
-           throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException;
-
-    boolean processVmStopWork(String vmUuid, boolean forced, User user, Account account)
-    	throws AgentUnavailableException, OperationTimedoutException, ConcurrentOperationException;
-
     NicTO toNicTO(NicProfile nic, HypervisorType hypervisorType);
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e1e2bab/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJob.java
----------------------------------------------------------------------
diff --git a/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJob.java b/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJob.java
index 92c89ee..14d6479 100644
--- a/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJob.java
+++ b/framework/jobs/src/org/apache/cloudstack/framework/jobs/AsyncJob.java
@@ -90,8 +90,6 @@ public interface AsyncJob extends Job {
     @Override
     Date getLastPolled();
 
-    Date getRemoved();
-
     @Override
     String getInstanceType();
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e1e2bab/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobVO.java
----------------------------------------------------------------------
diff --git a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobVO.java
b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobVO.java
index f2ea4ac..bb7d872 100644
--- a/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobVO.java
+++ b/framework/jobs/src/org/apache/cloudstack/framework/jobs/impl/AsyncJobVO.java
@@ -125,12 +125,12 @@ public class AsyncJobVO implements AsyncJob, Job {
         uuid = UUID.randomUUID().toString();
     }
 
-    public AsyncJobVO(long userId, long accountId, String cmd, String cmdInfo, Long instanceId,
String instanceType) {
+    public AsyncJobVO(String uuid, long userId, long accountId, String cmd, String cmdInfo,
Long instanceId, String instanceType) {
 		this.userId = userId;
 		this.accountId = accountId;
 		this.cmd = cmd;
 		this.cmdInfo = cmdInfo;
-	    uuid = UUID.randomUUID().toString();
+        this.uuid = uuid;
 	    this.instanceId = instanceId;
 	    this.instanceType = instanceType;
     }
@@ -313,15 +313,6 @@ public class AsyncJobVO implements AsyncJob, Job {
 		this.lastPolled = lastPolled;
 	}
 
-	@Override
-    public Date getRemoved() {
-		return removed;
-	}
-
-	public void setRemoved(Date removed) {
-		this.removed = removed;
-	}
-	
     @Override
     public String getInstanceType() {
 		return instanceType;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e1e2bab/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index 4db9bb8..2863803 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -520,7 +520,7 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler,
ApiSer
             params.put("ctxStartEventId", String.valueOf(startEventId));
 
             Long instanceId = (objectId == null) ? asyncCmd.getInstanceId() : objectId;
-            AsyncJobVO job = new AsyncJobVO(callerUserId, caller.getId(), cmdObj.getClass().getName(),
+            AsyncJobVO job = new AsyncJobVO(ctx.getSessionId(), callerUserId, caller.getId(),
cmdObj.getClass().getName(),
                     ApiGsonHelper.getBuilder().create().toJson(params), instanceId,
                     asyncCmd.getInstanceType() != null ? asyncCmd.getInstanceType().toString()
: null);
             job.setDispatcher(_asyncDispatcher.getName());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e1e2bab/server/src/com/cloud/async/AsyncJobExecutionContext.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/async/AsyncJobExecutionContext.java b/server/src/com/cloud/async/AsyncJobExecutionContext.java
index 9ca38a9..1e4b5dc 100644
--- a/server/src/com/cloud/async/AsyncJobExecutionContext.java
+++ b/server/src/com/cloud/async/AsyncJobExecutionContext.java
@@ -147,7 +147,20 @@ public class AsyncJobExecutionContext  {
 		return context;
 	}
 	
-	public static void setCurrentExecutionContext(AsyncJobExecutionContext currentContext) {
+    public static AsyncJobExecutionContext registerPseudoExecutionContext() {
+        AsyncJobExecutionContext context = s_currentExectionContext.get();
+        if (context == null) {
+            context = new AsyncJobExecutionContext();
+            context = ComponentContext.inject(context);
+            context.getJob();
+            setCurrentExecutionContext(context);
+        }
+
+        return context;
+    }
+
+    // This is intended to be package level access for AsyncJobManagerImpl only.
+    static void setCurrentExecutionContext(AsyncJobExecutionContext currentContext) {
 		s_currentExectionContext.set(currentContext);
 	}
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e1e2bab/server/src/com/cloud/async/AsyncJobManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/async/AsyncJobManagerImpl.java b/server/src/com/cloud/async/AsyncJobManagerImpl.java
index f147bb0..40ebe2b 100644
--- a/server/src/com/cloud/async/AsyncJobManagerImpl.java
+++ b/server/src/com/cloud/async/AsyncJobManagerImpl.java
@@ -34,7 +34,6 @@ import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
-import org.apache.log4j.NDC;
 
 import org.apache.cloudstack.api.ApiErrorCode;
 import org.apache.cloudstack.api.command.user.job.QueryAsyncJobResultCmd;
@@ -517,8 +516,6 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
             		//
             		// setup execution environment
             		//
-                    NDC.push("job-" + job.getId());
-                    
             		txn = Transaction.open(Transaction.CLOUD_DB);
             		
                     try {
@@ -588,7 +585,6 @@ public class AsyncJobManagerImpl extends ManagerBase implements AsyncJobManager,
 	                    if(txn != null)
 	                    	txn.close();
 	                    
-	                    NDC.pop();
                     } catch(Throwable e) {
                 		s_logger.error("Double exception", e);
                     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e1e2bab/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 32d1c19..a8ef32b 100644
--- a/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java
+++ b/server/src/com/cloud/storage/snapshot/SnapshotSchedulerImpl.java
@@ -22,6 +22,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Timer;
 import java.util.TimerTask;
+import java.util.UUID;
 
 import javax.ejb.Local;
 import javax.inject.Inject;
@@ -247,7 +248,7 @@ public class SnapshotSchedulerImpl extends ManagerBase implements SnapshotSchedu
                 params.put("id", ""+cmd.getEntityId());
                 params.put("ctxStartEventId", "1");
 
-                AsyncJobVO job = new AsyncJobVO(User.UID_SYSTEM, volume.getAccountId(), CreateSnapshotCmd.class.getName(),
+                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);
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e1e2bab/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 a220757..9eafe0f 100644
--- a/server/src/com/cloud/vm/SystemVmLoadScanner.java
+++ b/server/src/com/cloud/vm/SystemVmLoadScanner.java
@@ -24,6 +24,7 @@ import org.apache.log4j.Logger;
 
 import org.apache.cloudstack.context.CallContext;
 
+import com.cloud.async.AsyncJobExecutionContext;
 import com.cloud.exception.CloudAuthenticationException;
 import com.cloud.utils.Pair;
 import com.cloud.utils.concurrency.NamedThreadFactory;
@@ -72,6 +73,7 @@ public class SystemVmLoadScanner<T> {
             public void run() {
                 try {
                     CallContext.registerOnceOnly();
+                    AsyncJobExecutionContext.registerPseudoExecutionContext();
                 } catch (CloudAuthenticationException e) {
                     s_logger.error("Unable to start the capacity scan task", e);
                     System.exit(1);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e1e2bab/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
index db6ae65..7a62d3d 100755
--- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -266,20 +266,24 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
     protected AffinityGroupVMMapDao _affinityGroupVMMapDao;
 
     protected List<DeploymentPlanner> _planners;
+
     public List<DeploymentPlanner> getPlanners() {
-		return _planners;
-	}
-	public void setPlanners(List<DeploymentPlanner> _planners) {
-		this._planners = _planners;
-	}
+        return _planners;
+    }
+
+    public void setPlanners(List<DeploymentPlanner> _planners) {
+        this._planners = _planners;
+    }
 
     protected List<HostAllocator> _hostAllocators;
+
     public List<HostAllocator> getHostAllocators() {
-		return _hostAllocators;
-	}
-	public void setHostAllocators(List<HostAllocator> _hostAllocators) {
-		this._hostAllocators = _hostAllocators;
-	}
+        return _hostAllocators;
+    }
+
+    public void setHostAllocators(List<HostAllocator> _hostAllocators) {
+        this._hostAllocators = _hostAllocators;
+    }
 
 	@Inject
     protected List<StoragePoolAllocator> _storagePoolAllocators;
@@ -804,9 +808,12 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
         return;
     }
 
-    @Override
-    public VirtualMachine processVmStartWork(String vmUuid, Map<VirtualMachineProfile.Param,
Object> params, User caller, Account account, DeploymentPlan planToDeploy)
+    public void processVmStartWork(String vmUuid, Map<VirtualMachineProfile.Param, Object>
params, DeploymentPlan planToDeploy)
             throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException
{
+        CallContext context = CallContext.current();
+        User caller = context.getCallingUser();
+        Account account = context.getCallingAccount();
+
         VMInstanceVO vm = _vmDao.findByUuid(vmUuid);
         VirtualMachineGuru vmGuru = getVmGuru(vm);
   
@@ -997,7 +1004,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
                             if (s_logger.isDebugEnabled()) {
                                 s_logger.debug("Start completed for VM " + vm);
                             }
-                            return startedVm;
+                            return;
                         } else {
                             if (s_logger.isDebugEnabled()) {
                                 s_logger.info("The guru did not like the answers so stopping
" + vm);
@@ -1073,8 +1080,6 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
             throw new CloudRuntimeException("Unable to start instance '" + vm.getHostName()
                             + "' (" + vm.getUuid() + "), see management server log for details");
         }
-
-        return startedVm;
     }
     
     @Override
@@ -1259,9 +1264,12 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
         }
     }
 
-    @Override
-    public boolean processVmStopWork(String vmUuid, boolean forced, User user, Account account)
throws AgentUnavailableException,
+    public void processVmStopWork(String vmUuid, boolean forced) throws AgentUnavailableException,
             OperationTimedoutException, ConcurrentOperationException {
+        CallContext context = CallContext.current();
+        User user = context.getCallingUser();
+        Account account = context.getCallingAccount();
+
         VmWorkJobVO work = _workJobDao.findById(AsyncJobExecutionContext.getCurrentExecutionContext().getJob().getId());
 
         final VMInstanceVO vm = _vmDao.findByUuid(vmUuid);
@@ -1271,7 +1279,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
                 if (s_logger.isDebugEnabled()) {
                     s_logger.debug("HostId is null but this is not a forced stop, cannot
stop vm " + vm + " with state:" + vm.getState());
                 }
-                return false;
+                return;
             }
             
             try {
@@ -1281,7 +1289,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
             }
   
             _workJobDao.updateStep(work.getId(), VmWorkJobVO.Step.Done);
-            return true;
+            return;
         }
 
         VirtualMachineGuru vmGuru = getVmGuru(vm);
@@ -1313,10 +1321,11 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
                         if (s_logger.isDebugEnabled()) {
                             s_logger.debug("Updating work item to Done, id:" + work.getId());
                         }
-                        return changeState(vm, Event.AgentReportStopped, null, work, Step.Done);
+                        changeState(vm, Event.AgentReportStopped, null, work, Step.Done);
+                        return;
                     } catch (NoTransitionException e) {
                         s_logger.warn("Unable to cleanup " + vm);
-                        return false;
+                        return;
                     }
                 } else {
                     if (s_logger.isDebugEnabled()) {
@@ -1351,7 +1360,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
                     } catch (NoTransitionException e) {
                         s_logger.warn("Unable to transition the state " + vm);
                     }
-                    return false;
+                    return;
                 } else {
                     s_logger.warn("Unable to actually stop " + vm + " but continue with release
because it's a force stop");
                     vmGuru.finalizeStop(profile, answer);
@@ -1387,10 +1396,11 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
                 _workJobDao.updateStep(work.getId(), VmWorkJobVO.Step.Done);
             }
 
-            return stateTransitTo(vm, Event.OperationSucceeded, null, null);
+            stateTransitTo(vm, Event.OperationSucceeded, null, null);
+            return;
         } catch (NoTransitionException e) {
             s_logger.warn(e.getMessage());
-            return false;
+            return;
         }
     }
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e1e2bab/server/src/com/cloud/vm/VmWorkJobDispatcher.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VmWorkJobDispatcher.java b/server/src/com/cloud/vm/VmWorkJobDispatcher.java
index c37e65d..04d9204 100644
--- a/server/src/com/cloud/vm/VmWorkJobDispatcher.java
+++ b/server/src/com/cloud/vm/VmWorkJobDispatcher.java
@@ -41,7 +41,8 @@ public class VmWorkJobDispatcher extends AdapterBase implements AsyncJobDispatch
     public final static String Start = "start";
     public final static String Stop = "stop";
 
-	@Inject private VirtualMachineManager _vmMgr;
+    @Inject
+    private VirtualMachineManagerImpl _vmMgr;
 	@Inject private AsyncJobManager _asyncJobMgr;
     @Inject private AccountDao _accountDao;
     @Inject private VMInstanceDao _instanceDao;
@@ -50,25 +51,32 @@ public class VmWorkJobDispatcher extends AdapterBase implements AsyncJobDispatch
     
 	@Override
     public void runJob(AsyncJob job) {
+        VmWork work = null;
         try {
         	String cmd = job.getCmd();
         	assert(cmd != null);
         	
-        	VmWork work = (VmWork)ApiSerializerHelper.fromSerializedString(job.getCmdInfo());
+            work = (VmWork)ApiSerializerHelper.fromSerializedString(job.getCmdInfo());
         	assert(work != null);
         	
+            CallContext context = CallContext.register(work.getUserId(), work.getAccountId(),
"job-" + job.getShortUuid());
+
             VMInstanceVO vm = _instanceDao.findById(work.getVmId());
+            if (vm == null) {
+                s_logger.info("Unable to find vm " + work.getVmId());
+            }
             assert(vm != null);
     
-            CallContext context = CallContext.register(work.getUserId(), work.getAccountId(),
"job-" + job.getShortUuid());
             if (cmd.equals(Start)) {
-                _vmMgr.start(vm.getUuid(), null, context.getCallingUser(), context.getCallingAccount());
+                VmWorkStart start = (VmWorkStart)work;
+                _vmMgr.processVmStartWork(vm.getUuid(), start.getParams(), start.getPlan());
             } else if (cmd.equals(Stop)) {
-                _vmMgr.stop(vm.getUuid(), context.getCallingUser(), context.getCallingAccount());
+                VmWorkStop stop = (VmWorkStop)work;
+                _vmMgr.processVmStopWork(vm.getUuid(), stop.isForceStop());
             }
             _asyncJobMgr.completeAsyncJob(job.getId(), AsyncJobConstants.STATUS_SUCCEEDED,
0, null);
         } catch(Throwable e) {
-        	s_logger.error("Unexpected exception", e);
+            s_logger.error("Unable to complete " + job, e);
             _asyncJobMgr.completeAsyncJob(job.getId(), AsyncJobConstants.STATUS_FAILED, 0,
e);
         } finally {
             CallContext.unregister();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e1e2bab/server/test/com/cloud/vm/VmWorkMockVirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/VmWorkMockVirtualMachineManagerImpl.java b/server/test/com/cloud/vm/VmWorkMockVirtualMachineManagerImpl.java
index 698fe80..98b5af8 100644
--- a/server/test/com/cloud/vm/VmWorkMockVirtualMachineManagerImpl.java
+++ b/server/test/com/cloud/vm/VmWorkMockVirtualMachineManagerImpl.java
@@ -341,18 +341,6 @@ public class VmWorkMockVirtualMachineManagerImpl implements VirtualMachineManage
         return false;
 	}
 
-	@Override
-    public VirtualMachine processVmStartWork(String vmUuid, Map<VirtualMachineProfile.Param,
Object> params, User caller, Account account, DeploymentPlan planToDeploy)
-            throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException
{
-    	
-		try {
-			Thread.sleep(120000);
-		} catch (InterruptedException e) {
-		}
-    	
-        return null;
-    }
-
 	int wakeupCount = 0;
 	public void processVmStartWakeup() {
 		s_logger.info("processVmStartWakeup. job-" + AsyncJobExecutionContext.getCurrentExecutionContext().getJob().getId());
@@ -364,12 +352,6 @@ public class VmWorkMockVirtualMachineManagerImpl implements VirtualMachineManage
 		}
 	}
 	
-	@Override
-    public boolean processVmStopWork(String vmUuid, boolean forced, User user, Account account)
-        throws AgentUnavailableException, OperationTimedoutException, ConcurrentOperationException
{
-    	return true;
-    }
-
     @Override
     public VirtualMachine migrateWithStorage(String vmUuid, long srcId, long destId, Map<VolumeVO,
StoragePoolVO> volumeToPool) throws ResourceUnavailableException,
             ConcurrentOperationException, ManagementServerException, VirtualMachineMigrationException
{


Mime
View raw message