Bug 1266467 - error raised durring the discovery of a vmware host
error raised durring the discovery of a vmware host
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers (Show other bugs)
All All
medium Severity medium
: GA
: 5.5.0
Assigned To: Adam Grare
Jeff Teehan
Depends On:
  Show dependency treegraph
Reported: 2015-09-25 07:03 EDT by Felix Dewaleyne
Modified: 2015-12-08 08:33 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-08 08:33:11 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Felix Dewaleyne 2015-09-25 07:03:04 EDT
Description of problem:
the following trace is raised durring the discovery of a vmware host :

----] I, [2015-09-24T10:12:09.962683 #29004:f9c004]  INFO -- : MIQ(MiqQueue.get_via_drb) Message id: [1000013723294], MiqWorker id: [1000000035466], Zone: [default], Role: [], Server: [a5baafc6-f944-11e4-a312-00505635f697], Ident: [generic], Target id: [], Instance id:
[], Task id: [], Command: [Host.discoverHost], Timeout: [600], Priority: [100], State: [dequeue], Deliver On: [], Data: [90 bytes], Args: [], Dequeued in: [4.413938949] seconds
[----] I, [2015-09-24T10:12:09.962822 #29004:f9c004]  INFO -- : MIQ(MiqQueue.deliver)    Message id: [1000013723294], Delivering...
[----] I, [2015-09-24T10:12:10.021925 #29004:f9c004]  INFO -- : MIQ(host-discoverHost): Discovering Host: #<OpenStruct ipaddr="", usePing=nil, timeout=10, discover_types=[:esx]>
[----] D, [2015-09-24T10:12:10.778346 #29004:f9c004] DEBUG -- : WindowsProbe: probing ip =
[----] D, [2015-09-24T10:12:20.779930 #29004:f9c004] DEBUG -- : PortScan: ip =, port = 135, execution expired
[----] D, [2015-09-24T10:12:30.781245 #29004:f9c004] DEBUG -- : PortScan: ip =, port = 139, execution expired
[----] D, [2015-09-24T10:12:30.781404 #29004:f9c004] DEBUG -- : WindowsProbe: probe of ip = complete
[----] D, [2015-09-24T10:12:30.788970 #29004:f9c004] DEBUG -- : Skipping VMwareServerProbe
[----] D, [2015-09-24T10:12:30.796501 #29004:f9c004] DEBUG -- : Skipping RedHatRhevmProbe
[----] D, [2015-09-24T10:12:30.818436 #29004:f9c004] DEBUG -- : VMwareEsxVcProbe: probing ip =
[----] D, [2015-09-24T10:12:33.215493 #29004:f9c004] DEBUG -- : VMwareEsxVcProbe: ip =, Connected to VMware webservice. Machine is either ESX or VirtualCenter.
[----] D, [2015-09-24T10:12:33.218058 #29004:f9c004] DEBUG -- : PortScan: ip =, port = 902, Found port
[----] D, [2015-09-24T10:12:43.219923 #29004:f9c004] DEBUG -- : PortScan: ip =, port = 135, execution expired
[----] D, [2015-09-24T10:12:53.221753 #29004:f9c004] DEBUG -- : PortScan: ip =, port = 7444, execution expired
[----] D, [2015-09-24T10:12:53.221900 #29004:f9c004] DEBUG -- : VMwareEsxVcProbe: ip =, Machine is an ESX server.
[----] D, [2015-09-24T10:12:53.221968 #29004:f9c004] DEBUG -- : VMwareEsxVcProbe: probe of ip = complete
[----] I, [2015-09-24T10:12:53.231164 #29004:f9c004]  INFO -- : Skipping MS Hyper-V Probe
[----] D, [2015-09-24T10:12:53.237952 #29004:f9c004] DEBUG -- : Skipping MSVirtualServerProbe
[----] I, [2015-09-24T10:12:53.260920 #29004:f9c004]  INFO -- : Skipping IPMI Probe
[----] D, [2015-09-24T10:12:53.506686 #29004:f9c004] DEBUG -- : Skipping MSScvmmProbe
[----] I, [2015-09-24T10:12:53.507311 #29004:f9c004]  INFO -- : MIQ(host-discoverHost): Discovered: #<OpenStruct ipaddr="", usePing=nil, timeout=10, discover_types=[:esx], os=[:linux], hypervisor=[:esx]>
[----] I, [2015-09-24T10:12:53.693227 #29004:f9c004]  INFO -- : MIQ(host-get_hostname): Resolving hostname: []
[----] I, [2015-09-24T10:12:53.693698 #29004:f9c004]  INFO -- : MIQ(host-get_hostname): Resolved hostname: [] to []
[----] E, [2015-09-24T10:12:53.972740 #29004:f9c004] ERROR -- : [NameError]: undefined local variable or method `os_type' for #<Class:0x00000005a9b370>  Method:[rescue in discoverHost]
[----] E, [2015-09-24T10:12:53.972987 #29004:f9c004] ERROR -- : /opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.17/lib/active_record/dynamic_matchers.rb:55:in `method_missing'
/var/www/miq/vmdb/app/models/host.rb:1377:in `discoverHost'
/var/www/miq/vmdb/app/models/miq_queue.rb:361:in `block in deliver'
/opt/rh/ruby193/root/usr/share/ruby/timeout.rb:69:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:357:in `deliver'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:107:in `deliver_queue_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:135:in `deliver_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:152:in `block in do_work'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `loop'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `do_work'
/var/www/miq/vmdb/lib/workers/worker_base.rb:317:in `block in do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:314:in `loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:314:in `do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:135:in `run'
/var/www/miq/vmdb/lib/workers/worker_base.rb:123:in `start'
/var/www/miq/vmdb/lib/workers/worker_base.rb:23:in `start_worker'
/var/www/miq/vmdb/lib/workers/bin/worker.rb:5:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands/runner.rb:52:in `eval'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands/runner.rb:52:in `<top (required)>'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:64:in `require'
/opt/rh/ruby193/root/usr/share/gems/gems/railties-3.2.17/lib/rails/commands.rb:64:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'

Version-Release number of selected component (if applicable):

How reproducible:
not reproduced in lab

Steps to Reproduce:
1. on customer appliance, make an attempt to add the host manually by discovering

Actual results:
the host is added to the appliance by ip only, no information is added.

Expected results:
the host is added with no error

Additional info:
a dns is set to return the hostname and works in reverse as well.
normal discovery of the hypervisor does not see this host in the cluster it belongs to.
Comment 8 CFME Bot 2015-10-15 04:49:50 EDT
New commit detected on ManageIQ/manageiq/master:

commit 2949263f03feee53983e803ad6f84e12c71082f1
Author:     Adam Grare <agrare@redhat.com>
AuthorDate: Mon Oct 12 19:33:45 2015 -0400
Commit:     Adam Grare <agrare@redhat.com>
CommitDate: Wed Oct 14 08:34:32 2015 -0400

    Fix os_type typo in host discovery

 app/models/host.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 9 Jeff Teehan 2015-11-17 11:53:45 EST
I'm able to add our vsphere infrastructure by either host ip or fqdn and it is working correctly.

Using at

Also took a look at the code checked in and the error was caused by an obvious typo.

Moving to Verified
Comment 11 errata-xmlrpc 2015-12-08 08:33:11 EST
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.


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