Description of problem: While doing the manual refresh of the Provider, it failed with below exception: [----] E, [2017-06-26T15:28:24.832907 #29096:1311130] ERROR -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Refresher#refresh) EMS: [vCenter-DR], id: [2000000000007] Unable to perform refresh for the following targets: [----] E, [2017-06-26T15:28:24.833036 #29096:1311130] ERROR -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Refresher#refresh) --- ManageIQ::Providers::Vmware::InfraManager [vCenter-DR] id [2000000000007] [----] I, [2017-06-26T15:28:24.864483 #29096:1311130] INFO -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Refresher#refresh) Refreshing all targets...Complete [----] E, [2017-06-26T15:28:24.869871 #29096:1311130] ERROR -- : [EmsRefresh::Refreshers::EmsRefresherMixin::PartialRefreshError]: undefined method `xsiType' for nil:NilClass Method:[rescue in deliver] [----] E, [2017-06-26T15:28:24.872356 #29096:1311130] ERROR -- : /var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:50:in `refresh' /var/www/miq/vmdb/app/models/manageiq/providers/base_manager/refresher.rb:9:in `refresh' /var/www/miq/vmdb/app/models/ems_refresh.rb:98:in `block in refresh' /var/www/miq/vmdb/app/models/ems_refresh.rb:97:in `each' /var/www/miq/vmdb/app/models/ems_refresh.rb:97:in `refresh' Version-Release number of selected component (if applicable): 5.8.0 Actual results: Refresh is failing with exception undefined method `xsiType' for nil:NilClass Method:[rescue in deliver] Expected results: Refresh should be done successfully. Additional info: Increased the memory threshold from 2GB to 4 GB of vim_broker_worker but still didn't work. Seems like the target refresh is failing as full refresh is completed above it.
From the logs it looks like the error is: [----] E, [2017-06-22T12:17:18.852473 #26538:1311130] ERROR -- : [NoMethodError]: undefined method `xsiType' for nil:NilClass Method:[rescue in block in refresh] [----] E, [2017-06-22T12:17:18.852641 #26538:1311130] ERROR -- : /opt/rh/cfme-gemset/bundler/gems/manageiq-providers-vmware-30e6243bf993/app/models/manageiq/providers/vmware/infra_manager/refresh_parser.rb:1074: /opt/rh/cfme-gemset/bundler/gems/manageiq-providers-vmware-30e6243bf993/app/models/manageiq/providers/vmware/infra_manager/refresh_parser.rb:1062:in `each' /opt/rh/cfme-gemset/bundler/gems/manageiq-providers-vmware-30e6243bf993/app/models/manageiq/providers/vmware/infra_manager/refresh_parser.rb:1062:in `vm_inv_to_disk_hashes' This is coming from https://github.com/ManageIQ/manageiq-providers-vmware/blob/fine/app/models/manageiq/providers/vmware/infra_manager/refresh_parser.rb#L1074 It looks to me like there is a VM that has a disk assigned to a deleted controller but we will need to see the managed object browser to confirm.
Created attachment 1294568 [details] MOB screen shot
Created attachment 1295178 [details] disk detail
Created attachment 1295179 [details] mob output
Created attachment 1295180 [details] disk1 detail
Hi Chen, Don't know how such a vm is created. vSphere client doesn't seem to allow that to be created. Can you request customer to inspect this vm and see how they can fix it, e.g. adding controller to the disks or removing the disks? And then rerun the refresh. We probably can't do much with such disks without controller key. What we can do to fix this error is to skip them. regards, James
Hello James, Customer is unable to remove the disk as the disk is in inconsistent state( as per attached). Let me know if you have any other suggestion so to rectify this issue. Regards, Neha Chugh
Created attachment 1303436 [details] inconsistent hard disk
Hi Neha, The customer probably has to contact VMware support for fixing the vm. If they are savvy enough, they may try to de-register the VM and then edit the vm file (in the datastore) to remove the disk. But they should consult VMware support first. James
https://github.com/ManageIQ/manageiq-providers-vmware/pull/77
Hi Neha, Any update from the customer? What we are doing to the code is to inventory these disks as having 'unknown' controller type. regards, James
Hello James, We haven't received any response from customer till date whether he is able to remove the disk or not so we can lower down the severity. In case if he is not able to delete the disk we can suggest the provided PR. Thanks for all help. Regards, Neha Chugh
New commit detected on ManageIQ/manageiq-providers-vmware/master: https://github.com/ManageIQ/manageiq-providers-vmware/commit/b5f1089beb71f98026f22e8352383ecf83a04593 commit b5f1089beb71f98026f22e8352383ecf83a04593 Author: James Wong <jwong> AuthorDate: Tue Jul 18 09:54:46 2017 -0400 Commit: James Wong <jwong> CommitDate: Tue Aug 1 11:47:55 2017 -0400 dealing with disks which have no controller key https://bugzilla.redhat.com/show_bug.cgi?id=1465761 .../providers/vmware/infra_manager/refresh_parser.rb | 17 +++++++++++------ .../providers/vmware/infra_manager/refresher_spec.rb | 15 +++++++++++++++ .../vim_data/miq_vim_inventory/virtualMachinesByMor.yml | 10 +--------- 3 files changed, 27 insertions(+), 15 deletions(-)