Bug 1329225 - vmWare vCenter provider autodiscovery fails with error in the log
Summary: vmWare vCenter provider autodiscovery fails with error in the log
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.6.0
Hardware: All
OS: All
high
high
Target Milestone: GA
: 5.6.0
Assignee: Adam Grare
QA Contact: Dmitry Misharov
URL:
Whiteboard: discovery
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-21 12:58 UTC by Dmitry Misharov
Modified: 2016-07-15 13:30 UTC (History)
4 users (show)

Fixed In Version: 5.6.0.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-29 15:52:08 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
evm.log for CFME 5.6 (1.93 MB, application/zip)
2016-04-21 12:58 UTC, Dmitry Misharov
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Dmitry Misharov 2016-04-21 12:58:08 UTC
Created attachment 1149463 [details]
evm.log for CFME 5.6

Description of problem:
During verifying https://bugzilla.redhat.com/show_bug.cgi?id=1307153 I encountered with another autodiscovery bug. vmWare vCenter cannot be added.

Version-Release number of selected component (if applicable):
5.6.0.1-beta2.20160413141124_e25ac0e

How reproducible:
Always

Steps to Reproduce:
1. Navigate to Infrastructure->Providers panel and select 'Configuration' button.
2. Select 'Discover Infrastructure Providers' from drop down box.
3. Select the checkbox for the vmWare vCenter provider.
4. Enter a from-to set of ip address which includes an address of vCenter provider.

Actual results:
Erorr "[NoMethodError]: undefined method `exist?' for #<ActiveRecord::Relation []>  Method:[rescue in discoverHost]" when vCenter ip address is discovered.

Expected results:
vCenter provider should be discovered without errors.

Additional info:
In the testing environment, ip address 10.8.58.22 is known to be a Virtual Center.  While searching thru a range that includes this value the following error is encountered:
[----] I, [2016-04-21T08:53:32.854970 #2988:10a1990]  INFO -- : MIQ(Host.discoverHost) Discovered: #<OpenStruct ipaddr="10.8.58.22", usePing=nil, timeout=10, discover_types=[:virtualcenter], os=[:mswin], hypervisor=[:virtualcenter]>
[----] E, [2016-04-21T08:53:32.899317 #2988:10a1990] ERROR -- : [NoMethodError]: undefined method `exist?' for #<ActiveRecord::Relation []>  Method:[rescue in discoverHost]
[----] E, [2016-04-21T08:53:32.899811 #2988:10a1990] ERROR -- : /opt/rh/cfme-gemset/bundler/gems/rails-efaa6e4f79d4/activerecord/lib/active_record/relation/delegation.rb:124:in `method_missing'
/opt/rh/cfme-gemset/bundler/gems/rails-efaa6e4f79d4/activerecord/lib/active_record/relation/delegation.rb:94:in `method_missing'
/var/www/miq/vmdb/app/models/ext_management_system.rb:155:in `create_discovered_ems'
/var/www/miq/vmdb/app/models/host.rb:989:in `discoverHost'
/var/www/miq/vmdb/app/models/miq_queue.rb:347:in `block in deliver'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:89:in `block in timeout'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:34:in `block in catch'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:34:in `catch'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:34:in `catch'
/opt/rh/rh-ruby22/root/usr/share/ruby/timeout.rb:104:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:343:in `deliver'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:106:in `deliver_queue_message'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:134:in `deliver_message'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:152:in `block in do_work'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:146:in `loop'
/var/www/miq/vmdb/app/models/miq_queue_worker_base/runner.rb:146:in `do_work'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:334:in `block in do_work_loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:331:in `loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:331:in `do_work_loop'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:153:in `run'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:128:in `start'
/var/www/miq/vmdb/app/models/miq_worker/runner.rb:21:in `start_worker'
/var/www/miq/vmdb/app/models/miq_worker.rb:346:in `block in start'
/opt/rh/cfme-gemset/gems/nakayoshi_fork-0.0.3/lib/nakayoshi_fork.rb:24:in `fork'
/opt/rh/cfme-gemset/gems/nakayoshi_fork-0.0.3/lib/nakayoshi_fork.rb:24:in `fork'
/var/www/miq/vmdb/app/models/miq_worker.rb:344:in `start'
/var/www/miq/vmdb/app/models/miq_worker.rb:274:in `start_worker'
/var/www/miq/vmdb/app/models/miq_worker.rb:154:in `block in sync_workers'
/var/www/miq/vmdb/app/models/miq_worker.rb:154:in `times'
/var/www/miq/vmdb/app/models/miq_worker.rb:154:in `sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:49:in `block in sync_workers'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:47:in `each'
/var/www/miq/vmdb/app/models/miq_server/worker_management/monitor.rb:47:in `sync_workers'
/var/www/miq/vmdb/app/models/miq_server.rb:173:in `start'
/var/www/miq/vmdb/app/models/miq_server.rb:264:in `start'
/var/www/miq/vmdb/lib/workers/evm_server.rb:65:in `start'
/var/www/miq/vmdb/lib/workers/evm_server.rb:92:in `start'
/var/www/miq/vmdb/lib/workers/bin/evm_server.rb:4:in `<main>'

Comment 2 Adam Grare 2016-04-21 13:56:58 UTC
https://github.com/ManageIQ/manageiq/pull/8104

A typo was recently introduced in self.create_discovered_ems caused any successful provider discovery to fail.

Comment 3 Dmitry Misharov 2016-04-26 07:08:30 UTC
Verfied fixed in 5.6.0.4-beta2.3.20160421172650_719e256. vCenter discovering works properly.

Comment 5 errata-xmlrpc 2016-06-29 15:52:08 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, 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-2016:1348


Note You need to log in before you can comment on or make changes to this bug.