Bug 1283195
| Summary: | Host entries are no longer adopted after deletion and re-add | ||
|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Pete Savage <psavage> |
| Component: | Providers | Assignee: | Greg Blomquist <gblomqui> |
| Status: | CLOSED ERRATA | QA Contact: | Pete Savage <psavage> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 5.5.0 | CC: | cpelland, jfrey, jhardy, mfeifer, obarenbo, simaishi |
| Target Milestone: | GA | ||
| Target Release: | 5.5.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | 5.5.0.12 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-12-08 13:48:34 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: | |
| Embargoed: | |||
|
Description
Pete Savage
2015-11-18 12:35:32 UTC
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/3cd6fcd41335738c4d6982da572804f4caeff35b commit 3cd6fcd41335738c4d6982da572804f4caeff35b Author: Greg Blomquist <gblomqui> AuthorDate: Thu Nov 19 16:12:49 2015 -0500 Commit: Greg Blomquist <gblomqui> CommitDate: Mon Nov 23 12:10:39 2015 -0500 Re-adding provider will adopt old hosts When an Infrastructure Provider is deleted, the hosts associated with that Provider are left behind with a nil ems_id. If the same Infrastructure Provider is re-added, it is supposed to pick up the old orphaned hosts. f4aa372a570c934f99a5d789aaffafb8ac84c6c9 introduced a bug where re-adding a previously deleted Provider would fail to pick up orphaned hosts. It resulted in the following situation: 1. Add Provider for the first time Hosts 1: name:"hostname.domain.com", ems_id:1 2. Delete the provider Hosts 1: name:"hostname.domain.com", :ems_id:nil 3. Re-add the provider Hosts 1: name:"hostname.domain.com", ems_id:nil 2: name:"hostname.domain.com - 1", ems_id:2 This patch changes the third step to: 3. Re-add the provider Hosts 1: name:"hostname.domain.com", ems_id:2 https://bugzilla.redhat.com/show_bug.cgi?id=1283195 app/models/ems_refresh/save_inventory_infra.rb | 5 +-- spec/models/host_spec.rb | 43 +++++++++++++++++--------- 2 files changed, 32 insertions(+), 16 deletions(-) New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=474948bcf726a67aae9e3dab0c9b09c6820e5486 commit 474948bcf726a67aae9e3dab0c9b09c6820e5486 Author: Greg Blomquist <gblomqui> AuthorDate: Thu Nov 19 16:12:49 2015 -0500 Commit: Greg Blomquist <gblomqui> CommitDate: Mon Nov 23 15:56:57 2015 -0500 Re-adding provider will adopt old hosts When an Infrastructure Provider is deleted, the hosts associated with that Provider are left behind with a nil ems_id. If the same Infrastructure Provider is re-added, it is supposed to pick up the old orphaned hosts. f4aa372a570c934f99a5d789aaffafb8ac84c6c9 introduced a bug where re-adding a previously deleted Provider would fail to pick up orphaned hosts. It resulted in the following situation: 1. Add Provider for the first time Hosts 1: name:"hostname.domain.com", ems_id:1 2. Delete the provider Hosts 1: name:"hostname.domain.com", :ems_id:nil 3. Re-add the provider Hosts 1: name:"hostname.domain.com", ems_id:nil 2: name:"hostname.domain.com - 1", ems_id:2 This patch changes the third step to: 3. Re-add the provider Hosts 1: name:"hostname.domain.com", ems_id:2 https://bugzilla.redhat.com/show_bug.cgi?id=1283195 app/models/ems_refresh/save_inventory_infra.rb | 5 +-- spec/models/host_spec.rb | 43 +++++++++++++++++--------- 2 files changed, 32 insertions(+), 16 deletions(-) New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=fc7f69732168e6733cf9ca08a0a10b9a099482ea commit fc7f69732168e6733cf9ca08a0a10b9a099482ea Merge: b058ef4 474948b Author: Oleg Barenboim <obarenbo> AuthorDate: Mon Nov 23 16:41:41 2015 -0500 Commit: Oleg Barenboim <obarenbo> CommitDate: Mon Nov 23 16:41:41 2015 -0500 Merge branch 'bz1283195-readd-host-5.5.z-backport' into '5.5.z' Re-adding provider will adopt old hosts Clean cherry-pick of upstream PR: https://github.com/ManageIQ/manageiq/pull/5531 When an Infrastructure Provider is deleted, the hosts associated with that Provider are left behind with a nil ems_id. If the same Infrastructure Provider is re-added, it is supposed to pick up the old orphaned hosts. f4aa372a570c934f99a5d789aaffafb8ac84c6c9 introduced a bug where re-adding a previously deleted Provider would fail to pick up orphaned hosts. It resulted in the following situation: 1. Add Provider for the first time Hosts 1: name:"hostname.domain.com", ems_id:1 2. Delete the provider Hosts 1: name:"hostname.domain.com", :ems_id:nil 3. Re-add the provider Hosts 1: name:"hostname.domain.com", ems_id:nil 2: name:"hostname.domain.com - 1", ems_id:2 This patch changes the third step to: `3.` Re-add the provider Hosts 1: name:"hostname.domain.com", ems_id:2 https://bugzilla.redhat.com/show_bug.cgi?id=1283195 See merge request !526 app/models/ems_refresh/save_inventory_infra.rb | 5 +-- spec/models/host_spec.rb | 43 +++++++++++++++++--------- 2 files changed, 32 insertions(+), 16 deletions(-) Verified in 5.5.0.12 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-2015:2551 |