Description of problem: I can not find number of host hugepages via REST API(I check host and host statistics) Version-Release number of selected component (if applicable): ovirt-engine-4.2.0-0.0.master.20171001151854.git75e5c70.el7.centos.noarch How reproducible: Always Steps to Reproduce: 1. Try to find number of host hugepages via REST API 2. 3. Actual results: Can not find number of hugepages via REST API Expected results: I believe this information must be available via host statistics Additional info:
Why is that information needed? Why via the API?
1) I believe we need to mirror all data that I can see via UI to REST 2) In my automation test, I want to check a number of host hugepages after update of /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages and I can not do it
Not saying that we should not add that, but we can't add everything that is available in /sys/kernel. Can't yo reach the host via SSH go get that information?
This information already exposed to UI Huge Pages (size: amount): 1048576: 0, 2048: 0 It also available via vdsm-client Host getStats ... "hugepages": { "1048576": { "resv_hugepages": 0, "free_hugepages": 0, "nr_overcommit_hugepages": 0, "surplus_hugepages": 0, "vm.free_hugepages": 0, "nr_hugepages": 0, "nr_hugepages_mempolicy": 0 }, "2048": { "resv_hugepages": 0, "free_hugepages": 0, "nr_overcommit_hugepages": 0, "surplus_hugepages": 0, "vm.free_hugepages": 0, "nr_hugepages": 0, "nr_hugepages_mempolicy": 0 } } ... so I do not tell to take it from file that I specified above, I just ask to expose to REST the same thing that we have under UI
The fact that it exists in the UI doesn't mean that it needs to be in the API. If we add it to the API, then we need to keep it there for ever, with the corresponding maintenance overhead. That overhead is probably small in this particular case, but if there is another mechanism that you can use to get the same information without the API (like SSH, or vdsm-client), and there is no need for this expressed by other users of the API, then I'd rather don't add it. Michal, what do you think?
The problem that I want to know via REST API when the engine has updated information about an amount of host hugepages, I just want to avoid adding some sleep function to my code.
I agree with Artyom here, this is an information which is useful if you want to create a VM with huge pages which is important for the new high perf VMs feature. And adding it will be easy, so will be the maintenance, so I will target to 4.2
done?
yes
API returns in statistics free hugepages for every size e.g. hugepages.2048.free. If that is not enough informations feel free to open new BZ to add other values. verified in ovirt-engine-restapi-4.2.0-0.6.el7.noarch with vdsm-4.20.9-1.el7ev.x86_64
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017. Since the problem described in this bug report should be resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.