Bug 1510499

Summary: With RHV Graph refresh template numbers in Provider inventory does not get updated correctly.
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ProvidersAssignee: Boriso <bodnopoz>
Status: CLOSED ERRATA QA Contact: Ilanit Stein <istein>
Severity: high Docs Contact:
Priority: high    
Version: 5.9.0CC: bodnopoz, gblomqui, istein, jfrey, jhardy, jprause, jzmeskal, mgoldboi, mperina, obarenbo, pkliczew, simaishi
Target Milestone: GAKeywords: ZStream
Target Release: 5.9.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rhev:graph refresh
Fixed In Version: 5.9.2.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1508465 Environment:
Last Closed: 2018-05-07 20:42:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM Target Upstream Version:
Embargoed:
Bug Depends On: 1508465    
Bug Blocks:    

Comment 2 Greg Blomquist 2017-11-16 23:21:25 UTC
Gaprindashvili backport details:

$ git log -1
commit 14d59826582802cbf7f9eeca538ecd83209bc246
Author: Moti Asayag <masayag>
Date:   Mon Nov 6 13:40:34 2017 +0200

    Merge pull request #128 from jhernand/dont_close_connections_explicitly
    
    Don't close connection explicitly
    (cherry picked from commit 18e76e3109420cb9bfaee3117ab43a438138d142)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1510499

Comment 3 CFME Bot 2017-11-29 20:45:25 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/gaprindashvili:
https://github.com/ManageIQ/manageiq-providers-ovirt/commit/f7f7ad5526d6f8b8a1b799a6eaa156689c03014e

commit f7f7ad5526d6f8b8a1b799a6eaa156689c03014e
Author:     Moti Asayag <masayag>
AuthorDate: Mon Nov 6 11:51:43 2017 +0200
Commit:     Satoe Imaishi <simaishi>
CommitDate: Tue Nov 7 10:04:03 2017 -0500

    Merge pull request #129 from pkliczewski/graph_update
    
    Handle partial vm entity during creation
    (cherry picked from commit 3c1c04022220bfe8b64cac3775b58c7692ea0ea7)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1510499

 .../providers/redhat/inventory/collector/target_collection.rb     | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comment 4 CFME Bot 2017-11-29 20:45:31 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/gaprindashvili:
https://github.com/ManageIQ/manageiq-providers-ovirt/commit/14d59826582802cbf7f9eeca538ecd83209bc246

commit 14d59826582802cbf7f9eeca538ecd83209bc246
Author:     Moti Asayag <masayag>
AuthorDate: Mon Nov 6 13:40:34 2017 +0200
Commit:     Satoe Imaishi <simaishi>
CommitDate: Tue Nov 7 10:05:27 2017 -0500

    Merge pull request #128 from jhernand/dont_close_connections_explicitly
    
    Don't close connection explicitly
    (cherry picked from commit 18e76e3109420cb9bfaee3117ab43a438138d142)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1510499

 .../redhat/infra_manager/api_integration.rb        |  2 --
 .../redhat/infra_manager/vm/operations/snapshot.rb | 24 ++--------------------
 .../infra_manager/operations/snapshot_spec.rb      |  9 ++++----
 3 files changed, 6 insertions(+), 29 deletions(-)

Comment 5 Ilanit Stein 2017-12-13 06:54:46 UTC
Tested on CFME-5.9.0.10+RHV Graph refresh ON/RHV-4.1.8:


1. "Hosts & Clusters", "Vms & Templates" fields are not populated: Contain 'N/A'
=> Now solved. Those 2 fields show "Available"

2. Templates number do not get updated, though several templates were added on the RHV side, and though a target refresh was triggered, on CFME side.
=> Problem still exist.

Piotr,
Can you please take a check?

Thanks.

Comment 6 Piotr Kliczewski 2017-12-13 09:29:20 UTC
It seems that recent fixes for BZ #1517852 caused regressions since they were implemented only for regular refresh. I suggest to handle the issue there since this BZ was fixed first.

Comment 7 Ilanit Stein 2017-12-13 10:51:13 UTC
Further to comment 6,
This bug cannot be fully verified on CFME-5.9.0.12.
It depends on bug 1525254 (5.9 clone of BZ #1517852)

Comment 8 Piotr Kliczewski 2017-12-13 10:55:31 UTC
I can see that the problem exists on master as well.

Comment 9 Jan Zmeskal 2017-12-21 13:46:11 UTC
(In reply to Piotr Kliczewski from comment #8)
> I can see that the problem exists on master as well.

Is the bug ready for verification?

Comment 10 Piotr Kliczewski 2017-12-21 14:14:08 UTC
It looks like BZ #1525254 is verified so I think it is ready. There was a regression introduced when fixing it but hopefully it was removed.

Comment 11 Ilanit Stein 2018-01-04 10:25:36 UTC
Tested on CFME-5.9.0.15+RHV Graph refresh/RHV-4.1.8:

Templates added on RHV side, trigger targeted refresh on CFME side,
however, the templates are not displayed on CFME side:
Nor on the total count in the RHV provider page,
neither on the VMs & Templates page.

Seems this Bug is yet fixed.

Piotr,
Can you please take a look?

thanks.

Comment 12 Piotr Kliczewski 2018-01-04 10:53:45 UTC
Ilanit,

As I mentioned comment #6 and comment #10 that I saw this regression. It seems that BZ #1525254 fixed regular refresh and broke graph.

Comment 13 Ilanit Stein 2018-01-04 14:07:42 UTC
Based on comments 11, 12, moving back to ASSIGNED.

Comment 14 Martin Perina 2018-01-16 12:17:02 UTC
We won't be able to make it for 5.9.0, so moving to 5.9.1

Comment 15 Boriso 2018-02-14 11:20:33 UTC
This was fixed by:
https://github.com/ManageIQ/manageiq-providers-ovirt/pull/203

Comment 16 Martin Perina 2018-02-14 11:27:01 UTC
(In reply to Boriso from comment #15)
> This was fixed by:
> https://github.com/ManageIQ/manageiq-providers-ovirt/pull/203

Waiting for above to be backported. Once backport merged, we can move to MODIFIED

Comment 23 CFME Bot 2018-03-07 14:12:38 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/gaprindashvili:

https://github.com/ManageIQ/manageiq-providers-ovirt/commit/7956b9b91e4ae61df86e3bb27e0405106f020c8c
commit 7956b9b91e4ae61df86e3bb27e0405106f020c8c
Author:     Piotr Kliczewski <piotr.kliczewski>
AuthorDate: Tue Feb  6 06:22:24 2018 -0500
Commit:     Piotr Kliczewski <piotr.kliczewski>
CommitDate: Tue Feb  6 06:22:24 2018 -0500

    Merge pull request #203 from borod108/add_specs_for_targeted

    Add fix and add specs for graph targeted refresh
    (cherry picked from commit 744559cf973bc42b71fcaabae35759e314561797)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1510499

 app/models/manageiq/providers/redhat/inventory/collector/target_collection.rb | 29 +-
 app/models/manageiq/providers/redhat/inventory_collection_default/infra_manager.rb | 55 +
 spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_graph_target_template_spec.rb | 57 +
 spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_graph_target_vm_spec.rb | 57 +
 spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_target_template_disconnect_spec.rb | 47 +
 spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_target_template_spec.rb | 47 -
 spec/vcr_cassettes/manageiq/providers/redhat/infra_manager/refresh/ovirt_sdk_refresh_graph_target_template.yml | 3759 +
 spec/vcr_cassettes/manageiq/providers/redhat/infra_manager/refresh/ovirt_sdk_refresh_graph_target_vm.yml | 4122 +
 spec/vcr_cassettes/manageiq/providers/redhat/infra_manager/refresh/ovirt_sdk_target_template_disconnect.yml | 9326 +
 spec/vcr_cassettes/manageiq/providers/redhat/infra_manager/refresh/ovirt_sdk_targeted_template.yml | 6398 -
 10 files changed, 17442 insertions(+), 6455 deletions(-)

Comment 24 Ilanit Stein 2018-04-03 05:51:44 UTC
Verified on CFME-5.9.2.0/RHV-4.2.2.

1. "Hosts & Clusters", "Vms & Templates" fields contain 'available'
2. Templates number gets updated, when template is added on the RHV side.

Comment 27 errata-xmlrpc 2018-05-07 20:42:39 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/RHSA-2018:1328