mirror of https://github.com/apache/cloudstack.git
Address review comments
This commit is contained in:
parent
fb317e05fe
commit
01ac2e5a6a
|
|
@ -434,8 +434,8 @@ public class KubernetesClusterManagerImpl extends ManagerBase implements Kuberne
|
|||
}
|
||||
|
||||
public VMTemplateVO getKubernetesServiceTemplate(DataCenter dataCenter, Hypervisor.HypervisorType hypervisorType) {
|
||||
ConfigKey<String> preferredArchitecture = ResourceManager.SystemVmPreferredArchitecture;
|
||||
VMTemplateVO template = templateDao.findSystemVMReadyTemplate(dataCenter.getId(), hypervisorType, preferredArchitecture.value());
|
||||
String preferredArchitecture = ResourceManager.SystemVmPreferredArchitecture.valueIn(dataCenter.getId());
|
||||
VMTemplateVO template = templateDao.findSystemVMReadyTemplate(dataCenter.getId(), hypervisorType, preferredArchitecture);
|
||||
if (DataCenter.Type.Edge.equals(dataCenter.getType()) && template != null && !template.isDirectDownload()) {
|
||||
logger.debug(String.format("Template %s can not be used for edge zone %s", template, dataCenter));
|
||||
template = templateDao.findRoutingTemplate(hypervisorType, networkHelper.getHypervisorRouterTemplateConfigMap().get(hypervisorType).valueIn(dataCenter.getId()));
|
||||
|
|
|
|||
|
|
@ -248,7 +248,7 @@ public class KubernetesClusterResourceModifierActionWorker extends KubernetesClu
|
|||
for (Map.Entry<String, Pair<HostVO, Integer>> hostEntry : hosts_with_resevered_capacity.entrySet()) {
|
||||
Pair<HostVO, Integer> hp = hostEntry.getValue();
|
||||
HostVO h = hp.first();
|
||||
if (!h.getHypervisorType().equals(clusterTemplate.getHypervisorType())) {
|
||||
if (!h.getHypervisorType().equals(clusterTemplate.getHypervisorType()) || !h.getArch().equals(clusterTemplate.getArch())) {
|
||||
continue;
|
||||
}
|
||||
hostDao.loadHostTags(h);
|
||||
|
|
|
|||
|
|
@ -61,7 +61,6 @@ import com.cloud.vm.dao.UserVmDao;
|
|||
import org.apache.cloudstack.api.ApiCommandResourceType;
|
||||
import org.apache.cloudstack.api.BaseCmd;
|
||||
import org.apache.cloudstack.context.CallContext;
|
||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
||||
import org.apache.cloudstack.storage.sharedfs.SharedFS;
|
||||
import org.apache.cloudstack.storage.sharedfs.SharedFSLifeCycle;
|
||||
import org.apache.commons.codec.binary.Base64;
|
||||
|
|
@ -175,11 +174,11 @@ public class StorageVmSharedFSLifeCycle implements SharedFSLifeCycle {
|
|||
customParameterMap.put("maxIopsDo", maxIops.toString());
|
||||
}
|
||||
List<String> keypairs = new ArrayList<String>();
|
||||
ConfigKey<String> preferredArchitecture = ResourceManager.SystemVmPreferredArchitecture;
|
||||
String preferredArchitecture = ResourceManager.SystemVmPreferredArchitecture.valueIn(zoneId);
|
||||
|
||||
for (final Iterator<Hypervisor.HypervisorType> iter = hypervisors.iterator(); iter.hasNext();) {
|
||||
final Hypervisor.HypervisorType hypervisor = iter.next();
|
||||
VMTemplateVO template = templateDao.findSystemVMReadyTemplate(zoneId, hypervisor, preferredArchitecture.value());
|
||||
VMTemplateVO template = templateDao.findSystemVMReadyTemplate(zoneId, hypervisor, preferredArchitecture);
|
||||
if (template == null && !iter.hasNext()) {
|
||||
throw new CloudRuntimeException(String.format("Unable to find the systemvm template for %s or it was not downloaded in %s.", hypervisor.toString(), zone.toString()));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue