From f3c70125086a8441c83771beb40b7445bcd82c64 Mon Sep 17 00:00:00 2001 From: edison Date: Wed, 1 Dec 2010 11:18:27 -0800 Subject: [PATCH] remove capacity --- server/src/com/cloud/alert/AlertManagerImpl.java | 5 +++-- server/src/com/cloud/vm/MauriceMoss.java | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/src/com/cloud/alert/AlertManagerImpl.java b/server/src/com/cloud/alert/AlertManagerImpl.java index 0261d12a9a9..58145d38838 100644 --- a/server/src/com/cloud/alert/AlertManagerImpl.java +++ b/server/src/com/cloud/alert/AlertManagerImpl.java @@ -262,7 +262,8 @@ public class AlertManagerImpl implements AlertManager { Map offeringsMap = new HashMap(); for (ServiceOfferingVO offering : offerings) { offeringsMap.put(offering.getId(), offering); - } + } + /* for (HostVO host : hosts) { if (host.getType() != Host.Type.Routing) { continue; @@ -311,7 +312,7 @@ public class AlertManagerImpl implements AlertManager { CapacityVO newCPUCapacity = new CapacityVO(host.getId(), host.getDataCenterId(), host.getPodId(), cpu, (long)(host.getCpus()*host.getSpeed()* _cpuOverProvisioningFactor), CapacityVO.CAPACITY_TYPE_CPU); newCapacities.add(newMemoryCapacity); newCapacities.add(newCPUCapacity); - } + } */ // Calculate storage pool capacity List storagePools = _storagePoolDao.listAll(); diff --git a/server/src/com/cloud/vm/MauriceMoss.java b/server/src/com/cloud/vm/MauriceMoss.java index 31cdd2f351c..670e0646c28 100644 --- a/server/src/com/cloud/vm/MauriceMoss.java +++ b/server/src/com/cloud/vm/MauriceMoss.java @@ -363,6 +363,7 @@ public class MauriceMoss implements VmManager, ClusterManagerListener { throw e; } catch (StorageUnavailableException e) { s_logger.warn("Unable to contact storage.", e); + avoids.addCluster(dest.getCluster().getId()); continue; } _networkMgr.prepare(vmProfile, dest, context);