Bug 1846273

Summary: Cloudforms no longer sees vms in resource pools after some targetted refreshes are ran
Product: Red Hat CloudForms Management Engine Reporter: Felix Dewaleyne <fdewaley>
Component: ProvidersAssignee: Roberto Ciatti <rciatti>
Status: CLOSED ERRATA QA Contact: Tasos Papaioannou <tpapaioa>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.11.5CC: dmetzger, fdewaley, jfrey, juwatts, mheppler, mperina, mshriver, obarenbo, rciatti, simaishi, smallamp, xlecauch
Target Milestone: GAKeywords: ZStream
Target Release: 5.11.8Flags: simaishi: cfme-5.11.z+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.11.8.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-09-30 14:01:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM Target Upstream Version:
Embargoed:

Description Felix Dewaleyne 2020-06-11 09:19:35 UTC
Description of problem:
After upgrading RHV to 4.3.9, cloudforms no longer sees vms in ressource pools

Version-Release number of selected component (if applicable):
RHV 4.3.9.4-11.el7
CloudForms 5.11.5


How reproducible:
all the time

Steps to Reproduce:
1. set up RHV as a provider to a 5.11.5 cloudforms environment
2. set up multiple vms, some in a ressource pool
3. upgrade the RHV to 4.3.9.4-11

Actual results:
the ressource pool will be listed with 0 vms while vm information continue to be pooled with no error

Expected results:
the ressource pools are correctly updated

Additional info:
there are 2 providers in the (sub)region affected, this is aa multi region setup with a central region.  each provider has its different zone and set of appliances, spread to scale with usage.

ressource pools are listed under compute > infrastructure > ressource pools

Comment 42 CFME Bot 2020-08-13 15:00:31 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/487bd5f45a3b7c67c26d433fd10ee76ab46fca46
commit 487bd5f45a3b7c67c26d433fd10ee76ab46fca46
Author:     Adam Grare <agrare>
AuthorDate: Thu Aug 13 13:26:37 2020 +0000
Commit:     Adam Grare <agrare>
CommitDate: Thu Aug 13 13:31:00 2020 +0000

    Don't disconnect resource pools in refresh_new_target

    When saving a new VM using the legacy refresh_new_target we rely on not
    deleting records that aren't related to the new target for this to work.

    The save_resource_pools_inventory method was incorrectly assuming that
    not setting target = ems and then later checking target == ems
    (aka a full refresh) to see what it should delete, but in the case
    of refresh_new_target the target is already the ems so every
    resource pool except the one the VM was on was being deleted.

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

 app/models/ems_refresh/save_inventory_infra.rb | 6 +-
 1 file changed, 3 insertions(+), 3 deletions(-)

Comment 43 CFME Bot 2020-08-19 17:15:27 UTC
New commit detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/b5bff98faff4fa1031a8e84b8433531d8d2fb088
commit b5bff98faff4fa1031a8e84b8433531d8d2fb088
Author:     Oleg Barenboim <chessbyte>
AuthorDate: Thu Aug 13 14:55:51 2020 +0000
Commit:     Satoe Imaishi <simaishi>
CommitDate: Wed Aug 19 17:11:33 2020 +0000

    Merge pull request #20441 from agrare/dont_disconnect_resource_pool_from_refresh_new_target

    Don't disconnect resource pools in refresh_new_target

    (cherry picked from commit ee5cc8cd9bcc217698082c23405ae560575501f9)

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

 app/models/ems_refresh/save_inventory_infra.rb | 6 +-
 1 file changed, 3 insertions(+), 3 deletions(-)

Comment 46 Tasos Papaioannou 2020-09-11 16:31:56 UTC
Verified on 5.11.8.0.

Comment 57 errata-xmlrpc 2020-09-30 14:01:07 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 (Moderate: CloudForms 5.0.8 security, bug fix and enhancement update), 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-2020:4134