Bug 2026263
| Summary: | getStats should report if the data is real or initial | ||
|---|---|---|---|
| Product: | [oVirt] vdsm | Reporter: | Yedidyah Bar David <didi> | 
| Component: | Core | Assignee: | Milan Zamazal <mzamazal> | 
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Polina <pagranat> | 
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | --- | CC: | ahadas, bugs, lrotenbe | 
| Target Milestone: | ovirt-4.5.0 | Keywords: | CodeChange | 
| Target Release: | 4.50.0.4 | Flags: | pm-rhel:
                ovirt-4.5? | 
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | vdsm-4.50.0.4 | Doc Type: | If docs needed, set a value | 
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2022-04-20 06:33:59 UTC | Type: | Bug | 
| Regression: | --- | Mount Type: | --- | 
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| 
        
          Description
        
        
          Yedidyah Bar David
        
        
        
        
        
          2021-11-24 08:10:24 UTC
        
       Summarizing offline discussion on this - it would be best to remove the fields altogether from the stats when we don't receive them from libvirt But before doing that we should check MOM and ovirt-engine As for MoM, these values aren't used anywhere so nothing bad should happen if they are not available. And MoM doesn't log any error if they are not provided. A bit of confusion arises from the fact that the presence of at least cpuUsage was ensured with a specific reference to MoM. But a little more gerrit archeology reveals the reason: "But what happens is that getAllVmStats crashes [when cpuUsage is unavailable] and MOM gets exception instead of a missing value." So it should be all right with respect to MoM as long as everything works correctly on the Vdsm side. The engine usage is mostly for representing the data in API. The only one differs is the cpuUsage which in use for other flows(HA, policies, scheduling). But we do check if it's null first and have another calculation when it's unavailable. I think we can try to omit those and see if we encounter any problem. Initially the engine set it with 0 in the DB. From comment #0 is sounds that HE-HA uses VDSM directly. So I think it should be fine to all parties. No need to verify this, it's done for the hosted engine ha-agent Verified on ovirt-engine-4.5.0.1-601.f26e9ea8cac5.3.el8ev.noarch, vdsm-4.50.0.10-1.el8ev.x86_64
start VM (tested for regular and HE VM) and run the following command:
[root@ocelot06 ~]# for i in {1..20}; do vdsm-client VM getStats vmID="64465398-6d7c-475d-8a70-729e2440fc92" |grep cpu;sleep 0.5; done
        "cpuActual": false,
        "cpuSys": "0.00",
        "cpuUsage": "0.00",
        "cpuUser": "0.00",
        "vcpuPeriod": 100000,
        "vcpuQuota": "-1",
        ...
        ...
        ...
        "cpuActual": true,
        "cpuSys": "0.00",
        "cpuUsage": "480000000",
        "cpuUser": "0.23",
        "vcpuCount": "1",
        "vcpuPeriod": 100000,
        "vcpuQuota": "-1",
This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022. Since the problem described in this bug report should be resolved in oVirt 4.5.0 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report. |