This is an automated email from the ASF dual-hosted git repository.
sureshanaparti 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 c543f5f server: reapply checkVmProfileAndHost to check guest os
preference (#6000)
c543f5f is described below
commit c543f5f54645c12f7e79bd35d887888e6a41ff42
Author: Wei Zhou <[email protected]>
AuthorDate: Thu Feb 17 09:55:13 2022 +0100
server: reapply checkVmProfileAndHost to check guest os preference (#6000)
---
.../java/com/cloud/deploy/DeploymentPlanningManagerImpl.java | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git
a/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
b/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
index fd33bed..3dc45b6 100644
--- a/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
+++ b/server/src/main/java/com/cloud/deploy/DeploymentPlanningManagerImpl.java
@@ -424,14 +424,7 @@ StateListener<State, VirtualMachine.Event,
VirtualMachine>, Configurable {
}
} else {
if (host.getStatus() == Status.Up) {
- boolean hostTagsMatch = true;
- if(offering.getHostTag() != null){
- _hostDao.loadHostTags(host);
- if (!(host.getHostTags() != null &&
host.getHostTags().contains(offering.getHostTag()))) {
- hostTagsMatch = false;
- }
- }
- if (hostTagsMatch) {
+ if (checkVmProfileAndHost(vmProfile, host)) {
long cluster_id = host.getClusterId();
ClusterDetailsVO cluster_detail_cpu =
_clusterDetailsDao.findDetail(cluster_id,
"cpuOvercommitRatio");