Project

General

Profile

Bug #10272

error when accessing Virtual Machine tab of new host with foreman-xen

Added by Joe Passavanti about 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Difficulty:
Triaged:
No
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

release 1.8 RC3

when trying to create a new host, with foreman-xen plugin, when I change from Baremetal to Xenserver in the new host page, the "Virtual Machine" tab turns red, and I get an ajax http 500 error

s1.png View s1.png 85.3 KB Joe Passavanti, 04/26/2015 03:54 PM
S1

History

#1 Updated by Dominic Cleal about 7 years ago

production.log might have more info, but it's likely that foreman_xen needs a similar change to https://github.com/theforeman/foreman-digitalocean/pull/7

#2 Updated by Joe Passavanti about 7 years ago

Here is the excerpt from production.log

2015-04-26 12:45:35 [I] Started POST "/hosts/compute_resource_selected" for 192.168.208.116 at 2015-04-26 12:45:35 -0700
2015-04-26 12:45:35 [I] Processing by HostsController#compute_resource_selected as */*
2015-04-26 12:45:35 [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"e943oVn4agem3kR2ycKK5dMr7of5yggld8KnO4F3cH8=", "host"=>{"name"=>"", "location_id"=>"", "hostgroup_id"=>"", "compute_resource_id"=>"1", "environment_id"=>"", "puppet_ca_proxy_id"=>"", "puppet_proxy_id"=>"", "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "managed"=>"1", "primary"=>"1", "provision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>""}, "new_interfaces"=>{"_destroy"=>"1", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "managed"=>"1", "primary"=>"0", "provision"=>"0", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "architecture_id"=>"", "provision_method"=>"build", "build"=>"1", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"3-Users", "enabled"=>"1", "model_id"=>"", "comment"=>"", "overwrite"=>"false"}, "fakepassword"=>"[FILTERED]"}
2015-04-26 12:45:35 [I] Successfully decrypted field for ForemanXen::Xenserver I2B-xen
2015-04-26 12:45:35 [I] Successfully decrypted field for ForemanXen::Xenserver I2B-xen
2015-04-26 12:45:37 [I]   Rendered hosts/_compute_detail.html.erb (16.8ms)
2015-04-26 12:45:37 [I]   Rendered hosts/_compute.html.erb (2177.7ms)
2015-04-26 12:45:37 [I] Completed 500 Internal Server Error in 2202.3ms
2015-04-26 12:45:37 [F] 
ActionView::MissingTemplate (Missing partial compute_resources_vms/form/xenserver/base with {:locale=>[:en], :formats=>[:html, :text, :js, :css, :ics, :csv, :png, :jpeg, :gif, :bmp, :tiff, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip, :yml], :handlers=>[:erb, :builder, :rabl]}. Searched in:
  * "/usr/share/foreman/app/views" 
  * "/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_dhcp_browser-0.0.6/app/views" 
  * "/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_xen-0.0.4.1/app/views" 
  * "/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_setup-2.1.0/app/views" 
  * "/usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.2.6/app/views" 
):
  app/views/hosts/_compute_detail.html.erb:5:in `_2e3b421eff18d8c54ef464734247e67f'
  app/views/hosts/_compute.html.erb:5:in `block in _1b256fe122d91d94377fefb6512f515d'
  app/views/hosts/_compute.html.erb:1:in `_1b256fe122d91d94377fefb6512f515d'
  app/controllers/hosts_controller.rb:132:in `block in compute_resource_selected'
  app/models/taxonomy.rb:61:in `block (2 levels) in as_taxonomy'
  app/models/concerns/foreman/thread_session.rb:147:in `as_location'
  app/models/taxonomy.rb:60:in `block in as_taxonomy'
  app/models/concerns/foreman/thread_session.rb:112:in `as_org'
  app/models/taxonomy.rb:59:in `as_taxonomy'
  app/controllers/hosts_controller.rb:128:in `compute_resource_selected'
  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'

#3 Updated by Joshua Gordon about 7 years ago

I was able to by pass this issue. Here is what I did.
Create a new folder owned by foreman under (/usr/share/foreman/app/views/compute_resources_vms/form) Called the folder xenserver
Copied the file /usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_xen-0.0.4.1/app/views/compute_resources_vms/form/_xenserver.html.erb to the new directory.
Rename the file base.html.erb
Now the error goes away. I am able to deploy from custom template I have create in xen but it believe it introduced a new issue.
I cannot deploy from a built in template the production log reports the following.
2015-04-30 09:07:36 [I] Started POST "/hosts" for 192.168.0.107 at 2015-04-30 09:07:36 -0600
2015-04-30 09:07:36 [I] Processing by HostsController#create as /*
2015-04-30 09:07:36 [I] Parameters: {"utf8"=>"✓", "authenticity_token"=>"OMMITED", "host"=>{"name"=>"uttest03", "hostgroup_id"=>"3", "compute_resource_id"=>"1", "environment_id"=>"1", "puppet_ca_proxy_id"=>"1", "puppet_proxy_id"=>"1", "puppetclass_ids"=>[""], "managed"=>"true", "progress_report_id"=>"[FILTERED]", "type"=>"Host::Managed", "compute_attributes"=>{"vcpus_max"=>"2", "memory_min"=>"1073741824", "memory_max"=>"1073741824", "custom_template_name"=>"", "builtin_template_name"=>"Ubuntu Trusty Tahr 14.04", "xenstore"=>{"vm-data"=>{"ifs"=>{"0"=>{"ip"=>"", "gateway"=>"", "netmask"=>""}}, "nameserver1"=>"", "nameserver2"=>"", "environment"=>"production"}}, "VBDs"=>{"print"=>"Local storage", "physical_size"=>"10"}, "VIFs"=>{"print"=>"VLAN 200 Deployment"}, "start"=>"1"}, "interfaces_attributes"=>{"0"=>{"_destroy"=>"0", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"uttest03", "domain_id"=>"1", "subnet_id"=>"1", "ip"=>"192.168.200.205", "managed"=>"1", "primary"=>"1", "provision"=>"1", "virtual"=>"0", "tag"=>"", "attached_to"=>""}, "new_interfaces"=>{"_destroy"=>"1", "type"=>"Nic::Managed", "mac"=>"", "identifier"=>"", "name"=>"", "domain_id"=>"", "subnet_id"=>"", "ip"=>"", "managed"=>"1", "primary"=>"0", "provision"=>"0", "virtual"=>"0", "tag"=>"", "attached_to"=>""}}, "architecture_id"=>"1", "operatingsystem_id"=>"1", "provision_method"=>"build", "build"=>"1", "medium_id"=>"6", "ptable_id"=>"9", "disk"=>"", "root_pass"=>"[FILTERED]", "is_owned_by"=>"3-Users", "enabled"=>"1", "comment"=>"", "overwrite"=>"false"}, "capabilities"=>"build", "provider"=>"Xenserver"}
2015-04-30 09:07:37 [I] Adding Compute instance for uttest03.psi-cu-software.com
2015-04-30 09:07:37 [I] Successfully decrypted field for ForemanXen::Xenserver utxenserver01
2015-04-30 09:07:37 [I] Missing #storage_repository or #SR attribute
2015-04-30 09:07:37 [I] /usr/share/foreman/vendor/ruby/1.9.1/gems/fog-1.28.0/lib/fog/xenserver/requests/compute/create_vdi.rb:13:in `create_vdi'
/usr/share/foreman/vendor/ruby/1.9.1/gems/fog-1.28.0/lib/fog/xenserver/models/compute/vdi.rb:84:in `save'
/usr/share/foreman/vendor/ruby/1.9.1/gems/fog-core-1.29.0/lib/fog/core/collection.rb:51:in `create'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_xen-0.0.4.1/app/models/foreman_xen/xenserver.rb:199:in `create_vm_from_builtin'
/usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_xen-0.0.4.1/app/models/foreman_xen/xenserver.rb:130:in `create_vm'
/usr/share/foreman/app/models/concerns/orchestration/compute.rb:76:in `setCompute'
/usr/share/foreman/app/models/concerns/orchestration.rb:141:in `execute'
/usr/share/foreman/app/models/concerns/orchestration.rb:86:in `block in process'
/usr/share/foreman/app/models/concerns/orchestration.rb:78:in `each'
/usr/share/foreman/app/models/concerns/orchestration.rb:78:in `process'
/usr/share/foreman/app/models/concerns/orchestration.rb:19:in `on_save'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:649:in `_run
_2904541033515915768__save__115481434265482485__callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_save_callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/callbacks.rb:264:in `create_or_update'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/persistence.rb:84:in `save'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/validations.rb:50:in `save'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/attribute_methods/dirty.rb:22:in `save'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/transactions.rb:259:in `block (2 levels) in save'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/transactions.rb:313:in `block in with_transaction_returning_status'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/transactions.rb:208:in `transaction'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/transactions.rb:311:in `with_transaction_returning_status'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/transactions.rb:259:in `block in save'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/transactions.rb:270:in `rollback_active_record_state!'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/transactions.rb:258:in `save'
/usr/share/foreman/app/models/concerns/foreman/sti.rb:29:in `save_with_type'
/usr/share/foreman/app/controllers/hosts_controller.rb:84:in `create'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/abstract_controller/base.rb:167:in `process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_controller/metal/rendering.rb:10:in `process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:627:in `block (4 levels) in run_4454168189738762528__process_action__2092032416086727906__callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_7411'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:326:in `around'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:310:in `_callback_around_1641'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7411'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:626:in `block (3 levels) in _run
_4454168189738762528__process_action__2092032416086727906__callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_7410'
/usr/share/foreman/app/controllers/concerns/application_shared.rb:13:in `set_timezone'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7410'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:625:in `block (2 levels) in _run
_4454168189738762528__process_action__2092032416086727906__callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_7409'
/usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7409'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:448:in `block in _run
_4454168189738762528__process_action__2092032416086727906__callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in conditional_callback_around_7408'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:326:in `around'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:310:in `_callback_around_13'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7408'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:414:in `_run
_4454168189738762528__process_action__2092032416086727906__callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/abstract_controller/callbacks.rb:17:in `process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_controller/metal/rescue.rb:29:in `process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `block in instrument'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `instrument'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/abstract_controller/base.rb:121:in `process'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/abstract_controller/rendering.rb:45:in `process'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_controller/metal.rb:203:in `dispatch'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_controller/metal.rb:246:in `block in action'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb:73:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb:36:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/routing/route_set.rb:608:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.2.6/lib/apipie/static_dispatcher.rb:65:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:97:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/apipie-rails-0.2.6/lib/apipie/middleware/checksum_in_headers.rb:27:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/etag.rb:23:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/conditionalget.rb:35:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/middleware/head.rb:14:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/usr/share/foreman/lib/middleware/catch_json_parse_errors.rb:9:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/middleware/flash.rb:242:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:210:in `context'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/session/abstract/id.rb:205:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/query_cache.rb:64:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `_run__3473337828580871364__call__115481434265482485__callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/rack/logger.rb:32:in `call_app'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/rack/logger.rb:16:in `block in call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/tagged_logging.rb:22:in `tagged'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/rack/logger.rb:16:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/methodoverride.rb:21:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/runtime.rb:17:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/activesupport-3.2.21/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/lock.rb:15:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/actionpack-3.2.21/lib/action_dispatch/middleware/static.rb:83:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:143:in `pass'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:155:in `invalidate'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:71:in `call!'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/engine.rb:484:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/application.rb:231:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.21/lib/rails/railtie/configurable.rb:30:in `method_missing'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:134:in `call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:64:in `block in call'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `each'
/usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/urlmap.rb:49:in `call'
/usr/lib/ruby/vendor_ruby/phusion_passenger/rack/thread_handler_extension.rb:77:in `process_request'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:142:in `accept_and_process_next_request'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler/thread_handler.rb:110:in `main_loop'
/usr/lib/ruby/vendor_ruby/phusion_passenger/request_handler.rb:448:in `block (3 levels) in start_threads'
2015-04-30 09:07:37 [W] Rolling back due to a problem: [Set up compute instance uttest03.psi-cu-software.com 2 failed [#<Host::Managed id: nil, name: "uttest03.psi-cu-software.com", last_compile: nil, last_freshcheck: nil, last_report: nil, updated_at: nil, source_file_id: nil, created_at: nil, root_pass: "OMMITED", serial: nil, puppet_status: 0, architecture_id: 1, operatingsystem_id: 1, environment_id: 1, ptable_id: 9, medium_id: 6, build: true, comment: "", disk: "", installed_at: nil, model_id: nil, hostgroup_id: 3, owner_id: 3, owner_type: "User", enabled: true, puppet_ca_proxy_id: 1, managed: true, use_image: nil, image_file: nil, uuid: nil, compute_resource_id: 1, puppet_proxy_id: 1, certname: nil, image_id: nil, organization_id: nil, location_id: nil, type: "Host::Managed", otp: nil, realm_id: nil, compute_profile_id: nil, provision_method: "build", grub_pass: "OMMITED">, :setCompute]]
2015-04-30 09:07:37 [I] Failed to save:
2015-04-30 09:07:37 [I] Rendered hosts/_progress.html.erb (0.2ms)
2015-04-30 09:07:37 [I] Rendered puppetclasses/_selectedClasses.html.erb (0.0ms)
2015-04-30 09:07:37 [I] Rendered puppetclasses/_classes_in_groups.html.erb (0.0ms)
2015-04-30 09:07:37 [I] Rendered puppetclasses/_classes.html.erb (0.2ms)
2015-04-30 09:07:37 [I] Rendered puppetclasses/_class_selection.html.erb (157.5ms)
2015-04-30 09:07:37 [I] Successfully decrypted field for ForemanXen::Xenserver utxenserver01
2015-04-30 09:07:38 [I] Started GET "/tasks/4b0fd3cc-6a85-416a-9cc1-dd27e12c7913" for 192.168.0.107 at 2015-04-30 09:07:38 -0600
2015-04-30 09:07:38 [I] Processing by TasksController#show as */

2015-04-30 09:07:38 [I] Parameters: {"id"=>"4b0fd3cc-6a85-416a-9cc1-dd27e12c7913"}
2015-04-30 09:07:38 [I] Rendered tasks/_list.html.erb (0.5ms)
2015-04-30 09:07:38 [I] Completed 200 OK in 4.7ms (Views: 1.1ms | ActiveRecord: 0.6ms)
2015-04-30 09:07:38 [I] Rendered vendor/ruby/1.9.1/gems/foreman_xen-0.0.4.1/app/views/compute_resources_vms/form/_templates.html.erb (838.9ms)
2015-04-30 09:07:38 [I] Rendered vendor/ruby/1.9.1/gems/foreman_xen-0.0.4.1/app/views/compute_resources_vms/form/_xenstore.html.erb (0.3ms)
2015-04-30 09:07:38 [I] Rendered vendor/ruby/1.9.1/gems/foreman_xen-0.0.4.1/app/views/compute_resources_vms/form/_volume.html.erb (5.5ms)
2015-04-30 09:07:38 [I] Rendered vendor/ruby/1.9.1/gems/foreman_xen-0.0.4.1/app/views/compute_resources_vms/form/_volume.html.erb (46.9ms)
2015-04-30 09:07:38 [I] Rendered vendor/ruby/1.9.1/gems/foreman_xen-0.0.4.1/app/views/compute_resources_vms/form/_network.html.erb (54.1ms)
2015-04-30 09:07:38 [I] Rendered compute_resources_vms/form/xenserver/_base.html.erb (1505.9ms)
2015-04-30 09:07:38 [I] Rendered compute_resources_vms/form/_volumes.html.erb (0.3ms)
2015-04-30 09:07:38 [I] Rendered hosts/_compute_detail.html.erb (1507.4ms)
2015-04-30 09:07:38 [I] Rendered hosts/_compute.html.erb (1558.3ms)
2015-04-30 09:07:38 [I] Rendered nic/_base_form.html.erb (18.3ms)
2015-04-30 09:07:38 [I] Rendered nic/_virtual_form.html.erb (1.7ms)
2015-04-30 09:07:38 [I] Rendered nic/_provider_specific_form.html.erb (0.4ms)
2015-04-30 09:07:38 [I] Rendered nic/manageds/_managed.html.erb (22.8ms)
2015-04-30 09:07:38 [I] Rendered nic/_base_form.html.erb (11.3ms)
2015-04-30 09:07:38 [I] Rendered nic/_virtual_form.html.erb (1.0ms)
2015-04-30 09:07:38 [I] Rendered nic/_provider_specific_form.html.erb (0.2ms)
2015-04-30 09:07:38 [I] Rendered nic/manageds/_managed.html.erb (14.3ms)
2015-04-30 09:07:38 [I] Rendered hosts/_interfaces.html.erb (40.1ms)
2015-04-30 09:07:38 [I] Rendered common/os_selection/_architecture.html.erb (3.1ms)
2015-04-30 09:07:38 [I] Rendered common/os_selection/_operatingsystem.html.erb (7.5ms)
2015-04-30 09:07:38 [I] Rendered hosts/_operating_system.html.erb (15.6ms)
2015-04-30 09:07:38 [I] Rendered hosts/_unattended.html.erb (1614.8ms)
2015-04-30 09:07:38 [I] Rendered puppetclasses/_class_parameters.html.erb (0.0ms)
2015-04-30 09:07:38 [I] Rendered puppetclasses/_classes_parameters.html.erb (11.8ms)
2015-04-30 09:07:38 [I] Rendered common_parameters/_inherited_parameters.html.erb (2.2ms)
2015-04-30 09:07:38 [I] Rendered common_parameters/_puppetclass_parameter.html.erb (2.5ms)
2015-04-30 09:07:38 [I] Rendered common_parameters/_puppetclasses_parameters.html.erb (3.6ms)
2015-04-30 09:07:38 [I] Rendered common_parameters/_parameter.html.erb (1.4ms)
2015-04-30 09:07:38 [I] Rendered common_parameters/_parameters.html.erb (3.1ms)
2015-04-30 09:07:39 [I] Rendered hosts/_form.html.erb (1833.9ms)
2015-04-30 09:07:39 [I] Rendered hosts/new.html.erb within layouts/application (1834.5ms)
2015-04-30 09:07:39 [I] Rendered home/_user_dropdown.html.erb (1.4ms)
2015-04-30 09:07:39 [I] Read fragment views/tabs_and_title_records-3 0.1ms
2015-04-30 09:07:39 [I] Rendered home/_topbar.html.erb (2.4ms)
2015-04-30 09:07:39 [I] Rendered layouts/base.html.erb (3.7ms)
2015-04-30 09:07:39 [I] Completed 200 OK in 2047.2ms (Views: 1800.0ms | ActiveRecord: 58.7ms)
2015-04-30 09:07:40 [I] Started GET "/tasks/4b0fd3cc-6a85-416a-9cc1-dd27e12c7913" for 192.168.0.107 at 2015-04-30 09:07:40 -0600
2015-04-30 09:07:40 [I] Processing by TasksController#show as */*
2015-04-30 09:07:40 [I] Parameters: {"id"=>"4b0fd3cc-6a85-416a-9cc1-dd27e12c7913"}
2015-04-30 09:07:40 [I] Rendered tasks/_list.html.erb (0.9ms)
2015-04-30 09:07:40 [I] Completed 200 OK in 7.1ms (Views: 1.8ms | ActiveRecord: 0.9ms)

#4 Updated by Joe Passavanti about 7 years ago

So, I tried your suggestion, and I had to change it just a little bit to make it work:

mkdir /usr/share/foreman/app/views/compute_resources_vms/form/xenserver
cp /usr/share/foreman/vendor/ruby/1.9.1/gems/foreman_xen-0.0.4.1/app/views/compute_resources_vms/form/_xenserver.html.erb /usr/share/foreman/app/views/compute_resources_vms/form/xenserver/_base.html.erb
chown -R foreman:foreman /usr/share/foreman/app/views/compute_resources_vms/form/xenserver
service apache2 restart

I agree with you, I cannot do a build with Citrix Builtin Template, and using a custom template, no matter what I choose in Foreman, the template in Xenserver does not get overwritten, so then, that also fails as well.

#5 Updated by Joshua Gordon about 7 years ago

I am seeing the same behavior. I am unsure what the next to resolve this will be.

#6 Updated by Joe Passavanti about 7 years ago

so, actually, Citrix Xenserver does create the VM. However, for some reason, it does not boot and Foreman thinks it failed. So there is no record in foreman, however, I do see it created in Xenserver and can start it manually.

#7 Updated by Joshua Gordon about 7 years ago

Yes I am seeing that exact behavior.

#8 Updated by Joe Passavanti about 7 years ago

Well, I have been screwing with this more and more, and I can't believe either nobody else has this problem with using foreman_xen plugin, or the devs just dont give a shit... but it appears after the fix above moving that form in there, it might be missing data when posting to the Xen API server.

I've tried updating the foreman_xen plugin, choose built in template, custom template in xen, nothing will work to do provisioning through Foreman on Xenserver. Pretty sad nobody is paying attention to this.

#9 Updated by Anonymous about 7 years ago

Joe, the problem with foreman_xen was and is that it has only a small userbase, leading to small exposure in general and fewer testing than e.g. VMware. Additionally none of the core devs is using Xen as compute resource and it's impossible for part-time contributors like me to fix things without having access to a Foreman with a Xen CR and putting a lot of time (which i.e. I don't have at the moment) in it.

If anybody has the time and knowledge to contribute to fog and foreman_xen to get it into good shape, this will be more than appreciated - but it's just work that needs to get done now.

In the meanwhile I'd suggest anybody interested to jump in over at https://github.com/theforeman/foreman-xen/pull/20 to help getting things rolling. If help is needed, please ask in #theforeman-dev on freenode (best at European business hours).

#10 Updated by Alejandro Falcon about 7 years ago

I have tested these changes and fix the VM tab in 1.8 and the MAC issue in 1.7. However, we are still without luck when the VM is being created throwing this error:

2015-05-06 13:44:14 [I] Adding Compute instance for test.net
2015-05-06 13:44:14 [I] Successfully decrypted field for ForemanXen::Xenserver xen-pool.net
2015-05-06 13:44:15 [I]

Started GET "/tasks/6fb73ba3-756b-4a46-9fac-65fcdb4228f7" for 192.168.1.10 at 2015-05-06 13:44:15 +0000
2015-05-06 13:44:15 [I] Processing by TasksController#show as */*
2015-05-06 13:44:15 [I] Parameters: {"id"=>"6fb73ba3-756b-4a46-9fac-65fcdb4228f7"}
2015-05-06 13:44:15 [I] Rendered tasks/_list.html.erb (1.5ms)
2015-05-06 13:44:15 [I] Completed 200 OK in 184ms (Views: 174.0ms | ActiveRecord: 1.1ms)
2015-05-06 13:44:15 [I] Missing #storage_repository or #SR attribute
2015-05-06 13:44:15 [I] /opt/rh/ruby193/root/usr/share/gems/gems/fog-1.28.0/lib/fog/xenserver/requests/compute/create_vdi.rb:13:in `create_vdi'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-1.28.0/lib/fog/xenserver/models/compute/vdi.rb:84:in `save'
/opt/rh/ruby193/root/usr/share/gems/gems/fog-core-1.29.0/lib/fog/core/collection.rb:51:in `create'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_xen-0.0.5.1/app/models/foreman_xen/xenserver.rb:216:in `create_vm_from_builtin'
/opt/rh/ruby193/root/usr/share/gems/gems/foreman_xen-0.0.5.1/app/models/foreman_xen/xenserver.rb:147:in `create_vm'
/usr/share/foreman/app/models/concerns/orchestration/compute.rb:76:in `setCompute'
/usr/share/foreman/app/models/concerns/orchestration.rb:141:in `execute'
/usr/share/foreman/app/models/concerns/orchestration.rb:86:in `block in process'
/usr/share/foreman/app/models/concerns/orchestration.rb:78:in `each'
/usr/share/foreman/app/models/concerns/orchestration.rb:78:in `process'
/usr/share/foreman/app/models/concerns/orchestration.rb:19:in `on_save'

#11 Updated by Anonymous about 7 years ago

Alejandro, please also comment in the pull request, that might speed up merging :)

In regard to that create_vdi problem, are you seeing this in 1.7 and 1.8?

#12 Updated by Alejandro Falcon about 7 years ago

Yeah, the create_vdi problem is happening in 1.8 only.

#13 Updated by Anonymous about 7 years ago

OK, without having looked at it, I suspect that some change in fog 1.28 is requiring updates on the Foreman side then.

#14 Updated by Alejandro Falcon about 7 years ago

Thanks for the heads up just looking into fog 1.29 changelogs here https://github.com/fog/fog/blob/master/CHANGELOG.md found:
-Fix Xenserver VDI creation. thanks Paulo Henrique Lopes Ribeiro

I'll try upgrading to 1.29 and will report back.

#15 Updated by Joe Passavanti about 7 years ago

Michael- I will be more than happy to keep an open channel with anyone for testing this and getting into a workable state. We are a Citrix only shop, and I can't tell you how much of a benefit Foreman would be for us. I'll get on the Github repo to watch and do what I can.

Alejandro - I did get that same error as well

Thank you guys for the responses today, and look forward to helping.

#16 Updated by Alejandro Falcon about 7 years ago

using fog 1.29 makes xen creates the vm but then foreman gives this error and roll back:

Query instance details for test.net task failed with the following error: undefined method `interfaces' for #<Fog::Compute::XenServer::Server:0x007f3da758dec8>

#17 Updated by Alejandro Falcon about 7 years ago

These are the logs:

2015-05-06 18:30:49 [W] Query instance details for test.net task failed with the following error: undefined method `interfaces' for #<Fog::Compute::XenServer::Server:0x007f3da758dec8>/usr/share/foreman/app/models/concerns/orchestration/compute.rb:291:in `match_macs_to_nics'
/usr/share/foreman/app/models/concerns/orchestration/compute.rb:122:in `block in setComputeDetails'
/usr/share/foreman/app/models/concerns/orchestration/compute.rb:117:in `each'
/usr/share/foreman/app/models/concerns/orchestration/compute.rb:117:in `setComputeDetails'

#18 Updated by Anonymous about 7 years ago

Regarding that fix in fog 1.29: We could theoretically pull that into foreman core via an override, this was done as an example here: https://github.com/theforeman/foreman/commit/0af12f79a6e6c3a3ecf72d39df89a2edd7e9b39b

Regarding the undefined method `interfaces' error, that sound pretty much like the missed adjustment to the new networking code in 1.8:
https://github.com/theforeman/foreman/commit/43c4bd72 - also https://github.com/theforeman/foreman/commit/6d05514 would require adjustments and there could me more (smaller) commits touching that big interface extraction change.

#19 Updated by Ben Bettridge about 7 years ago

I've tracked the error regarind storage repository to the following code in fog:

if config[:storage_repository].nil? || config[:SR].nil?
  raise ArgumentError.new('Missing #storage_repository or #SR attribute')
end

if config[:storage_repository].present?
  Fog::Logger.deprecation(
    'The attribute #storage_repository is deprecated. Use #SR instead.'
  )
  config[:SR] = config[:storage_repository].reference
end

Which is a little strange. It looks like storage_repository is the now deprecated version of SR but the first check will never pass unless you supply both a :storage_repository and :SR value. As a workaround we can supply the same variable as both arguments. Seems strange though.

#20 Updated by Anonymous about 7 years ago

  • Status changed from New to Feedback
  • Pull request https://github.com/theforeman/foreman-xen/pull/22 added
  • Pull request deleted ()

This might be fixed with foreman_xen 0.1.0 (which requires Foreman 1.8.1), could anybody test and report back please?

#21 Updated by Joe Passavanti about 7 years ago

I was able to test with Foreman 1.8.0, manually updating foreman_xen to 0.1.0 and the patches did work successfully, I was able to provision and edit a VM on Xenserver.

#22 Updated by Anonymous about 7 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

Thanks!

Also available in: Atom PDF