Bug 1420448

Summary: numbers in storage inventory don't correspond with search result on the links
Product: [oVirt] ovirt-engine-dashboard Reporter: Lucie Leistnerova <lleistne>
Component: CoreAssignee: Scott Dickerson <sdickers>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Novotny <pnovotny>
Severity: high Docs Contact:
Priority: high    
Version: 1.1.0CC: bugs, gshereme, mgoldboi, oourfali, vszocs, ykaul
Target Milestone: ovirt-4.1.2Flags: mgoldboi: ovirt-4.1?
rule-engine: ovirt-4.2?
ykaul: exception?
gshereme: planning_ack?
gshereme: devel_ack+
rule-engine: testing_ack+
Target Release: 1.1.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-23 08:20:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: UX RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
inventory
none
search result from '3 Storage Domains' none

Description Lucie Leistnerova 2017-02-08 16:41:59 UTC
Created attachment 1248642 [details]
inventory

Description of problem:
I have in storage inventory

3 Storage Domains
Warning: 1 Down: 1 Up: 1

But link on Storage Domains shows 5 storages, on Warning 2 storages and Down also 2 storages.

Version-Release number of selected component (if applicable):
ovirt-engine-dashboard-1.1.0-1.el7ev.x86_64

How reproducible: when used other than Data storages


Steps to Reproduce:
1. add to engine export and ISO storage, no matter in which state they are
2. go to dashboard, see attachments

Actual results: numbers in inventory and their search result are not the same


Expected results: numbers in inventory and their search result are the same


Additional info:
There is no tooltip on the storage inventory and therefore I don't know why are there only Data storages counted.

Comment 1 Lucie Leistnerova 2017-02-08 16:43:15 UTC
Created attachment 1248643 [details]
search result from '3 Storage Domains'

Comment 2 Vojtech Szocs 2017-02-09 17:41:41 UTC
DashboardDataServlet takes inventory data out of Engine DB, we should check DashboardDataServlet#lookupInventory method impl.

Comment 3 Scott Dickerson 2017-02-13 18:43:36 UTC
dashboard.InventoryHelper.getStorageInventoryStatus(DataSource)
 -> dashboard.dao.StorageDomainEngineDao.getStorageInventoryStatus()
  -> SQL: "SELECT id, status FROM storage_domains WHERE storage_domain_type IN (0,1)"

from enum org.ovirt.engine.core.common.businessentities.StorageDomainType:
    Master(0),
    Data(1),
    ISO(2),
    ImportExport(3),
    Image(4),
    Volume(5),
    Unknown(6);

By design, the status cards only summarize/count Master and Data type storage domains.

Comment 4 Greg Sheremeta 2017-02-13 19:55:17 UTC
(In reply to Scott Dickerson from comment #3)
> dashboard.InventoryHelper.getStorageInventoryStatus(DataSource)
>  -> dashboard.dao.StorageDomainEngineDao.getStorageInventoryStatus()
>   -> SQL: "SELECT id, status FROM storage_domains WHERE storage_domain_type
> IN (0,1)"
> 
> from enum org.ovirt.engine.core.common.businessentities.StorageDomainType:
>     Master(0),
>     Data(1),
>     ISO(2),
>     ImportExport(3),
>     Image(4),
>     Volume(5),
>     Unknown(6);
> 
> By design, the status cards only summarize/count Master and Data type
> storage domains.

@Yaniv or Oved, thoughts on this? It's basically an inconsistent UX, where the Storage tab can show many more domains than the dashboard.

Comment 5 Yaniv Kaul 2017-02-13 20:00:28 UTC
I think it's good enough. The rest are less interesting. We can get feedback about it if it bothers anyone. (And we'd be happy to deprecate some of the others anyway - such as ISO and export).
Moran?

Comment 6 Scott Dickerson 2017-02-15 20:19:37 UTC
I spoke with the rest of the UX/dashboard team about the storage domain card.  The status card only counts master/data SDs because only master/data SDs are included in the storage utilization and heat map charts.

There are few easy options to move forward on:
 1. Do nothing because it is working as designed.
 2. Change the status card's label from "Storage Domains" to "Data Storage Domains" or something similar.
 3. Add a tooltip to the card's label that says something similar to "Only master and data storage domains are counted".
 4. Change the query to return all storage domain types.

And a much more complicated options:
 5. Extend the engine storage search/filter bar to allow specifying the storage domain type (only the storage type is currently supported) and have the status card click only show the SD types that are included in its counts.

Oved, Yaniv, Moran - preferences?

Comment 7 Yaniv Kaul 2017-02-15 20:24:20 UTC
#2 and/or #3 make sense to me.

Comment 8 Oved Ourfali 2017-02-16 06:32:11 UTC
(In reply to Scott Dickerson from comment #6)
> I spoke with the rest of the UX/dashboard team about the storage domain
> card.  The status card only counts master/data SDs because only master/data
> SDs are included in the storage utilization and heat map charts.
> 
> There are few easy options to move forward on:
>  1. Do nothing because it is working as designed.
>  2. Change the status card's label from "Storage Domains" to "Data Storage
> Domains" or something similar.

Sounds like an easy one, but the link of the search will still show more data.
So, technically it will not solve the issue.
But I'm okay with it.

>  3. Add a tooltip to the card's label that says something similar to "Only
> master and data storage domains are counted".
>  4. Change the query to return all storage domain types.
> 
> And a much more complicated options:
>  5. Extend the engine storage search/filter bar to allow specifying the
> storage domain type (only the storage type is currently supported) and have
> the status card click only show the SD types that are included in its counts.
> 

That's the right solution.
We can open an RFE on that one, question is whether this will ever get prioritized.

Scott - please go with #2 and open a bug on #5. Once you see #5 happens, we'll adjust the queries as well.


> Oved, Yaniv, Moran - preferences?

Comment 9 Moran Goldboim 2017-03-21 11:54:34 UTC
(In reply to Oved Ourfali from comment #8)
> (In reply to Scott Dickerson from comment #6)
> > I spoke with the rest of the UX/dashboard team about the storage domain
> > card.  The status card only counts master/data SDs because only master/data
> > SDs are included in the storage utilization and heat map charts.
> > 
> > There are few easy options to move forward on:
> >  1. Do nothing because it is working as designed.
> >  2. Change the status card's label from "Storage Domains" to "Data Storage
> > Domains" or something similar.
> 
> Sounds like an easy one, but the link of the search will still show more
> data.
> So, technically it will not solve the issue.
> But I'm okay with it.
> 
> >  3. Add a tooltip to the card's label that says something similar to "Only
> > master and data storage domains are counted".
> >  4. Change the query to return all storage domain types.
> > 
> > And a much more complicated options:
> >  5. Extend the engine storage search/filter bar to allow specifying the
> > storage domain type (only the storage type is currently supported) and have
> > the status card click only show the SD types that are included in its counts.
> > 
> 
> That's the right solution.
> We can open an RFE on that one, question is whether this will ever get
> prioritized.
> 
> Scott - please go with #2 and open a bug on #5. Once you see #5 happens,
> we'll adjust the queries as well.
> 

+1, that would give a good enough answer to the dashboard UX for now.

> 
> > Oved, Yaniv, Moran - preferences?

Comment 10 Scott Dickerson 2017-03-27 21:13:35 UTC
Please reference BZ1436403 for the request to have a filter term added for Storage Domains to allow filtering based on storage domain type.

Comment 11 Pavel Novotny 2017-04-26 16:40:11 UTC
Verified in
rhevm-4.1.2-0.1.el7.noarch
ovirt-engine-dashboard-1.1.2-1.el7ev.noarch

The storage inventory card label has been changed from "Storage Domains" to "Data Storage Domains" to emphasize that only data domains are included.