Dan Kenigsberg has posted comments on this change.
Change subject: api: Report CPU thread info in getVdsCapabilities
......................................................................
Patch Set 3: I would prefer that you didn't submit this
(1 inline comment)
the suggested API is tightly coupled with an ugly hack we pushed to vdsm in
order not to solve the issue properly on the first strike.
If we had not have the original issue, I think we'd have a simpler API
reporting only cpuThreads and cpuCores; with no funny boolean flags.
Let us strive to that position as much as we can.
How about asking whoever used report_host_threads_as_cores to unset it once
they install Engine 3.2 ? I think that these are very few people, that would
not mind this very much.
If this is impossible, I'd add a cpuCores2, always reporting the true number,
to be used by new Engines. We may even report it only on the very few cases of
report_host_threads_as_cores being set.
....................................................
File vdsm/caps.py
Line 252: os.path.exists('/dev/kvm')).lower()
Line 253:
Line 254: cpuInfo = CpuInfo()
Line 255: cpuTopology = CpuTopology()
Line 256: caps['cpuThreadsEnabled'] = \
I think that the API would be much cleaner and more useful if we report the
number of threads, and let the client do the comparison.
BTW, we can (and should) report booleans instead of str(boolean).
Line 257: str(cpuTopology.threads() != cpuTopology.cores()).lower()
Line 258:
Line 259: if config.getboolean('vars', 'report_host_threads_as_cores'):
Line 260: caps['cpuCores'] = str(cpuTopology.threads())
--
To view, visit http://gerrit.ovirt.org/10144
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If6868f3947ade62dda7cb6265b0c9e50c2face94
Gerrit-PatchSet: 3
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Greg Padgett <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Greg Padgett <[email protected]>
Gerrit-Reviewer: Noam Slomianko <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches