weizhouapache commented on code in PR #12952:
URL: https://github.com/apache/cloudstack/pull/12952#discussion_r3028802728
##########
engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java:
##########
@@ -315,11 +315,11 @@ public void setUpdated(Date updated) {
public static final List<Pair<Hypervisor.HypervisorType, CPU.CPUArch>>
hypervisorList = Arrays.asList(
new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64),
new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.arm64),
- new Pair<>(Hypervisor.HypervisorType.VMware, null),
- new Pair<>(Hypervisor.HypervisorType.XenServer, null),
- new Pair<>(Hypervisor.HypervisorType.Hyperv, null),
- new Pair<>(Hypervisor.HypervisorType.LXC, null),
- new Pair<>(Hypervisor.HypervisorType.Ovm3, null)
+ new Pair<>(Hypervisor.HypervisorType.VMware,
CPU.CPUArch.getDefault()),
+ new Pair<>(Hypervisor.HypervisorType.XenServer,
CPU.CPUArch.getDefault()),
+ new Pair<>(Hypervisor.HypervisorType.Hyperv,
CPU.CPUArch.getDefault()),
+ new Pair<>(Hypervisor.HypervisorType.LXC,
CPU.CPUArch.getDefault()),
+ new Pair<>(Hypervisor.HypervisorType.Ovm3,
CPU.CPUArch.getDefault())
Review Comment:
@sureshanaparti
in another place
the arch of MetadataTemplateDetails is from hypervisorType, which is null
for non-KVM
```
NewTemplateMap.put(key, new MetadataTemplateDetails(
hypervisorType.first(),
section.get("templatename"),
section.get("filename"),
section.get("downloadurl"),
section.get("checksum"),
hypervisorType.second(),
section.get("guestos")));
```
but in `hypervisorsInUse`, the arch is amd64/x86_64 (default arch of
clusters)
https://github.com/apache/cloudstack/blob/e2497cfc4df7daa13167ad2cf12e2eed782b0558/engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java#L1068
cluster arch
```
mysql> SELECT DISTINCT hypervisor_type,arch from cluster;
+-----------------+--------+
| hypervisor_type | arch |
+-----------------+--------+
| VMware | x86_64 |
+-----------------+--------+
1 row in set (0.00 sec)
```
so the check always return false (line 1034)
https://github.com/apache/cloudstack/blob/e2497cfc4df7daa13167ad2cf12e2eed782b0558/engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java#L1032-L1034
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]