This is an automated email from the ASF dual-hosted git repository.
weizhou pushed a commit to branch 4.16
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.16 by this push:
new 4d99f84 server: update capacity_state of host cpu core after
disable/enable a host (#5701)
4d99f84 is described below
commit 4d99f842734ac16075bc4c15f544c7d3d5b98972
Author: Wei Zhou <[email protected]>
AuthorDate: Fri Dec 3 06:45:53 2021 +0100
server: update capacity_state of host cpu core after disable/enable a host
(#5701)
---
server/src/main/java/com/cloud/resource/ResourceManagerImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java
b/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java
index 31455c0..c17e6ad 100755
--- a/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java
+++ b/server/src/main/java/com/cloud/resource/ResourceManagerImpl.java
@@ -1265,7 +1265,7 @@ public class ResourceManagerImpl extends ManagerBase
implements ResourceManager,
// TO DO - Make it more granular and have better conversion into
capacity type
if(host.getType() == Type.Routing){
final CapacityState capacityState = nextState ==
ResourceState.Enabled ? CapacityState.Enabled : CapacityState.Disabled;
- final short[] capacityTypes = {Capacity.CAPACITY_TYPE_CPU,
Capacity.CAPACITY_TYPE_MEMORY};
+ final short[] capacityTypes = { Capacity.CAPACITY_TYPE_CPU,
Capacity.CAPACITY_TYPE_MEMORY, Capacity.CAPACITY_TYPE_CPU_CORE };
_capacityDao.updateCapacityState(null, null, null, host.getId(),
capacityState.toString(), capacityTypes);
final StoragePoolVO storagePool =
_storageMgr.findLocalStorageOnHost(host.getId());