Revision ff05ff94
b/lib/hypervisor/hv_base.py | ||
---|---|---|
244 | 244 |
- memory_free: the available memory on the node for instances |
245 | 245 |
- memory_dom0: the memory used by the node itself, if available |
246 | 246 |
- cpu_total: total number of CPUs |
247 |
- cpu_dom0: number of CPUs used by the node OS |
|
247 | 248 |
- cpu_nodes: number of NUMA domains |
248 | 249 |
- cpu_sockets: number of physical CPU sockets |
249 | 250 |
|
... | ... | |
479 | 480 |
- memory_free: the available memory on the node for instances |
480 | 481 |
- memory_dom0: the memory used by the node itself, if available |
481 | 482 |
- cpu_total: total number of CPUs |
483 |
- cpu_dom0: number of CPUs used by the node OS |
|
482 | 484 |
- cpu_nodes: number of NUMA domains |
483 | 485 |
- cpu_sockets: number of physical CPU sockets |
484 | 486 |
|
... | ... | |
519 | 521 |
except EnvironmentError, err: |
520 | 522 |
raise errors.HypervisorError("Failed to list node info: %s" % (err,)) |
521 | 523 |
result["cpu_total"] = cpu_total |
524 |
# We assume that the node OS can access all the CPUs |
|
525 |
result["cpu_dom0"] = cpu_total |
|
522 | 526 |
# FIXME: export correct data here |
523 | 527 |
result["cpu_nodes"] = 1 |
524 | 528 |
result["cpu_sockets"] = 1 |
b/lib/hypervisor/hv_xen.py | ||
---|---|---|
241 | 241 |
for (name, _, mem, vcpus, _, _) in instance_list: |
242 | 242 |
if name == _DOM0_NAME: |
243 | 243 |
info["memory_dom0"] = mem |
244 |
info["dom0_cpus"] = vcpus
|
|
244 |
info["cpu_dom0"] = vcpus
|
|
245 | 245 |
|
246 | 246 |
# Include Dom0 in total memory usage |
247 | 247 |
total_instmem += mem |
b/test/py/ganeti.hypervisor.hv_xen_unittest.py | ||
---|---|---|
240 | 240 |
result = hv_xen._MergeInstanceInfo({}, instance_list) |
241 | 241 |
self.assertEqual(result, { |
242 | 242 |
"memory_dom0": 4096, |
243 |
"dom0_cpus": 7,
|
|
243 |
"cpu_dom0": 7,
|
|
244 | 244 |
}) |
245 | 245 |
|
246 | 246 |
def testWithNodeInfo(self): |
... | ... | |
251 | 251 |
"cpu_nodes": 1, |
252 | 252 |
"cpu_sockets": 2, |
253 | 253 |
"cpu_total": 4, |
254 |
"dom0_cpus": 7,
|
|
254 |
"cpu_dom0": 7,
|
|
255 | 255 |
"hv_version": (4, 0), |
256 | 256 |
"memory_dom0": 4096, |
257 | 257 |
"memory_free": 8004, |
Also available in: Unified diff