Bug 1686281
Summary: | The "VMs with Volume Free Space <= 20%" report showing VMs which has volume free space more than 20% also. | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Nikhil Gupta <ngupta> | ||||
Component: | Reporting | Assignee: | Keenan Brock <kbrock> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Parthvi Vala <pvala> | ||||
Severity: | medium | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> | ||||
Priority: | medium | ||||||
Version: | 5.10.1 | CC: | dmetzger, jprause, kbrock, mshriver, obarenbo, simaishi | ||||
Target Milestone: | GA | Keywords: | TestOnly, ZStream | ||||
Target Release: | 5.11.0 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | 5.11.0.1 | Doc Type: | If docs needed, set a value | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 1696420 (view as bug list) | Environment: | |||||
Last Closed: | 2019-12-13 15:16:27 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | Bug | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | CFME Core | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1692488, 1696420 | ||||||
Attachments: |
|
Description
Nikhil Gupta
2019-03-07 07:36:22 UTC
Created attachment 1541986 [details]
VMs with Volume Free Space <= 20% report
It looks like the miq expression is getting confused when there is no disk usage number for a volume. I put together a few disk volumes to test: NO: v1 vol_v1: 7516192768 (70.0%) of 10737418240 RPT: v2 vol_v2: 8589934592 (80.0%) of 10737418240 RPT: v3 vol_v3: 9663676416 (90.0%) of 10737418240 RPT: v4 (will hide this) vol_v4: NIL (NIL%) of NIL RPT: v5 (will hide this) vol_v5: NIL (NIL%) of 0 RPT: v6 (will hide this) vol_v6: 0 (NIL%) of NIL RPT: v7 vol_v7: 0 (0.0%) of 10737418240 vol_v7_1: 9663676416 (90.0%) of 10737418240 RPT: v8 (will hide this) vol_v8: 0 (0.0%) of 10737418240 vol_v8_1: 5368709120 (50.0%) of 10737418240 vol_v8_2: NIL (NIL%) of 10737418240 NO: v9 vol_v9: 0 (0.0%) of 10737418240 vol_v9_1: 5368709120 (50.0%) of 10737418240 vol_v9_2: 0 (0.0%) of 10737418240 vm #8 has plenty of disk space, but the "swap" volume, with the nil disk usage, is showing up as 0% free, and causing the vm to show up in the report. I will changing the procedure to say used_space_percent >= 80% - this will not show vms that have volumes with unknown disk space New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/0daf0d2a4c940e43079a81263ea91c097898df6a commit 0daf0d2a4c940e43079a81263ea91c097898df6a Author: Keenan Brock <keenan> AuthorDate: Wed Apr 3 14:57:12 2019 -0400 Commit: Keenan Brock <keenan> CommitDate: Wed Apr 3 14:57:12 2019 -0400 fix: swap makes vms out of disk space report false positive MiqExpressions convert nil to a floating point number (which is 0) nil <= 20 == true nil.to_f ==> 0 0 <= 20 == true Swap partitions have a nil free_space / free_space_percentage. so free_space_percentage <= 20 shows true for swap So any vm with a swap partition will say it is low on disk space. Fix is to ask if used space is over 80% nil >= 80 == false nil.to_f ==> 0 0 >= 80 == false https://bugzilla.redhat.com/show_bug.cgi?id=1686281 product/reports/100_Configuration Management - Virtual Machines/028_VMs with Volume Free Space -= 20%.yaml | 6 +- 1 file changed, 3 insertions(+), 3 deletions(-) FIXED. Verified on 5.11.0.2.20190430174828_0e34dea. |