Merge lp:~ltrager/maas/parse_proc into lp:~maas-committers/maas/trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Lee Trager | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 5016 | ||||
Proposed branch: | lp:~ltrager/maas/parse_proc | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
120 lines (+51/-2) 3 files modified
src/metadataserver/models/commissioningscript.py (+23/-2) src/metadataserver/models/tests/test_commissioningscript.py (+18/-0) src/provisioningserver/refresh/node_info_scripts.py (+10/-0) |
||||
To merge this branch: | bzr merge lp:~ltrager/maas/parse_proc | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Blake Rouse (community) | Approve | ||
Andres Rodriguez (community) | Needs Fixing | ||
Review via email: mp+293844@code.launchpad.net |
Commit message
Get cpu_count from /proc/cpuinfo and memory from dmesg
Description of the change
lshw isn't giving us correct data. With this MP MAAS no longer processes the data from lshw, however it will still be captured.
With some CPU's, such as the ones in the NEC lab, lshw is only displaying the number of physical CPU's and not mentioning anything about how many cores they have. As /proc/cpuinfo shows all the cores the kernel has access to upload and process it to get the correct number of CPU cores.
lshw CPU is no longer reporting the correct amount of RAM. This isn't entirely lshw's fault as newer kernels are only reporting the amount of available RAM. RAM can be reserved by the BIOS(e.g for video cards) or by the kernel itself. I searched around a bit to try to find the closest number I could get. On boot the kernel itself prints the number closest to the amount of actual physical RAM.
As per our discussion this morning I modified Node.display_
Can you please be more specific when you say that lshw is not providing the correct information? The big problem here is that MAAS tagging based on definition feature depends on LSHW output. I'd think that instead of doing a work around because LSHW is broken, we should actually fix LSHW.
Can you please provide examples of LSHW being broken?
Also, for example, you can create a tag with a definition that has X amount of cores. This definition will scrape lshw output on all machines to tag all machines with that definition. As such, we can't just not rely on lshw without completely affecting that feature. So we really need to fix lshw.