Bug #23145
closedThe new-host form fails to show virtual machine form after an error occurs during provisioning
Description
1. try to create a new host on compute resource (tested with oVirt, but the code-path is the same for all compute resources), while intentionally leaving some incorrect value (to cause the provisioning to fail) such leaving 'disk interface' blank
2. when the the provisioning fails, in the Virtual Machine, it's reported
'maude-jordahl.inecas.ovirt.test' not found on 'abcde ovirt (oVirt)' 'maude-jordahl.inecas.ovirt.test' could be deleted or 'abcde ovirt (oVirt)' is not responding.
It turns out we were masking out exceptions when creating new compute object https://github.com/theforeman/foreman/blob/8ac0ffd9ec235fa08d77d3f8d48be4e29433a94a/app/models/concerns/orchestration/compute.rb#L25
After removing the rescue nil
, which seems was not even helping anything in the original issue (https://github.com/theforeman/foreman/pull/3006/files), the root exception showed up:
2018-04-06T14:27:22 [F|app|] ActionView::Template::Error (unable to convert unpermitted parameters to hash): 2018-04-06T14:27:22 [F|app|] 8: <% end %> | 9: </h3> | 10: <%= f.fields_for 'compute_attributes', OpenStruct.new(f.object.compute_attributes) do |f| %> | 11: <%= render provider_partial(@host.compute_resource, 'network'), :f => f, :disabled => f.object.persisted?, :compute_resource => @host.compute_resource, :new_host => new_vm?(@host), :new_vm => new_vm?(@host) %> | 12: <% end %> | 13: </fieldset> | 14: <% end %> 2018-04-06T14:27:22 [F|app|] 2018-04-06T14:27:22 [F|app|] app/models/compute_resource.rb:163:in `new_vm' | app/models/compute_resources/foreman/model/ovirt.rb:283:in `new_vm' | app/models/concerns/orchestration/compute.rb:25:in `compute_object' | app/helpers/compute_resources_vms_helper.rb:242:in `new_vm?' | app/views/nic/_provider_specific_form.html.erb:11:in `block in _4b811acf287d4e5bcb68d9f3d7a65854' | app/views/nic/_provider_specific_form.html.erb:10:in `_4b811acf287d4e5bcb68d9f3d7a65854' | app/views/nic/manageds/_managed.html.erb:16:in `_9a9a2fd328cdd4e5c420cac4b473b902' | app/views/hosts/_interfaces.html.erb:50:in `block in _6fc94f3b1e91f2db7acb3fe454d52772' | app/views/hosts/_interfaces.html.erb:49:in `_6fc94f3b1e91f2db7acb3fe454d52772' | app/views/hosts/_form.html.erb:102:in `block (2 levels) in _e237b40a33ad5afb1535f229dd5ab30b' | app/helpers/form_helper.rb:296:in `form_for' | app/views/hosts/_form.html.erb:8:in `block in _e237b40a33ad5afb1535f229dd5ab30b' | app/models/taxonomy.rb:75:in `block (2 levels) in as_taxonomy' | app/models/concerns/foreman/thread_session.rb:173:in `as_location' | app/models/taxonomy.rb:74:in `block in as_taxonomy' | app/models/concerns/foreman/thread_session.rb:136:in `as_org' | app/models/taxonomy.rb:73:in `as_taxonomy' | app/views/hosts/_form.html.erb:6:in `_e237b40a33ad5afb1535f229dd5ab30b' | app/views/hosts/new.html.erb:3:in `_5d22ebb4ea92e4b9dcb444f6a788e75b' | app/controllers/application_controller.rb:292:in `process_error' | app/controllers/hosts_controller.rb:111:in `create' | app/controllers/concerns/application_shared.rb:15:in `set_timezone'
It's probably a regression after migration to Rails 5, proposing as a blocker for 1.18 GA
Updated by The Foreman Bot almost 7 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/5412 added
Updated by Ivan Necas almost 7 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset d7a9d13f405c5aba69911749b206af337a8369be.