mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
bug 10423: agent in ssvm needs to add default keystore, as we copying templates through https://**realhostip.**
status 10423: resolved fixed
This commit is contained in:
parent
8da6578d76
commit
0dacd3913a
@ -60,4 +60,4 @@ then
|
||||
maxmem=$eightypcnt
|
||||
fi
|
||||
|
||||
java -mx${maxmem}m -cp $CP com.cloud.agent.AgentShell $keyvalues $@
|
||||
java -Djavax.net.ssl.trustStore=./certs/realhostip.keystore -mx${maxmem}m -cp $CP com.cloud.agent.AgentShell $keyvalues $@
|
||||
|
||||
@ -507,7 +507,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
||||
return ssHost;
|
||||
} else if ( ssHost.getType() == Host.Type.SecondaryStorage) {
|
||||
Long dcId = ssHost.getDataCenterId();
|
||||
List<HostVO> ssAHosts = _hostDao.listBy(Host.Type.SecondaryStorageVM, dcId);
|
||||
List<HostVO> ssAHosts = _hostDao.listSecondaryStorageVM(dcId);
|
||||
if (ssAHosts == null || ssAHosts.isEmpty() ) {
|
||||
return null;
|
||||
}
|
||||
@ -532,7 +532,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
||||
|
||||
|
||||
private long sendToSSVM(final long dcId, final Command cmd, final Listener listener) {
|
||||
List<HostVO> ssAHosts = _hostDao.listBy(Host.Type.SecondaryStorageVM, dcId);
|
||||
List<HostVO> ssAHosts = _hostDao.listSecondaryStorageVM(dcId);
|
||||
if (ssAHosts == null || ssAHosts.isEmpty() ) {
|
||||
return -1;
|
||||
}
|
||||
@ -546,7 +546,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
|
||||
}
|
||||
|
||||
private Answer sendToSSVM(final long dcId, final Command cmd) {
|
||||
List<HostVO> ssAHosts = _hostDao.listByTypeDataCenter(Host.Type.SecondaryStorageVM, dcId);
|
||||
List<HostVO> ssAHosts = _hostDao.listSecondaryStorageVM(dcId);
|
||||
if (ssAHosts == null || ssAHosts.isEmpty() ) {
|
||||
return new Answer(cmd, false, "can not find secondary storage VM agent for data center " + dcId);
|
||||
}
|
||||
|
||||
@ -182,4 +182,6 @@ public interface HostDao extends GenericDao<HostVO, Long> {
|
||||
List<HostVO> listAllSecondaryStorageHosts(long dataCenterId);
|
||||
|
||||
List<HostVO> listByManagementServer(long msId);
|
||||
|
||||
List<HostVO> listSecondaryStorageVM(long dcId);
|
||||
}
|
||||
|
||||
@ -95,6 +95,7 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
|
||||
protected final SearchBuilder<HostVO> DirectConnectSearch;
|
||||
protected final SearchBuilder<HostVO> ManagedDirectConnectSearch;
|
||||
protected final SearchBuilder<HostVO> ManagedRoutingServersSearch;
|
||||
protected final SearchBuilder<HostVO> SecondaryStorageVMSearch;
|
||||
|
||||
protected final GenericSearchBuilder<HostVO, Long> HostsInStatusSearch;
|
||||
protected final GenericSearchBuilder<HostVO, Long> CountRoutingByDc;
|
||||
@ -143,6 +144,12 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
|
||||
TypeDcSearch.and("type", TypeDcSearch.entity().getType(), SearchCriteria.Op.EQ);
|
||||
TypeDcSearch.and("dc", TypeDcSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
|
||||
TypeDcSearch.done();
|
||||
|
||||
SecondaryStorageVMSearch = createSearchBuilder();
|
||||
SecondaryStorageVMSearch.and("type", SecondaryStorageVMSearch.entity().getType(), SearchCriteria.Op.EQ);
|
||||
SecondaryStorageVMSearch.and("dc", SecondaryStorageVMSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ);
|
||||
SecondaryStorageVMSearch.and("status", SecondaryStorageVMSearch.entity().getStatus(), SearchCriteria.Op.EQ);
|
||||
SecondaryStorageVMSearch.done();
|
||||
|
||||
TypeDcStatusSearch = createSearchBuilder();
|
||||
TypeDcStatusSearch.and("type", TypeDcStatusSearch.entity().getType(), SearchCriteria.Op.EQ);
|
||||
@ -693,7 +700,16 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
|
||||
|
||||
return listBy(sc);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HostVO> listSecondaryStorageVM(long dcId) {
|
||||
SearchCriteria<HostVO> sc = SecondaryStorageVMSearch.create();
|
||||
sc.setParameters("type", Type.SecondaryStorageVM);
|
||||
sc.setParameters("status", Status.Up);
|
||||
sc.setParameters("dc", dcId);
|
||||
|
||||
return listBy(sc);
|
||||
}
|
||||
@Override
|
||||
public List<HostVO> listByType(Type type) {
|
||||
SearchCriteria<HostVO> sc = TypeSearch.create();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user