diff --git a/java/code/src/com/redhat/rhn/domain/server/CPU.hbm.xml b/java/code/src/com/redhat/rhn/domain/server/CPU.hbm.xml
index 7e4f24aa840a..613e10152d2f 100644
--- a/java/code/src/com/redhat/rhn/domain/server/CPU.hbm.xml
+++ b/java/code/src/com/redhat/rhn/domain/server/CPU.hbm.xml
@@ -32,6 +32,10 @@ PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+
+
+
+
cpuArchSpecsIn) {
final CPU cpu = Optional.ofNullable(server.getCpu()).orElseGet(CPU::new);
// os.uname[4]
@@ -199,6 +203,13 @@ else if (CpuArchUtil.isAarch64(cpuarch)) {
// On s390x this number of active and actual CPUs can be different.
cpu.setNrCPU(grains.getValueAsLong("total_num_cpus").orElse(0L));
+ try {
+ cpu.setArchSpecs(new ObjectMapper().writeValueAsString(cpuArchSpecsIn));
+ }
+ catch (JsonProcessingException e) {
+ LOG.warn("Failed to serialize CPU arch specs, ignoring results.", e);
+ }
+
if (arch != null) {
cpu.setServer(server);
server.setCpu(cpu);
diff --git a/java/code/src/com/suse/manager/utils/SaltUtils.java b/java/code/src/com/suse/manager/utils/SaltUtils.java
index 7c24d43a3c9f..8ec75963c3a2 100644
--- a/java/code/src/com/suse/manager/utils/SaltUtils.java
+++ b/java/code/src/com/suse/manager/utils/SaltUtils.java
@@ -1833,7 +1833,7 @@ private static void handleHardwareProfileUpdate(MinionServer server,
HardwareMapper hwMapper = new HardwareMapper(server,
new ValueMap(result.getGrains()));
- hwMapper.mapCpuInfo(new ValueMap(result.getCpuInfo()));
+ hwMapper.mapCpuInfo(new ValueMap(result.getCpuInfo()), result.getCpuArchSpecs());
server.setRam(hwMapper.getTotalMemory());
server.setSwap(hwMapper.getTotalSwapMemory());
if (CpuArchUtil.isDmiCapable(hwMapper.getCpuArch())) {
diff --git a/java/code/src/com/suse/manager/webui/utils/salt/custom/HwProfileUpdateSlsResult.java b/java/code/src/com/suse/manager/webui/utils/salt/custom/HwProfileUpdateSlsResult.java
index fcef9f1db6a2..914e31d88030 100644
--- a/java/code/src/com/suse/manager/webui/utils/salt/custom/HwProfileUpdateSlsResult.java
+++ b/java/code/src/com/suse/manager/webui/utils/salt/custom/HwProfileUpdateSlsResult.java
@@ -45,6 +45,9 @@ public class HwProfileUpdateSlsResult {
@SerializedName("mgrcompat_|-cpuinfo_|-status.cpuinfo_|-module_run")
private StateApplyResult>> cpuInfo;
+ @SerializedName("mgrcompat_|-cpu_arch_specs_|-cpuinfo.arch_specs_|-module_run")
+ private StateApplyResult>> cpuArchSpecs;
+
@SerializedName(value = "mgrcompat_|-udev_|-udev.exportdb_|-module_run",
alternate = {"mgrcompat_|-udevdb_|-udevdb.exportdb_|-module_run"})
private StateApplyResult>>> udevdb;
@@ -278,4 +281,15 @@ public String getContainerRuntime() {
public String getUname() {
return uname.map(ret -> ret.getChanges().getStdout()).orElse(null);
}
+
+ /**
+ * Get the CPU architecture specific information
+ * @return the specs Map
+ */
+ public Map getCpuArchSpecs() {
+ if (cpuArchSpecs == null) {
+ return Collections.emptyMap();
+ }
+ return cpuArchSpecs.getChanges().getRet();
+ }
}
diff --git a/java/code/src/com/suse/scc/model/SCCHwInfoJson.java b/java/code/src/com/suse/scc/model/SCCHwInfoJson.java
index 7b6e90ca3cc7..245160df6df7 100644
--- a/java/code/src/com/suse/scc/model/SCCHwInfoJson.java
+++ b/java/code/src/com/suse/scc/model/SCCHwInfoJson.java
@@ -16,6 +16,7 @@
import com.google.gson.annotations.SerializedName;
+import java.util.Map;
import java.util.Set;
/**
@@ -42,6 +43,8 @@ public class SCCHwInfoJson {
private String cloudProvider;
private Set sap;
+ @SerializedName("arch_specs")
+ private Map archSpecs;
public int getCpus() {
return cpus;
@@ -122,4 +125,11 @@ public String getContainerRuntime() {
public void setContainerRuntime(String containerRuntimeIn) {
containerRuntime = containerRuntimeIn;
}
+ public Map getArchSpecs() {
+ return archSpecs;
+ }
+
+ public void setArchSpecs(Map archSpecsIn) {
+ archSpecs = archSpecsIn;
+ }
}
diff --git a/java/code/src/com/suse/scc/registration/SCCSystemRegistrationSystemDataAcquisitor.java b/java/code/src/com/suse/scc/registration/SCCSystemRegistrationSystemDataAcquisitor.java
index 83994477c642..f1522b5a570d 100644
--- a/java/code/src/com/suse/scc/registration/SCCSystemRegistrationSystemDataAcquisitor.java
+++ b/java/code/src/com/suse/scc/registration/SCCSystemRegistrationSystemDataAcquisitor.java
@@ -31,12 +31,17 @@
import com.suse.scc.model.SCCMinProductJson;
import com.suse.scc.model.SCCRegisterSystemJson;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.security.SecureRandom;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.stream.Collectors;
@@ -97,6 +102,20 @@ private Optional getPayload(SCCRegCacheItem rci) {
Optional cpu = ofNullable(srv.getCpu());
cpu.flatMap(c -> ofNullable(c.getNrCPU())).ifPresent(c -> hwInfo.setCpus(c.intValue()));
cpu.flatMap(c -> ofNullable(c.getNrsocket())).ifPresent(c -> hwInfo.setSockets(c.intValue()));
+ cpu.ifPresent(
+ c -> {
+ try {
+ var archSpecs = new ObjectMapper()
+ .readValue(c.getArchSpecs(), new TypeReference