Created attachment 1386512 [details] missing event on the TL Description of problem: When going to the timeline of a deleted VM, it does not have any event in the category deletion. BUT the event appears on its host, provider, cluster. It works on all other vsphere version. ALSO there is no field source_vm, there is source_vm_location. The source_vm is present on other Vsphere versions as well. It usefull because used in our tests automations. Version-Release number of selected component (if applicable): Version 5.9.0.17.20180116225234_ac8b6f5 How reproducible: Always Steps to Reproduce: 1.create a vm on vsphere55 2. delete it 3.check its timeline Actual results: event in category deletion/removal Expected results: no events Additional info: Events appears in the DB
Created attachment 1386513 [details] event on provider without source_vm field
Adam, if you are asking me info in PM, im not able to see the PM's i have an issue with my account
What I think is happening here is if the VM is disconnected before the event is processed by the event handler. We link events to VMs by ems_ref and ems_id here https://github.com/ManageIQ/manageiq/blob/master/app/models/ems_event.rb#L108-L109 but after the VM is archived we nullify the ems_id so that doesn't find the VM.
so will that be corrected?
https://github.com/ManageIQ/vmware_web_service/pull/32
> so will that be corrected? working on it ;)
https://github.com/ManageIQ/manageiq-providers-vmware/pull/179
https://github.com/ManageIQ/manageiq/pull/16907
New commit detected on ManageIQ/vmware_web_service/master: https://github.com/ManageIQ/vmware_web_service/commit/e4d3d56377317eefa7fae0de488d2be1ec6c2858 commit e4d3d56377317eefa7fae0de488d2be1ec6c2858 Author: Adam Grare <agrare> AuthorDate: Mon Jan 29 11:13:48 2018 -0500 Commit: Adam Grare <agrare> CommitDate: Mon Jan 29 14:32:10 2018 -0500 Add VM UUID to event payload When a VM is disconnected the VM's UUID is the only property which can be used to link the VM to other entities e.g. events. https://bugzilla.redhat.com/show_bug.cgi?id=1538996 lib/VMwareWebService/MiqVimEventMonitor.rb | 3 +++ lib/VMwareWebService/VimPropMaps.rb | 1 + 2 files changed, 4 insertions(+)
New commit detected on ManageIQ/manageiq-providers-vmware/master: https://github.com/ManageIQ/manageiq-providers-vmware/commit/9a9249d21749b73219fbdd1ee744f8670437bd5c commit 9a9249d21749b73219fbdd1ee744f8670437bd5c Author: Adam Grare <agrare> AuthorDate: Mon Jan 29 13:18:53 2018 -0500 Commit: Adam Grare <agrare> CommitDate: Wed Jan 31 18:48:45 2018 -0500 Add VM uuid as the vm_uid_ems to the event payload Add the UUID for the VM to the event payload so that it can be used to find disconnected VMs when linking events. https://bugzilla.redhat.com/show_bug.cgi?id=1538996 .../providers/vmware/infra_manager/event_parser.rb | 2 + manageiq-providers-vmware.gemspec | 2 +- .../infra_manager/event_data/task_event.yaml | 148 +++++++++++++++++++++ .../vmware/infra_manager/event_parser_spec.rb | 10 ++ 4 files changed, 161 insertions(+), 1 deletion(-) create mode 100644 spec/models/manageiq/providers/vmware/infra_manager/event_data/task_event.yaml
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/5bea3d8e857f35529d118fd1219c5da27e20077e commit 5bea3d8e857f35529d118fd1219c5da27e20077e Author: Adam Grare <agrare> AuthorDate: Mon Jan 29 14:16:47 2018 -0500 Commit: Adam Grare <agrare> CommitDate: Mon Jan 29 15:56:38 2018 -0500 Fix event linking to a disconnected VM When linking events to a VM we first try [ems_id, ems_ref] which fails to find a disconnected VM because the ems_id is nullified. Next we try by uid_ems but no one was setting the field that we were using so this standardizes on an event key :vm_uid_ems (similar to :vm_location) which can be set by the EventParser to allow events to be connected to VMs after they are disconnected. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1538996 app/models/ems_event.rb | 6 ++---- spec/models/ems_event_spec.rb | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-)
*** Bug 1534615 has been marked as a duplicate of this bug. ***
Verified in 5.10.0.4