fix host init set reserve memory

This commit is contained in:
wanyaoqi
2020-02-24 13:02:50 +08:00
parent 9a623e2d93
commit 914062d765
+3
View File
@@ -856,6 +856,9 @@ func (h *SHostInfo) updateHostRecord(hostId string) {
h.onFail(err)
}
content.Set("mem_size", jsonutils.NewInt(int64(memTotal)))
if len(hostId) == 0 {
content.Set("mem_reserved", jsonutils.NewInt(int64(h.getReservedMem())))
}
content.Set("storage_driver", jsonutils.NewString(api.DISK_DRIVER_LINUX))
content.Set("storage_type", jsonutils.NewString(h.sysinfo.StorageType))
content.Set("storage_size", jsonutils.NewInt(int64(storageman.GetManager().GetTotalCapacity())))