Bug 1319764

Summary: Hardware.Volumes data not available for VMware VMs
Product: Red Hat CloudForms Management Engine Reporter: Prasad Mukhedkar <pmukhedk>
Component: ReportingAssignee: Yuri Rudman <yrudman>
Status: CLOSED ERRATA QA Contact: Satyajit Bulage <sbulage>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: anewman, carnott, cpelland, dajohnso, gtanzill, jhardy, jprause, mfeifer, obarenbo, simaishi, ssainkar, thenness, yrudman
Target Milestone: GAKeywords: ZStream
Target Release: 5.6.0   
Hardware: x86_64   
OS: Linux   
Whiteboard: vmware:vm:smartstate
Fixed In Version: 5.6.0.8 Doc Type: Bug Fix
Doc Text:
Previously, Hardware.Volumes attributes (free space, free space %, used space, etc.) data was not getting populated for VMware virtual machines. This was because the expression used to create report was using checkall instead of checkany. With this update, changing 'checkall' to 'checkany' in FIND expression in yaml solved this issue for reports.
Story Points: ---
Clone Of:
: 1321604 (view as bug list) Environment:
Last Closed: 2016-06-29 15:44:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1321604    

Description Prasad Mukhedkar 2016-03-21 13:13:02 UTC
Description of problem:

Hardware.Volumes attributes (free space, free space %, used space, etc.) data 
is not getting populated for vmware VMs. Smart State analysis has been done 
on the vms/hosts/datastore but still all the fields show empty. 

What process populates the Volume table?  Is there another place we should 
look to get disk usage reports for ESX VMs?


Version-Release number of selected component (if applicable):
cfme 5.5

How reproducible:
always 

Steps to Reproduce:
1. Enable capacity and utilization data collection.
2. Run smart state analysis on the VMs
3. Generate ""VMs with Volume Free Space <= 20%" reports

Actual results:

Empty Report

Expected results:
Report with all the data populated properly 

Additional info:

Comment 2 Prasad Mukhedkar 2016-03-23 06:21:40 UTC
From what we are seeing on our system, it looks like some data is being gathered.  A spot check of the related systems found them to be templates.  The following is a dump of the Volume table.

 script/rails c
[DEPRECATION] `configure` is removed in secure_headers 3.x. Instead use `default`.
Loading production environment (Rails 4.2.5.1)
irb(main):001:0> Volume.all
  Volume Inst Including Associations (21.5ms - 23rows)
=> #<ActiveRecord::Relation [#<Volume id: 200000000000001, name: "C:", typ: "physical", filesystem: "NTFS", created_on: "2016-03-16 17:53:21", updated_on: "2016-03-16 17:53:21", hardware_id: 200000000000416, volume_group: "***physical_scsi0:0:1", uid: nil, size: 42947575808, free_space: 27709403136, used_space: 15238172672>, #<Volume id: 100000000000001, name: "C:", typ: "physical", filesystem: "NTFS", created_on: "2016-03-16 17:54:12", updated_on: "2016-03-16 17:54:12", hardware_id: 100000000000044, volume_group: "***physical_scsi0:0:1", uid: nil, size: 53684994048, free_space: 32345161728, used_space: 21339832320>, #<Volume id: 100000000000002, name: "", typ: "physical", filesystem: nil, created_on: "2016-03-16 17:54:12", updated_on: "2016-03-16 17:54:12", hardware_id: 100000000000044, volume_group: "***physical_scsi0:1:0", uid: nil, size: 53687091200, free_space: nil, used_space: nil>, #<Volume id: 200000000000002, name: "C:", typ: "physical", filesystem: "NTFS", created_on: "2016-03-16 17:54:39", updated_on: "2016-03-16 17:54:39", hardware_id: 200000000000414, volume_group: "***physical_scsi0:0:1", uid: nil, size: 41943040000, free_space: 781541376, used_space: 41161498624>, #<Volume id: 200000000000003, name: "D:", typ: "physical", filesystem: "NTFS", created_on: "2016-03-16 17:54:39", updated_on: "2016-03-16 17:54:39", hardware_id: 200000000000414, volume_group: "***physical_scsi0:1:1", uid: nil, size: 42946527232, free_space: 22046257152, used_space: 20900270080>, #<Volume id: 100000000000003, name: "C:", typ: "physical", filesystem: "NTFS", created_on: "2016-03-16 18:19:52", updated_on: "2016-03-16 18:19:52", hardware_id: 100000000000136, volume_group: "***physical_scsi0:0:1", uid: nil, size: 42946527232, free_space: 11473469440, used_space: 31473057792>, #<Volume id: 200000000000004, name: "", typ: "physical", filesystem: nil, created_on: "2016-03-16 18:32:14", updated_on: "2016-03-16 18:32:14", hardware_id: 200000000000034, volume_group: "***physical_scsi0:0:1", uid: nil, size: 104857600, free_space: nil, used_space: nil>, #<Volume id: 200000000000005, name: "C:", typ: "physical", filesystem: "NTFS", created_on: "2016-03-16 18:32:14", updated_on: "2016-03-16 18:32:14", hardware_id: 200000000000034, volume_group: "***physical_scsi0:0:2", uid: nil, size: 53580136448, free_space: 2567086080, used_space: 51013050368>, #<Volume id: 200000000000006, name: "D:", typ: "physical", filesystem: "NTFS", created_on: "2016-03-16 18:32:14", updated_on: "2016-03-16 18:32:14", hardware_id: 200000000000034, volume_group: "***physical_scsi0:2:1", uid: nil, size: 53683945472, free_space: 20653387776, used_space: 33030557696>, #<Volume id: 100000000000004, name: "C:", typ: "physical", filesystem: "NTFS", created_on: "2016-03-16 18:20:45", updated_on: "2016-03-16 18:20:45", hardware_id: 100000000000145, volume_group: "***physical_scsi0:0:1", uid: nil, size: 42946527232, free_space: 18268962816, used_space: 24677564416>, ...]>

but unable to generate any report

Comment 3 Dave Johnson 2016-03-31 02:01:30 UTC
Alex, can you see about reproducing this please.

Comment 6 Yuri Rudman 2016-05-18 13:01:18 UTC
PR merged: https://github.com/ManageIQ/manageiq/pull/8700

Five reports were fixed:
  VMs with Volume Free Space > 50% by Department
  VMs w/Free Space > 75% by Function"
  VMs w/Free Space > 75% by LOB
  VMs with Volume Free Space <= 20%
  VMs with Volume Free Space >= 80%

Comment 7 Satyajit Bulage 2016-06-03 09:58:48 UTC
Able to populate all the data properly. Also, data is gathered in volume table. Following Reports are properly populated:
VMs with Volume Free Space > 50% by Department
VMs w/Free Space > 75% by Function"
VMs w/Free Space > 75% by LOB
VMs with Volume Free Space <= 20%
VMs with Volume Free Space >= 80%.

Verified Version :-5.6.0.9-rc2.20160531154046_b4e2f6d

Comment 11 errata-xmlrpc 2016-06-29 15:44:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1348