Description of problem: openshift vms using G, M units cause storage consumption to be ignored in reports Version-Release number of selected component (if applicable): cloudforms 5.10.13.1 openshift 5.10.z@07374985 How reproducible: all the time (customer environment Steps to Reproduce: 1. set vms in openshift to use M as a unit 2. refresh provider 3. generate report on storage consumption of the provider Actual results: no value in the report Expected results: values in the report Additional info: durring refreshes, warnings are raised : 1847947:[----] W, [2019-11-30T15:53:49.948766 #20100:9fb118] WARN -- : MIQ(ManageIQ::Providers::Openshift::ContainerManager::RefreshParser#parse_capacity_field) Capacity attribute - storage was in bad format - 50M 1847948:[----] W, [2019-11-30T15:53:50.031714 #20100:9fb118] WARN -- : MIQ(ManageIQ::Providers::Openshift::ContainerManager::RefreshParser#parse_capacity_field) Capacity attribute - storage was in bad format - 100G 1847949:[----] W, [2019-11-30T15:53:50.033720 #20100:9fb118] WARN -- : MIQ(ManageIQ::Providers::Openshift::ContainerManager::RefreshParser#parse_capacity_field) Capacity attribute - storage was in bad format - 50M 1847950:[----] W, [2019-11-30T15:53:50.035234 #20100:9fb118] WARN -- : MIQ(ManageIQ::Providers::Openshift::ContainerManager::RefreshParser#parse_capacity_field) Capacity attribute - storage was in bad format - 50M 1847951:[----] W, [2019-11-30T15:53:50.036692 #20100:9fb118] WARN -- : MIQ(ManageIQ::Providers::Openshift::ContainerManager::RefreshParser#parse_capacity_field) Capacity attribute - storage was in bad format - 1G 1847952:[----] W, [2019-11-30T15:53:50.038182 #20100:9fb118] WARN -- : MIQ(ManageIQ::Providers::Openshift::ContainerManager::RefreshParser#parse_capacity_field) Capacity attribute - storage was in bad format - 50M
https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/352
New commit detected on ManageIQ/manageiq-providers-kubernetes/master: https://github.com/ManageIQ/manageiq-providers-kubernetes/commit/89de5b82c12e47bf632017a59d5fd79dd7e18c4e commit 89de5b82c12e47bf632017a59d5fd79dd7e18c4e Author: Adam Grare <agrare> AuthorDate: Thu Dec 12 09:52:46 2019 -0500 Commit: Adam Grare <agrare> CommitDate: Thu Dec 12 09:52:46 2019 -0500 Fix parsing capacity fields of the form 50M or 1G If the storage capacity attribute is of the form 50M or 1G the parse_capacity_field method which only expects IEC 60027-2 style values will fail: ``` MIQ(ManageIQ::Providers::Openshift::ContainerManager::RefreshParser#parse_capacity_field) Capacity attribute - storage was in bad format - 1G ``` Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1782902 app/models/manageiq/providers/kubernetes/container_manager/refresh_parser.rb | 2 +- spec/models/manageiq/providers/kubernetes/container_manager/refresh_parser_spec.rb | 48 + 2 files changed, 49 insertions(+), 1 deletion(-)