Bug #12305
openforeman-one We're sorry, but something went wrong.
Description
Hi,
I'm getting this error after adding formen-one plugin and trying to edit one of the compute profile (small/medium/large).
After choosing the size, I click on the computer resource (for opennebula) and get:
We're sorry, but something went wrong. We've been notified about this issue and we'll take a look at it shortly.
In production.log:
2015-10-25T20:16:27 [app] [I] Started GET "/compute_profiles/2-2-Medium/compute_resources/1-sc-one/compute_attributes/new" for 192.168.201.2 at 2015-10-25 20:16:27 +0100 2015-10-25T20:16:27 [app] [I] Processing by ComputeAttributesController#new as */* 2015-10-25T20:16:27 [app] [I] Parameters: {"compute_profile_id"=>"2-2-Medium", "compute_resource_id"=>"1-sc-one"} 2015-10-25T20:16:27 [sql] [I] Successfully decrypted field for ForemanOne::One sc-one 2015-10-25T20:16:27 [app] [I] Rendered compute_attributes/_compute_form.html.erb (1.1ms) 2015-10-25T20:16:27 [app] [I] Rendered compute_attributes/_form.html.erb (11.0ms) 2015-10-25T20:16:27 [app] [I] Rendered compute_attributes/new.html.erb (13.0ms) 2015-10-25T20:16:27 [app] [I] Completed 500 Internal Server Error in 19.3ms 2015-10-25T20:16:27 [app] [F] | ActionView::MissingTemplate (Missing partial compute_resources_vms/form/one/base with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :rabl]}. Searched in: | * "/usr/share/foreman/app/views" | * "/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_one-0.2/app/views" | * "/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_setup-3.0.2/app/views" | * "/usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.2.6/app/views" | ): | app/views/compute_attributes/_compute_form.html.erb:3:in `_app_views_compute_attributes__compute_form_html_erb__714115460567783248_73743260' | app/views/compute_attributes/_form.html.erb:10:in `block (2 levels) in _app_views_compute_attributes__form_html_erb__2511726645408008262_70295146931280' | app/views/compute_attributes/_form.html.erb:8:in `block in _app_views_compute_attributes__form_html_erb__2511726645408008262_70295146931280' | app/helpers/layout_helper.rb:284:in `form_for' | app/views/compute_attributes/_form.html.erb:2:in `_app_views_compute_attributes__form_html_erb__2511726645408008262_70295146931280' | app/views/compute_attributes/new.html.erb:3:in `_app_views_compute_attributes_new_html_erb___2646670605750056445_70295146743440' | 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' | | 2015-10-25T20:16:27 [app] [I] Started GET "/compute_profiles/2-2-Medium/compute_resources/1-sc-one/compute_attributes/new" for 192.168.201.2 at 2015-10-25 20:16:27 +0100 2015-10-25T20:16:27 [app] [I] Processing by ComputeAttributesController#new as */* 2015-10-25T20:16:27 [app] [I] Parameters: {"compute_profile_id"=>"2-2-Medium", "compute_resource_id"=>"1-sc-one"} 2015-10-25T20:16:27 [sql] [I] Successfully decrypted field for ForemanOne::One sc-one 2015-10-25T20:16:27 [app] [I] Rendered compute_attributes/_compute_form.html.erb (1.0ms) 2015-10-25T20:16:27 [app] [I] Rendered compute_attributes/_form.html.erb (9.4ms) 2015-10-25T20:16:27 [app] [I] Rendered compute_attributes/new.html.erb (11.3ms) 2015-10-25T20:16:27 [app] [I] Completed 500 Internal Server Error in 17.1ms 2015-10-25T20:16:27 [app] [F] | ActionView::MissingTemplate (Missing partial compute_resources_vms/form/one/base with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :rabl]}. Searched in: | * "/usr/share/foreman/app/views" | * "/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_one-0.2/app/views" | * "/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_setup-3.0.2/app/views" | * "/usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.2.6/app/views" | ): | app/views/compute_attributes/_compute_form.html.erb:3:in `_app_views_compute_attributes__compute_form_html_erb__714115460567783248_73743260' | app/views/compute_attributes/_form.html.erb:10:in `block (2 levels) in _app_views_compute_attributes__form_html_erb__2511726645408008262_70295146931280' | app/views/compute_attributes/_form.html.erb:8:in `block in _app_views_compute_attributes__form_html_erb__2511726645408008262_70295146931280' | app/helpers/layout_helper.rb:284:in `form_for' | app/views/compute_attributes/_form.html.erb:2:in `_app_views_compute_attributes__form_html_erb__2511726645408008262_70295146931280' | app/views/compute_attributes/new.html.erb:3:in `_app_views_compute_attributes_new_html_erb___2646670605750056445_70295146743440' | 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' | |
thanks!
Files
Updated by Eyal Maran about 9 years ago
Sorry, just realized it's in digital-ocean plugin part.. I don't know how to move it to the correct one..
Updated by Anonymous about 9 years ago
- Project changed from DigitalOcean to OpenNebula
The ONE plugin seems not to be maintained by the original authors at the moment and is broken since at least Foreman 1.8. I'll try to contact the authors and see what's the status.
Updated by Tim Verhoeven about 9 years ago
I'm having the same issue. Basically it looks like the API for plugins and more specific compute resources has been changing in newer Foreman releases and the plugin has been updated to follow.
I've got the error above fixed my moving a file, but then another error popped up. I really could use this plugin back in working order so I'm willing to take a shot at updating it. But is there some documentation somewhere documenting the changes in the API since Foreman 1.5? Else it would be a bit difficult for me since I'm not a Foreman developer, just an avid user ;)
Updated by Eyal Maran about 9 years ago
Tim Verhoeven wrote:
I'm having the same issue. Basically it looks like the API for plugins and more specific compute resources has been changing in newer Foreman releases and the plugin has been updated to follow.
I've got the error above fixed my moving a file, but then another error popped up. I really could use this plugin back in working order so I'm willing to take a shot at updating it. But is there some documentation somewhere documenting the changes in the API since Foreman 1.5? Else it would be a bit difficult for me since I'm not a Foreman developer, just an avid user ;)
Hi Tim,
I ended up using this fork: https://github.com/b0e/foreman-one
In /usr/share/foreman/bundler.d/Gemfile.local.rb: gem 'foreman_one', :git => "https://github.com/b0e/foreman-one"
It seems to be working fine. I didn't have much time to test it, but at least I don't get the same error as before.
Updated by Tim Verhoeven about 9 years ago
Thanks for the hint. Using that fork I get a lot further along. But I still can't save a compute profile. Now I get this error:
| Started POST "/compute_profiles/1-1-Small/compute_attributes" for 10.68.26.11 at 2015-11-06 15:36:29 +0100
2015-11-06 15:36:29 [app] [I] Processing by ComputeAttributesController#create as HTML
2015-11-06 15:36:29 [app] [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"ys5rue/5FEH+XCPwIKT1VOdOQEqFHAshqEYJ6IOmAHY=", "compute_attribute"=>{"vm_attrs"=>{"template_id"=>"0", "vcpu"=>"", "me
mory"=>"", "gid"=>"0", "interfaces"=>{"vnetid"=>"", "_delete"=>"1", "model"=>"virtio"}}, "compute_profile_id"=>"1", "compute_resource_id"=>"1"}, "compute_profile_id"=>"1-1-Small"}
2015-11-06 15:36:29 [sql] [I] Successfully decrypted field for ForemanOne::One DAP-OpenNebula
2015-11-06 15:36:29 [app] [W] Action failed
| NoMethodError: undefined method `vm_description' for #<Fog::Compute::OpenNebula::Server:0x007f100daecee0>
| /opt/rh/ruby193/root/usr/share/gems/gems/activesupport-3.2.8/lib/active_support/core_ext/object/try.rb:36:in `try'
| /usr/share/foreman/app/models/compute_attribute.rb:29:in `pretty_vm_attrs'
| /usr/share/foreman/app/models/compute_attribute.rb:35:in `update_name'
But we are getting close ;)
Updated by Mike Fröhner about 9 years ago
- File foreman-error.log foreman-error.log added
Hi Tim,
this error look familiar. I think I had this error too, before using that fork which Eyal suggested. Which version of OpenNebula (oned) and foreman are you using?
For me it is:
OpenNebula 4.12.1 & foreman 1.9.3 & the suggest fork of the plugin.
I try to create a host on my oned cluster throught foreman/hosts/new. After using the fork of foreman_one, it is possible for me to select the configured oned controller for "Deploy on". Foreman is able to fetch to configured templates from OpenNebula and it is also possible to select the virtual network from oned. Something which is strange for me, I have to select the network on the "Interfaces" tab and not at the part of virtual machine. After clicking the "submit" button I get the error:
Unable to save
Query instance details for asdf.bln.int.planetromeo.com task failed with the following error: PG::UndefinedFunction: ERROR: operator does not exist: character varying = integer LINE 1: ...ECT "hosts".* FROM "hosts" WHERE "hosts"."uuid" = 28 LIMIT... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. : SELECT "hosts".* FROM "hosts" WHERE "hosts"."uuid" = 28 LIMIT 1
And after clicking the same button again foreman says "Some of the interfaces are invalid. Please check the table below." and auto selects the interfaces tab on hosts/new. I figured out the MAC address was not set probably so I manually configured it and saved it. It was saved on foreman's side the VM has not been created on my oned cluster. I tried to do this again, but before clicking submit I configured the mac address manually: same behavior. I'll attach the error output.
Updated by Mike Fröhner about 9 years ago
Well okay, after reading your message again and playing arround I found out I get the same error you have on saving the compute profile :)
Updated by Mike Fröhner about 9 years ago
- File compute_profile.log compute_profile.log added
attaching my full strace for saving the compute_profile
Updated by Tim Verhoeven about 9 years ago
Ok, so you are indeed getting the same error like I do now.
I'm running Foreman 1.9.3 and OpenNebula 4.14.0.
I'm not enough of a developer to figure this one out myself. So hopefuly the created of this latest version can help us.
Updated by Tim Verhoeven about 9 years ago
I've opened 2 issues on the foreman-one github to track the actual issues I'm seeing. The current head from the foreman-one includes all the work from the b0e/foreman-one fork. But at least with this version I'm already seeing the VM and templates on the OpenNebula side. Se we are making progress.
Updated by Anonymous almost 9 years ago
what's the status here with foreman_one 0.4?
Updated by Mike Fröhner over 8 years ago
Michael Moll wrote:
what's the status here with foreman_one 0.4?
I tested 0.4 via adding:
gem 'foreman_one', :git => "https://github.com/theforeman/foreman-one.git"
gem "fog", :git => "https://github.com/netways/fog.git", :branch => "net-v1.33.0"
I am running foreman 1.11 and OpenNebula 4.14.2 and I still do have the them behavior, which I reported 6 month ago:
Unable to save
Query instance details for asdf.bln.int.planetromeo.com task failed with the following error: PG::UndefinedFunction: ERROR: operator does not exist: character varying = integer LINE 1: ...ECT "hosts".* FROM "hosts" WHERE "hosts"."uuid" = 28 LIMIT... ^ HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts. : SELECT "hosts".* FROM "hosts" WHERE "hosts"."uuid" = 28 LIMIT 1
And after clicking the same button again foreman says "Some of the interfaces are invalid. Please check the table below." and auto selects the interfaces tab on hosts/new. I figured out the MAC address was > not set probably so I manually configured it and saved it. It was saved on foreman's side the VM has not been created on my oned cluster. I tried to do this again, but before clicking submit I configured the mac address manually: same behavior. I'll attach the error output."
Updated by Anonymous over 8 years ago
Plase use our packages in the respective yum/apt repos, or at least use the fog version coming with Foreman.
In another note: As I already mentioned in multiple GitHub issues, it would be great to have a fog-one repo split out and maintained by people using one to get in fixes more easy and use it on gems like foreman_one.