Hide Forgot
A question came into talk.manageiq.org regarding Openstack. After reviewing logs, this was found and Ladas asked for a BZ to track: [----] I, [2016-09-27T04:01:46.282558 #21144:11a998c] INFO -- : MIQ(MiqEventHandler::Runner#message_sync_active_roles) MIQ(MiqEventHandler::Runner) Synchronizing active roles complete... /opt/rh/cfme-gemset/gems/fog-core-1.42.0/lib/fog/core/attributes/default.rb:52: warning: redefining `object_id' may cause serious problems Here is the link to the talk issue and the logs: http://talk.manageiq.org/t/openstack-sync-fail/1751/7
The object_id attribute is created by default for every model. By adding the object_id again in the attribute list for the model overrides an already existing #method which triggers a Ruby warning. Issue has been addressed by following Pull Request: https://github.com/fog/fog-openstack/pull/220.
This has been merge to fog-openstack master branch. It will be included in next release 0.1.17.
To verify, as the fix was released with fog-openstack version 0.17.0, testing any version prior will display the warning. I suggest to test with version 0.1.15 and then compare with a later version (>= 0.1.17) to see the warning is gone: For instance: $ gem install fog-openstack --version 0.1.15 --no-ri --no-rdoc $ cat > check-warning.rb <<EOF require 'rubygems' gem 'fog-openstack', '=0.1.15' require 'fog/openstack' network = Fog::Network::OpenStack.new({ openstack_auth_url: "http://192.0.2.21:5000/v2.0/tokens", openstack_username: 'admin', openstack_api_key: "CJk9hb2ZFR96Ypu74KFFGWuhv"}) network.networks EOF $ irb irb(main):001:0> load './check-warning.rb' /home/gildub/.gem/ruby/2.3.3/gems/fog-core-1.43.0/lib/fog/core/attributes/default.rb:52: warning: redefining `object_id' may cause serious problems => true $ gem install fog-openstack --version 0.1.19 --no-ri --no-rdoc $ sed -i s/0.1.15/0.1.19/ check-warning.rb $ irb irb(main):001:0> load './check-warning.rb' => true
Tested both fog-openstack 0.1.15 and 0.1.19 on image of CFME 5.8.0.16 (if it matters).