Bug 1695008
| Summary: | vms marked orphaned following hard reboot of all esxi hosts | ||
|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Felix Dewaleyne <fdewaley> |
| Component: | Providers | Assignee: | Adam Grare <agrare> |
| Status: | CLOSED ERRATA | QA Contact: | Kedar Kulkarni <kkulkarn> |
| Severity: | urgent | Docs Contact: | Red Hat CloudForms Documentation <cloudforms-docs> |
| Priority: | urgent | ||
| Version: | 5.9.5 | CC: | agrare, dmetzger, fdewaley, jfrey, jhardy, mshriver, obarenbo, simaishi |
| Target Milestone: | GA | Keywords: | Reopened |
| Target Release: | 5.11.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Fixed In Version: | 5.11.0.1 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-12-12 13:36:09 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | Bug | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | CFME Core | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Felix Dewaleyne
2019-04-02 09:31:48 UTC
Please assess the impact of this issue and update the severity accordingly. Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition. If it's something like a tracker bug where it doesn't matter, please set the severity to Low. New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/ae7a083391db158df8e487586688133a48e0d335 commit ae7a083391db158df8e487586688133a48e0d335 Author: Adam Grare <agrare> AuthorDate: Wed Apr 3 16:13:19 2019 -0400 Commit: Adam Grare <agrare> CommitDate: Wed Apr 3 16:13:19 2019 -0400 Return vm records with the same ems_ref first If there is a vm record with the same ems_ref then update that even if it has a different uid_ems. https://bugzilla.redhat.com/show_bug.cgi?id=1695008 app/models/ems_refresh/save_inventory.rb | 6 +- spec/models/ems_refresh/save_inventory_spec.rb | 88 +- 2 files changed, 28 insertions(+), 66 deletions(-) Okay now we will first select VMs which have the same ems_ref even if they have a different uid_ems so this won't happen again in the future. Thanks to Adam, I was able to simulate a host reboot using following rails commands. I observed that VM was not orphaned/archived after performing following steps.
ems = ManageIQ::Providers::Vmware::InfraManager.find_by(:name => "name of your vc")
vm = ems.vms.last
puts "ID [#{vm.id}] ems_ref [#{vm.ems_ref}]"
vm.update_attributes(:uid_ems => SecureRandom.uuid)
Then after a full refresh make sure that VM is active and not archived
Verified on 5.11.0.1
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-2019:4199 |