Bug #4684
closed"undefined method `text' for nil:NilClass" error when trying to add ovirt 3.4 compute resource
Description
I try to add my fresh ovirt 3.4rc2 install to foreman and get this error:
undefined method `text' for nil:NilClass
Updated by Dominic Cleal over 10 years ago
- Category set to Compute resources
Do you have any more information in the logs? A stack trace would be very helpful.
You may need to enable debugging: http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging
Updated by Anonymous over 10 years ago
- Related to Bug #4346: oVirt Compute Resource needs to be updated for rbovirt >0.0.21 added
Updated by Anonymous over 10 years ago
Jorick, could to make sure that you're using rbovirt 0.0.21 and apply https://github.com/abenari/rbovirt/commit/137da3b4021b3e0ac20cd5d24f51827370b9acad to it? That's the configuration we're using with foreman 1.4.1 and ovirt 3.4 at the moment.
Updated by Jorick Astrego over 10 years ago
Ah I see the bug is linked to Bug #4346 now (I didn't see that one)
Forgot to say, it happens when I press the "Load Datacenters" button..
debug info:
Started PUT "/compute_resources/test_connection" for xxx.xxx.xxx.xxx at 2014-03-18 15:04:44 0100
Processing by ComputeResourcesController#test_connection as /*
Parameters: {"utf8"=>"✓", "authenticity_token"=>"Fo4AKjExIABMiAsnCVCj5FHA0qhfGF4SjoTzlhV+EY=", "compute_resource"=>{"name"=>"oVirt", "provider"=>"Ovirt", "description"=>"", "url"=>"https://ovirt.netbulae.en:443/api", "user"=>"admin@internal", "password"=>"[FILTERED]"}, "cr_id"=>"1"}
User Load (0.3ms) SELECT "users". FROM "users" WHERE "users"."id" = $1 LIMIT 1 "id", 1
Setting current user thread-local variable to admin
CR_ID IS 1
ComputeResource Load (0.1ms) SELECT "compute_resources".* FROM "compute_resources" WHERE "compute_resources"."id" = $1 ORDER BY compute_resources.name LIMIT 1 "id", "1"
ComputeResource Exists (0.2ms) SELECT 1 AS one FROM "compute_resources" WHERE ("compute_resources"."name" = 'oVirt' AND "compute_resources"."id" != 1) LIMIT 1
Rendered compute_resources/form/_ovirt.html.erb (72.6ms)
Rendered compute_resources/_form.html.erb (77.3ms)
Completed 200 OK in 140ms (Views: 78.1ms | ActiveRecord: 0.6ms)
Updated by Trey Dockendorf over 10 years ago
I ran into this after updating to oVirt 3.4 (stable) and trying to edit a host that is part of my oVirt compute resource. This is with foreman-1.4.1-2.el6 and ruby193-rubygem-rbovirt-0.0.21-2.el6.
Full trace dump from Foreman web interface
OVIRT::OvirtException undefined method `text' for nil:NilClass app/helpers/layout_helper.rb:112:in `block in select_f' app/helpers/layout_helper.rb:143:in `block (3 levels) in field' app/helpers/layout_helper.rb:142:in `block (2 levels) in field' app/helpers/layout_helper.rb:137:in `block in field' app/helpers/layout_helper.rb:136:in `field' app/helpers/layout_helper.rb:110:in `select_f' app/views/compute_resources_vms/form/_ovirt.html.erb:5:in `_app_views_compute_resources_vms_form__ovirt_html_erb___1487461556603589158_58978660' app/views/hosts/_compute.html.erb:5:in `block in _app_views_hosts__compute_html_erb___987585527162209695_69927339893160' app/views/hosts/_compute.html.erb:1:in `_app_views_hosts__compute_html_erb___987585527162209695_69927339893160' app/views/hosts/_unattended.html.erb:2:in `_app_views_hosts__unattended_html_erb___2127257360369646058_69927339720480' app/views/hosts/_form.html.erb:91:in `block (2 levels) in _app_views_hosts__form_html_erb__4571261874729306152_69927336144920' app/helpers/layout_helper.rb:218:in `form_for' app/views/hosts/_form.html.erb:7:in `block in _app_views_hosts__form_html_erb__4571261874729306152_69927336144920' app/models/taxonomy.rb:56:in `block (2 levels) in as_taxonomy' app/models/concerns/foreman/thread_session.rb:143:in `as_location' app/models/taxonomy.rb:55:in `block in as_taxonomy' app/models/concerns/foreman/thread_session.rb:108:in `as_org' app/models/taxonomy.rb:54:in `as_taxonomy' app/views/hosts/_form.html.erb:5:in `_app_views_hosts__form_html_erb__4571261874729306152_69927336144920' app/views/hosts/edit.html.erb:7:in `_app_views_hosts_edit_html_erb__4441177603592916283_49364240' app/models/concerns/foreman/thread_session.rb:33:in `clear_thread' lib/middleware/catch_json_parse_errors.rb:9:in `call'
Applying the change from https://github.com/abenari/rbovirt/commit/137da3b4021b3e0ac20cd5d24f51827370b9acad resolves that issue.
Updated by Dominic Cleal over 10 years ago
- Related to Bug #4996: Failed to create a compute (oVirt) instance VM template.id|name required for add added
Updated by Yama Kasi over 10 years ago
I have the same issue on 1.4.2 with oVirt 3.4 and the changed datacenter.rb.
I have updated to 1.5 Nighly which also doens't solve it.
Updated by Anonymous over 10 years ago
What's the status with Foreman 1.5.1 on this?
Updated by Anonymous over 10 years ago
- Status changed from New to Resolved
As per feedback of YamakasY on IRC, this problem does not occour anymore.