Project

General

Profile

Actions

Bug #28121

closed

convert_string_to_bool doesn't deal with array type

Added by Shira Maximov over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Compute resources - oVirt
Target version:
-
Difficulty:
Triaged:
No
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'


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #23578: bootable flag doesn't save in ovirt V4 when creating new VMClosedShira MaximovActions
Actions #1

Updated by Shira Maximov over 4 years ago

  • Fixed in Releases 1.24.0 added
Actions #2

Updated by Shira Maximov over 4 years ago

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

Updated by The Foreman Bot over 4 years ago

  • Status changed from New to Ready For Testing
Actions #4

Updated by The Foreman Bot over 4 years ago

  • Fixed in Releases 2.0.0 added
Actions #5

Updated by Shira Maximov over 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #6

Updated by Ewoud Kohl van Wijngaarden over 1 year ago

  • Related to Bug #23578: bootable flag doesn't save in ovirt V4 when creating new VM added
Actions

Also available in: Atom PDF