| Summary: | Redefining `object_id' may cause serious problems | |||
|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | John Prause <jprause> | |
| Component: | Providers | Assignee: | Gilles Dubreuil <gdubreui> | |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Oleksandr Kolisnyk <okolisny> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 5.6.0 | CC: | abraverm, cpelland, gdubreui, jfrey, jhardy, lsmola, obarenbo, okolisny, rrasouli, simaishi | |
| Target Milestone: | GA | Keywords: | TestOnly | |
| Target Release: | 5.8.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | 5.8.0.0 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1396242 (view as bug list) | Environment: | ||
| Last Closed: | 2017-06-12 17:09:42 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | Openstack | Target Upstream Version: | ||
| Bug Depends On: | ||||
| Bug Blocks: | 1396242 | |||
|
Description
John Prause
2016-10-05 15:52:33 UTC
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). |