-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Find system VM templates for CKS clusters and SharedFS honouring the preferred architecture #10946
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
81c6f5a
778ccc1
02de12f
70f4e26
efa3bdc
dabd833
a44dde0
337b0ee
c3b83a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -434,7 +434,8 @@ private IpAddress getSourceNatIp(Network network) { | |
| } | ||
|
|
||
| public VMTemplateVO getKubernetesServiceTemplate(DataCenter dataCenter, Hypervisor.HypervisorType hypervisorType) { | ||
| VMTemplateVO template = templateDao.findSystemVMReadyTemplate(dataCenter.getId(), hypervisorType); | ||
| ConfigKey<String> preferredArchitecture = ResourceManager.SystemVmPreferredArchitecture; | ||
| VMTemplateVO template = templateDao.findSystemVMReadyTemplate(dataCenter.getId(), hypervisorType, preferredArchitecture.value()); | ||
|
||
| 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())); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -61,6 +61,7 @@ | |
| 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; | ||
|
|
@@ -174,10 +175,11 @@ private UserVm deploySharedFSVM(Long zoneId, Account owner, List<Long> networkId | |
| customParameterMap.put("maxIopsDo", maxIops.toString()); | ||
| } | ||
| List<String> keypairs = new ArrayList<String>(); | ||
| ConfigKey<String> preferredArchitecture = ResourceManager.SystemVmPreferredArchitecture; | ||
|
|
||
| for (final Iterator<Hypervisor.HypervisorType> iter = hypervisors.iterator(); iter.hasNext();) { | ||
| final Hypervisor.HypervisorType hypervisor = iter.next(); | ||
| VMTemplateVO template = templateDao.findSystemVMReadyTemplate(zoneId, hypervisor); | ||
| VMTemplateVO template = templateDao.findSystemVMReadyTemplate(zoneId, hypervisor, preferredArchitecture.value()); | ||
|
||
| 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())); | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.