mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Bug 12082 - Not able to deploy Vms with Host tags.
After recent changes of AgentManager, HostDao was wrongly referring to getState() instead of getResourceState(). Fixed this to refer to getResourceState(). This should fix the IndexOutOfBounds error.
This commit is contained in:
parent
54a1dc3617
commit
4531c9d6f7
@ -21,7 +21,6 @@ import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -42,7 +41,6 @@ import com.cloud.host.HostTagVO;
|
||||
import com.cloud.host.HostVO;
|
||||
import com.cloud.host.Status;
|
||||
import com.cloud.host.Status.Event;
|
||||
import com.cloud.hypervisor.Hypervisor.HypervisorType;
|
||||
import com.cloud.info.RunningHostCountInfo;
|
||||
import com.cloud.org.Managed;
|
||||
import com.cloud.resource.ResourceState;
|
||||
@ -399,7 +397,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
|
||||
hostSearch.and("dc", entity.getDataCenterId(), SearchCriteria.Op.EQ);
|
||||
hostSearch.and("cluster", entity.getClusterId(), SearchCriteria.Op.EQ);
|
||||
hostSearch.and("status", entity.getStatus(), SearchCriteria.Op.EQ);
|
||||
hostSearch.and("resourceState", entity.getState(), SearchCriteria.Op.EQ);
|
||||
hostSearch.and("resourceState", entity.getResourceState(), SearchCriteria.Op.EQ);
|
||||
hostSearch.join("hostTagSearch", hostTagSearch, entity.getId(), tagEntity.getHostId(), JoinBuilder.JoinType.INNER);
|
||||
|
||||
SearchCriteria<HostVO> sc = hostSearch.create();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user