Bug 1261868 - ovirt 3.5 compute profile edit error: undefined method `text' for nil:NilClass
ovirt 3.5 compute profile edit error: undefined method `text' for nil:NilClass
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Compute Resources (Show other bugs)
6.0.4
Unspecified Unspecified
unspecified Severity medium (vote)
: GA
: --
Assigned To: Tomer Brisker
Kedar Bidarkar
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-10 06:49 EDT by Tomer Brisker
Modified: 2016-07-27 07:23 EDT (History)
8 users (show)

See Also:
Fixed In Version: rubygem-rbovirt-0.0.37-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-27 07:23:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 11079 None None None 2016-04-22 11:58 EDT

  None (edit)
Description Tomer Brisker 2015-09-10 06:49:48 EDT
Foreman version 1.8.2

Attempting to create a new resource profile on a new ovirt compute resource errors out:

Warning!
undefined method `text' for nil:NilClass

If you feel this is an error with Foreman itself, please open a new issue with Foreman ticketing system, You would probably need to attach the Full trace and relevant log entries.
NoMethodError
undefined method `text' for nil:NilClass
app/helpers/layout_helper.rb:112:in `block in select_f'
app/helpers/layout_helper.rb:169:in `block (3 levels) in field'
app/helpers/layout_helper.rb:168:in `block (2 levels) in field'
app/helpers/layout_helper.rb:158:in `block in field'
app/helpers/layout_helper.rb:157:in `field'
app/helpers/layout_helper.rb:110:in `select_f'
app/views/compute_resources_vms/form/ovirt/_base.html.erb:10:in `_app_views_compute_resources_vms_form_ovirt__base_html_erb__4409097850897090305_73637740'
app/views/compute_attributes/_compute_form.html.erb:3:in `_app_views_compute_attributes__compute_form_html_erb__1756491331636043450_83732500'
app/views/compute_attributes/_form.html.erb:10:in `block (2 levels) in _app_views_compute_attributes__form_html_erb__2970560782621538195_81668060'
app/views/compute_attributes/_form.html.erb:8:in `block in _app_views_compute_attributes__form_html_erb__2970560782621538195_81668060'
app/helpers/layout_helper.rb:273:in `form_for'
app/views/compute_attributes/_form.html.erb:2:in `_app_views_compute_attributes__form_html_erb__2970560782621538195_81668060'
app/views/compute_attributes/new.html.erb:3:in `_app_views_compute_attributes_new_html_erb__3418808687226322706_81462020'
app/controllers/concerns/application_shared.rb:13:in `set_timezone'
app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call' 

/var/log/foreman/production.log:
Started GET "/foreman/compute_profiles/7-ovirt_guest_compute/compute_resources/2-ovirt-pcic-uvic-ca/compute_attributes/new" for 142.104.194.17 at 2015-07-09 18:17:45 -0700
2015-07-09 18:17:45 [I] Processing by ComputeAttributesController#new as */*
2015-07-09 18:17:45 [I]   Parameters: {"compute_profile_id"=>"7-ovirt_guest_compute", "compute_resource_id"=>"2-ovirt-pcic-uvic-ca"}
2015-07-09 18:17:45 [I] Successfully decrypted field for Foreman::Model::Ovirt ovirt.pcic.uvic.ca
2015-07-09 18:17:45 [I] Successfully decrypted field for Foreman::Model::Ovirt ovirt.pcic.uvic.ca
2015-07-09 18:17:45 [I]   Rendered compute_resources_vms/form/ovirt/_base.html.erb (132.8ms)
2015-07-09 18:17:45 [I]   Rendered compute_attributes/_compute_form.html.erb (133.8ms)
2015-07-09 18:17:45 [I]   Rendered compute_attributes/_form.html.erb (222.7ms)
2015-07-09 18:17:45 [I]   Rendered compute_attributes/new.html.erb (226.3ms)
2015-07-09 18:17:45 [W] Operation FAILED: undefined method `text' for nil:NilClass
2015-07-09 18:17:45 [I]   Rendered common/500.html.erb (5.0ms)
2015-07-09 18:17:45 [I] Completed 500 Internal Server Error in 241ms (Views: 5.6ms | ActiveRecord: 1.3ms)
2015-07-09 18:17:45 [I] 

Started GET "/foreman/compute_profiles/7-ovirt_guest_compute/compute_resources/2-ovirt-pcic-uvic-ca/compute_attributes/new" for 142.104.194.17 at 2015-07-09 18:17:45 -0700
2015-07-09 18:17:45 [I] Processing by ComputeAttributesController#new as */*
2015-07-09 18:17:45 [I]   Parameters: {"compute_profile_id"=>"7-ovirt_guest_compute", "compute_resource_id"=>"2-ovirt-pcic-uvic-ca"}
2015-07-09 18:17:45 [I] Successfully decrypted field for Foreman::Model::Ovirt ovirt.pcic.uvic.ca
2015-07-09 18:17:45 [I] Successfully decrypted field for Foreman::Model::Ovirt ovirt.pcic.uvic.ca
2015-07-09 18:17:45 [I]   Rendered compute_resources_vms/form/ovirt/_base.html.erb (115.9ms)
2015-07-09 18:17:45 [I]   Rendered compute_attributes/_compute_form.html.erb (116.4ms)
2015-07-09 18:17:45 [I]   Rendered compute_attributes/_form.html.erb (305.0ms)
2015-07-09 18:17:45 [I]   Rendered compute_attributes/new.html.erb (306.5ms)
2015-07-09 18:17:45 [W] Operation FAILED: undefined method `text' for nil:NilClass
2015-07-09 18:17:45 [I]   Rendered common/500.html.erb (5.0ms)
2015-07-09 18:17:45 [I] Completed 500 Internal Server Error in 317ms (Views: 5.5ms | ActiveRecord: 1.2ms)
2015-07-09 18:21:52 [I]
Comment 1 Tomer Brisker 2015-09-10 06:49:50 EDT
Created from redmine issue http://projects.theforeman.org/issues/11079
Comment 3 Ade Bradshaw 2015-09-10 07:34:36 EDT
I also ran into this error, but was able to resolve it as follows

In oVirt I had a template called 1337cd65-24a5-473b-82aa-30015c96874a as well as one called Default. I removed 1337cd65-24a5-473b-82aa-30015c96874a and everything started to work properly again
Comment 4 Bryan Kearney 2015-09-10 08:05:14 EDT
Upstream bug component is Compute Resources
Comment 5 Bryan Kearney 2016-04-19 10:09:54 EDT
Upstream bug assigned to tbrisker@redhat.com
Comment 10 Kedar Bidarkar 2016-05-11 13:58:53 EDT
Creation of a new compute profile associated to RHEV was successful.

This was tried with both kind of templates, base version and sub version and it was successful and no errors seen in /var/log/foreman/production.log


VERIFIED with sat62-snap10.1
Comment 11 Kedar Bidarkar 2016-05-11 14:00:09 EDT
Also, the rbovirt version

  ~]# rpm -qa *rbovirt
tfm-rubygem-rbovirt-0.0.37-1.el6sat.noarch
Comment 12 Bryan Kearney 2016-07-27 07:23:01 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501

Note You need to log in before you can comment on or make changes to this bug.