Error adding OpenStack Infrastructure provider


Hi Community!
I’m using the latest stable Botvinnik. When adding OpenStack Infrastructure provider I see an error in evm.log:

undefined method `ports' for nil:NilClass

There are no error in fog.log. This issue is similar to Openstack infrastructure provider.
While I could not add Infrastructure provider, I could add the same Openstack as a Cloud Provider successfully.
Can you let me know what I might be missing or if you need more information?

Here’s the part in evm.log where it errors out. Even with log setting at Debug there is no additional info.

[----] I, [2015-07-07T05:11:58.209543 #3203:42fe8c]  INFO -- : MIQ(EmsRefresh::Refreshers::OpenstackInfraRefresher.refresh) Refreshing all targets...
[----] I, [2015-07-07T05:11:58.209650 #3203:42fe8c]  INFO -- : MIQ(EmsRefresh::Refreshers::OpenstackInfraRefresher.refresh) EMS: [MyTestOpenStack], id: [1] Refreshing targets for EMS: [MyTestOpenStack], id: [1]...
[----] I, [2015-07-07T05:11:58.209732 #3203:42fe8c]  INFO -- : MIQ(EmsRefresh::Refreshers::OpenstackInfraRefresher.refresh) EMS: [MyTestOpenStack], id: [1]   EmsOpenstackInfra [MyTestOpenStack] id [1]
[----] I, [2015-07-07T05:11:59.092361 #3203:42fe8c]  INFO -- : <Fog> MIQ(EmsRefresh::Parsers::OpenstackInfra.ems_inv_to_hashes) Collecting data for EMS name: [MyTestOpenStack] id: [1]...
[----] E, [2015-07-07T05:11:59.263963 #3203:42fe8c] ERROR -- : MIQ(EmsRefresh::Refreshers::OpenstackInfraRefresher.refresh) EMS: [MyTestOpenStack], id: [1] Refresh failed
[----] E, [2015-07-07T05:11:59.264090 #3203:42fe8c] ERROR -- : [NoMethodError]: undefined method `ports' for nil:NilClass  Method:[rescue in block in refresh]
[----] E, [2015-07-07T05:11:59.264227 #3203:42fe8c] ERROR -- : /var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack_infra.rb:67:in `hosts_ports'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack_infra.rb:79:in `load_hosts'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack_infra.rb:35:in `ems_inv_to_hashes'
/var/www/miq/vmdb/app/models/ems_refresh/parsers/openstack_infra.rb:8:in `ems_inv_to_hashes'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/openstack_infra_refresher.rb:7:in `parse_inventory'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:20:in `block in refresh'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:8:in `each'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/ems_refresher_mixin.rb:8:in `refresh'
/var/www/miq/vmdb/app/models/ems_refresh/refreshers/base_refresher.rb:8:in `refresh'
/var/www/miq/vmdb/app/models/ems_refresh.rb:80:in `block in refresh'
/var/www/miq/vmdb/app/models/ems_refresh.rb:78:in `each'
/var/www/miq/vmdb/app/models/ems_refresh.rb:78:in `refresh'
/var/www/miq/vmdb/app/models/miq_queue.rb:356:in `block in deliver'
/opt/rubies/ruby-2.0.0-p645/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:352: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:323:in `block in do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:320:in `loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:320:in `do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:141:in `run'
/var/www/miq/vmdb/lib/workers/worker_base.rb:122:in `start'
/var/www/miq/vmdb/lib/workers/worker_base.rb:23:in `start_worker'
/var/www/miq/vmdb/lib/workers/bin/worker.rb:3:in `<top (required)>'
/opt/rubies/ruby-2.0.0-p645/lib/ruby/gems/2.0.0/bundler/gems/rails-4842a8377644/railties/lib/rails/commands/runner.rb:52:in `eval'
/opt/rubies/ruby-2.0.0-p645/lib/ruby/gems/2.0.0/bundler/gems/rails-4842a8377644/railties/lib/rails/commands/runner.rb:52:in `<top (required)>'
/opt/rubies/ruby-2.0.0-p645/lib/ruby/gems/2.0.0/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:64:in `require'
/opt/rubies/ruby-2.0.0-p645/lib/ruby/gems/2.0.0/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:64:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'
[----] E, [2015-07-07T05:11:59.264270 #3203:42fe8c] ERROR -- : MIQ(EmsRefresh::Refreshers::OpenstackInfraRefresher.refresh) EMS: [MyTestOpenStack], id: [1] Unable to perform refresh for the following targets:
[----] E, [2015-07-07T05:11:59.264398 #3203:42fe8c] ERROR -- :  --- EmsOpenstackInfra [MyTestOpenStack] id [1]
[----] I, [2015-07-07T05:11:59.276935 #3203:42fe8c]  INFO -- : MIQ(EmsRefresh::Refreshers::OpenstackInfraRefresher.refresh) Refreshing all targets...Complete

fog.log is fine
… retrives server lists – there are none running

Openstack infrastructure provider

@blomquisg Was this fixed on upstream already? If so, we may need to backport to botvinnik and release botvinnik-2.

cc @chessbyte


That sort of sounds familiar … I’ll send it over to Ladislav and see if he knows about it. If he’s seen it, he can backport the fix to Botvinnik release.


@kirank, did you use TripleO to setup your OpenStack Infrastructure provider?


@blomquisg - I did not use tripleO. I used RDO packstack for Kilo without Ironic. If you need any specific details of any of my config, I can provide. Let me know


Thanks @kirank!

I’m going to have our openstack integration engineer take a look at the situation. However, I suspect that he’s going to say that it requires TripleO, or at least Ironic, for the integration to work.


Partly this is asking what ‘Infrastructure’ and ‘Cloud’ mean to ManageIQ. My understanding is ManageIQ treats Infrastructure to provision physical nodes using Ironic in addition to virtual machines. Whereas Cloud provider only provisions instances on infrastructure - which explains why I was able to setup a cloud provider.

I’m sure there are nuances to these concepts. Could you add more about the differences between Infrastructure and Cloud from ManangeIQ’s point of view?


@kirank @blomquisg yes, these are Ironic ports, so it will not work without Ironic available. For it to be fully functional, it requires TripleO Undercloud OpenStack. But refresh will pass when there are needed OpenStack services.

Infrastructure is now tied to to TripleO, from that terminology, OpenStack infra is Undercloud and OpenStack cloud is Overcloud. Then those two are connected, so by OpenStack Infra, you can create and scale OpenstackCloud (ManageIQ supports only scaling now, so you can e.g. add more compute, storage or controller hosts.). And you see for example Instances running on Hosts, where Hosts comes from Ironic from OpenstackInfra and Instances comes from Nova from OpenStack cloud.

We are not supporting general Ironic/Nova OpenStack, e.g. if you would like to have a hybrid baremetal/vm OpenStack deployment.


@Ladas - Thanks for the clarification.