Bug 1497708 - Expose host hugepages to REST API
Summary: Expose host hugepages to REST API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.2.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.2.0
: ---
Assignee: Tomas Jelinek
QA Contact: Lucie Leistnerova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-02 13:44 UTC by Artyom
Modified: 2017-12-20 11:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-20 11:03:31 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.2+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 82953 0 master MERGED restapi: add support to show hugepages 2017-10-23 06:57:29 UTC

Description Artyom 2017-10-02 13:44:39 UTC
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:

Comment 1 Juan Hernández 2017-10-02 13:50:43 UTC
Why is that information needed? Why via the API?

Comment 2 Artyom 2017-10-02 14:31:04 UTC
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

Comment 3 Juan Hernández 2017-10-02 14:42:58 UTC
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?

Comment 4 Artyom 2017-10-02 14:48:33 UTC
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

Comment 5 Juan Hernández 2017-10-02 15:32:24 UTC
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?

Comment 6 Artyom 2017-10-03 06:39:32 UTC
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.

Comment 7 Tomas Jelinek 2017-10-03 07:57:38 UTC
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

Comment 8 Michal Skrivanek 2017-11-24 15:19:46 UTC
done?

Comment 9 Tomas Jelinek 2017-11-27 07:55:25 UTC
yes

Comment 10 Lucie Leistnerova 2017-12-11 13:16:51 UTC
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

Comment 11 Sandro Bonazzola 2017-12-20 11:03:31 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.