Project

General

Profile

Bug #28121

convert_string_to_bool doesn't deal with array type

Added by Shira Maximov 11 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - oVirt
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

There is still another bug in the convert_string_to_bool function. It doesn't validate the data type of the item in value.map (when it's an array). It caused the same error. It happens when deploying a host to oVirt (from Foreman 1.23):

NoMethodError: undefined method `each' for #<Fog::Ovirt::Compute::Interface:0x007f0b76120628>
/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-ovirt-1.2.1/lib/fog/ovirt/compute/v4.rb:116:in `convert_string_to_bool'
/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-ovirt-1.2.1/lib/fog/ovirt/compute/v4.rb:124:in `block (2 levels) in convert_string_to_bool'
/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-core-2.1.0/lib/fog/core/collection.rb:18:in `map'
/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-core-2.1.0/lib/fog/core/collection.rb:18:in `map'
/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-ovirt-1.2.1/lib/fog/ovirt/compute/v4.rb:124:in `block in convert_string_to_bool'
/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-ovirt-1.2.1/lib/fog/ovirt/compute/v4.rb:116:in `each'
/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-ovirt-1.2.1/lib/fog/ovirt/compute/v4.rb:116:in `convert_string_to_bool'
/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-ovirt-1.2.1/lib/fog/ovirt/requests/compute/v4/update_vm.rb:9:in `update_vm'
/usr/share/foreman/vendor/ruby/2.3.0/gems/fog-ovirt-1.2.1/lib/fog/ovirt/models/compute/server.rb:177:in `save'
/usr/share/foreman/app/models/compute_resources/foreman/model/ovirt.rb:242:in `start_vm'

Associated revisions

Revision be2913a3 (diff)
Added by Shira Maximov 10 months ago

Fixes #28121 - Bump fog-ovirt to 1.2.3

History

#1 Updated by Shira Maximov 10 months ago

  • Fixed in Releases 1.24.0 added

#2 Updated by Shira Maximov 10 months ago

  • Pull request https://github.com/theforeman/foreman/pull/7223 added

#3 Updated by The Foreman Bot 10 months ago

  • Status changed from New to Ready For Testing

#4 Updated by The Foreman Bot 10 months ago

  • Fixed in Releases 2.0.0 added

#5 Updated by Shira Maximov 10 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF