cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From prachida...@apache.org
Subject git commit: refs/heads/master - CLOUDSTACK-1706 Failed to deploy VM with error "cannot find DeployPlannerSelector"
Date Mon, 18 Mar 2013 19:13:10 GMT
Updated Branches:
  refs/heads/master 2b05f546b -> d9b85e397


CLOUDSTACK-1706 Failed to deploy VM with error "cannot find DeployPlannerSelector"

Changes:

- Regular plugin/adapter components should usually be loaded at run level RUNLEVEL_COMPONENT(5)
- HypervisorVmPlannerSelector was at level 0, while configurationServer at level 2  - causing
config to be not loaded for the HypervisorVmPlannerSelector


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

Branch: refs/heads/master
Commit: d9b85e397d10f2291058ff972094decd8fc4ad7d
Parents: 2b05f54
Author: Prachi Damle <prachi@cloud.com>
Authored: Mon Mar 18 12:03:57 2013 -0700
Committer: Prachi Damle <prachi@cloud.com>
Committed: Mon Mar 18 12:12:56 2013 -0700

----------------------------------------------------------------------
 .../cloud/deploy/HypervisorVmPlannerSelector.java  |    8 ++++++++
 .../src/com/cloud/utils/component/AdapterBase.java |    4 +++-
 2 files changed, 11 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/d9b85e39/server/src/com/cloud/deploy/HypervisorVmPlannerSelector.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/deploy/HypervisorVmPlannerSelector.java b/server/src/com/cloud/deploy/HypervisorVmPlannerSelector.java
index 8b2a144..0f454cd 100755
--- a/server/src/com/cloud/deploy/HypervisorVmPlannerSelector.java
+++ b/server/src/com/cloud/deploy/HypervisorVmPlannerSelector.java
@@ -18,12 +18,16 @@ package com.cloud.deploy;
 
 import javax.ejb.Local;
 
+import org.apache.log4j.Logger;
+
 import com.cloud.deploy.DeploymentPlanner.AllocationAlgorithm;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.vm.UserVmVO;
 
 @Local(value = {DeployPlannerSelector.class})
 public class HypervisorVmPlannerSelector extends AbstractDeployPlannerSelector {
+    private static final Logger s_logger = Logger.getLogger(HypervisorVmPlannerSelector.class);
+
     @Override
     public String selectPlanner(UserVmVO vm) {
         if (vm.getHypervisorType() != HypervisorType.BareMetal) {
@@ -38,6 +42,10 @@ public class HypervisorVmPlannerSelector extends AbstractDeployPlannerSelector
{
                         || _allocationAlgorithm.equals(AllocationAlgorithm.userconcentratedpod_firstfit.toString()))
{
                     return "UserConcentratedPodPlanner";
                 }
+            } else {
+                if (s_logger.isDebugEnabled()) {
+                    s_logger.debug("The allocation algorithm is null, cannot select the planner");
+                }
             }
         }
 

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/d9b85e39/utils/src/com/cloud/utils/component/AdapterBase.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/component/AdapterBase.java b/utils/src/com/cloud/utils/component/AdapterBase.java
index a8f4f46..ea5e961 100644
--- a/utils/src/com/cloud/utils/component/AdapterBase.java
+++ b/utils/src/com/cloud/utils/component/AdapterBase.java
@@ -22,8 +22,10 @@ import java.util.List;
 public class AdapterBase extends ComponentLifecycleBase implements Adapter {
 
 	public AdapterBase() {
+        // set default run level for adapter components
+        setRunLevel(ComponentLifecycle.RUN_LEVEL_COMPONENT);
 	}
-	
+
 	public static <T extends Adapter> T getAdapterByName(List<T> adapters, String
name) {
     	for(T adapter : adapters) {
     		if(adapter.getName() != null && adapter.getName().equalsIgnoreCase(name))


Mime
View raw message