Description of problem: Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. Create a VM on RHEVM and clone that VM from Infrastructure - Lifecycle 2. Request fails with error : [NoMethodError]: undefined method `name' for nil:NilClass 3. Actual results: Expected results: Additional info: Automation.log ============================ nfrastructure/VM/Provisioning/StateMachines] [----] I, [2015-08-19T18:05:40.929423 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Processing State=[CheckProvisioned] [----] I, [2015-08-19T18:05:40.929795 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Following Relationship [miqaedb:/Infrastructure/VM/Provisioning/StateMachines/Methods/CheckProvisioned#create] [----] I, [2015-08-19T18:05:40.940922 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Updated namespace [miqaedb:/Infrastructure/VM/Provisioning/StateMachines/Methods/CheckProvisioned#create ManageIQ/Infrastructure/VM/Provisioning/StateMachines] [----] I, [2015-08-19T18:05:40.952839 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Updated namespace [Infrastructure/VM/Provisioning/StateMachines/Methods/check_provisioned ManageIQ/Infrastructure/VM/Provisioning/StateMachines] [----] I, [2015-08-19T18:05:40.964600 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Invoking [inline] method [/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/Methods/check_provisioned] with inputs [{}] [----] I, [2015-08-19T18:05:40.980637 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) <AEMethod [/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/Methods/check_provisioned]> Starting [----] I, [2015-08-19T18:05:41.521169 #2875:60aa11c] INFO -- : Q-task_id([miq_provision_16]) <AEMethod check_provisioned> ProvisionCheck returned <error> for state <finished> and status <Error> [----] I, [2015-08-19T18:05:41.550740 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) <AEMethod [/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/Methods/check_provisioned]> Ending [----] I, [2015-08-19T18:05:41.550944 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Method exited with rc=MIQ_OK [----] I, [2015-08-19T18:05:41.551529 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Followed Relationship [miqaedb:/Infrastructure/VM/Provisioning/StateMachines/Methods/CheckProvisioned#create] [----] I, [2015-08-19T18:05:41.551779 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Processed State=[CheckProvisioned] with Result=[error] [----] W, [2015-08-19T18:05:41.552013 #2875:629ea4] WARN -- : Q-task_id([miq_provision_16]) Error in State=[CheckProvisioned] [----] I, [2015-08-19T18:05:41.552496 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) In State=[CheckProvisioned], invoking [on_error] method=[update_provision_status(status => '[NoMethodError]: undefined method `name' for nil:NilClass')] [----] I, [2015-08-19T18:05:41.557103 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Updated namespace [Infrastructure/VM/Provisioning/StateMachines/VMProvision_vm/update_provision_status ManageIQ/Infrastructure/VM/Provisioning/StateMachines] [----] I, [2015-08-19T18:05:41.569491 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Invoking [inline] method [/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/VMProvision_VM/update_provision_status] with inputs [{"status"=>"[NoMethodError]: undefined method `name"}] [----] I, [2015-08-19T18:05:41.570502 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) <AEMethod [/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/VMProvision_VM/update_provision_status]> Starting [----] I, [2015-08-19T18:05:42.112290 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) <AEMethod [/ManageIQ/Infrastructure/VM/Provisioning/StateMachines/VMProvision_VM/update_provision_status]> Ending [----] I, [2015-08-19T18:05:42.112441 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Method exited with rc=MIQ_OK [----] I, [2015-08-19T18:05:42.113299 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Followed Relationship [miqaedb:/Infrastructure/VM/Provisioning/StateMachines/VMProvision_vm/clone_to_vm#create] [----] I, [2015-08-19T18:05:42.114110 #2875:629ea4] INFO -- : Q-task_id([miq_provision_16]) Followed Relationship [miqaedb:/infrastructure/VM/Lifecycle/Provisioning#create] [----] I, [2015-08-19T18:05:49.520564 #2872:825e9c] INFO -- : Instantiating [/System/Process/Event?EmsEvent%3A%3Aems_event=1553&MiqServer%3A%3Amiq_server=1&VmOrTemplate%3A%3Avm=1221&event_id=1553&event_type=NETWORK_INTERFACE_PLUGGED_INTO_VM&object_name=Event&vm_id=1221&vmdb_object_type=ems_event] [----] I, [2015-08-19T18:05:49.532695 #2872:825e9c] INFO -- : Updated namespace [/System/Process/Event?EmsEvent%3A%3Aems_event=1553&MiqServer%3A%3Amiq_server=1&VmOrTemplate%3A%3Avm=1221&event_id=1553&event_type=NETWORK_INTERFACE_PLUGGED_INTO_VM&object_name=Event&vm_id=1221&vmdb_object_type=ems_event ManageIQ/System] [----] I, [2015-08-19T18:05:49.597141 #2872:825e9c] INFO -- : Following Relationship [miqaedb:/System/Event/NETWORK_INTERFACE_PLUGGED_INTO_VM#create] [----] I, [2015-08-19T18:05:49.602028 #2872:825e9c] INFO -- : Updated namespace [miqaedb:/System/Event/NETWORK_INTERFACE_PLUGGED_INTO_VM#create ManageIQ/System] [----] I, [2015-08-19T18:05:49.602497 #2872:825e9c] INFO -- : Instance [/ManageIQ/System/Event/NETWORK_INTERFACE_PLUGGED_INTO_VM] not found in MiqAeDatastore - trying [.missing] [----] I, [2015-08-19T18:05:49.613041 #2872:825e9c] INFO -- : Followed Relationship [miqaedb:/System/Event/NETWORK_INTERFACE_PLUGGED_INTO_VM#create] [----] I, [2015-08-19T18:05:53.224079 #2872:825e9c] INFO -- : Instantiating [/System/Process/Event?EmsEvent%3A%3Aems_event=1554&MiqServer%3A%3Amiq_server=1&VmOrTemplate%3A%3Avm=1221&event_id=1554&event_type=NETWORK_ADD_VM_INTERFACE&object_name=Event&vm_id=1221&vmdb_object_type=ems_event] [----] I, [2015-08-19T18:05:53.247704 #2872:825e9c] INFO -- : Updated namespace [/System/Process/Event?EmsEvent%3A%3Aems_event=1554&MiqServer%3A%3Amiq_server=1&VmOrTemplate%3A%3Avm=1221&event_id=1554&event_type=NETWORK_ADD_VM_INTERFACE&object_name=Event&vm_id=1221&vmdb_object_type=ems_event ManageIQ/System] [----] I, [2015-08-19T18:05:53.340631 #2872:825e9c] INFO -- : Following Relationship [miqaedb:/System/Event/NETWORK_ADD_VM_INTERFACE#create] [----] I, [2015-08-19T18:05:53.346168 #2872:825e9c] INFO -- : Updated namespace [miqaedb:/System/Event/NETWORK_ADD_VM_INTERFACE#create ManageIQ/System] [----] I, [2015-08-19T18:05:53.346607 #2872:825e9c] INFO -- : Instance [/ManageIQ/System/Event/NETWORK_ADD_VM_INTERFACE] not found in MiqAeDatastore - trying [.missing] [----] I, [2015-08-19T18:05:53.354757 #2872:825e9c] INFO -- : Followed Relationship [miqaedb:/System/Event/NETWORK_ADD_VM_INTERFACE#create] [----] I, [2015-08-19T18:05:53.596877 #2872:825e9c] INFO -- : Instantiating [/System/Process/Event?EmsEvent%3A%3Aems_event=1555&ExtManagementSystem%3A%3Aems=4&Host%3A%3Ahost=6&MiqServer%3A%3Amiq_server=1&VmOrTemplate%3A%3Avm=885&ems_id=4&event_id=1555&event_type=VmResourceReallocatedEvent&host_id=6&object_name=Event&vm_id=885&vmdb_object_type=ems_event] [----] I, [2015-08-19T18:05:53.609479 #2872:825e9c] INFO -- : Updated namespace [/System/Process/Event?EmsEvent%3A%3Aems_event=1555&ExtManagementSystem%3A%3Aems=4&Host%3A%3Ahost=6&MiqServer%3A%3Amiq_server=1&VmOrTemplate%3A%3Avm=885&ems_id=4&event_id=1555&event_type=VmResourceReallocatedEvent&host_id=6&object_name=Event&vm_id=885&vmdb_object_type=ems_event ManageIQ/System] [----] I, [2015-08-19T18:05:53.677105 #2872:825e9c] INFO -- : Following Relationship [miqaedb:/System/Event/VmResourceReallocatedEvent#create] [----] I, [2015-08-19T18:05:53.683450 #2872:825e9c] INFO -- : Updated namespace [miqaedb:/System/Event/VmResourceReallocatedEvent#create ManageIQ/System]
The original error with a stack trace should exist in the evm.log. Can you try to locate that information as this logging is just showing the error handling in automate which does not provide any root cause information.
Stack trace from evm.log [----] E, [2015-08-20T10:08:46.715099 #2875:629ea4] ERROR -- : Q-task_id([miq_provision_23]) MIQ(MiqProvisionRedhatViaIso#provision_error) [[NoMethodError]: undefined method `name' for nil:NilClass] encountered during phase [boot_from_cdrom] [----] E, [2015-08-20T10:08:46.715329 #2875:629ea4] ERROR -- : Q-task_id([miq_provision_23]) /var/www/miq/vmdb/app/models/miq_provision_redhat_via_iso/state_machine.rb:19:in `boot_from_cdrom' /var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal' /var/www/miq/vmdb/app/models/miq_provision_redhat_via_iso/state_machine.rb:10:in `customize_destination' /var/www/miq/vmdb/app/models/miq_request_task/state_machine.rb:26:in `signal' /var/www/miq/vmdb/app/models/miq_provision/state_machine.rb:26:in `poll_destination_in_vmdb' /var/www/miq/vmdb/app/models/miq_queue.rb:356:in `block in deliver' /opt/rh/ruby200/root/usr/share/ruby/timeout.rb:66:in `timeout' /var/www/miq/vmdb/app/models/miq_queue.rb:352:in `deliver' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:107:in `deliver_queue_message' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:135:in `deliver_message' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:152:in `block in do_work' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `loop' /var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `do_work' /var/www/miq/vmdb/lib/workers/worker_base.rb:323:in `block in do_work_loop' /var/www/miq/vmdb/lib/workers/worker_base.rb:320:in `loop' /var/www/miq/vmdb/lib/workers/worker_base.rb:320:in `do_work_loop' /var/www/miq/vmdb/lib/workers/worker_base.rb:141:in `run' /var/www/miq/vmdb/lib/workers/worker_base.rb:122:in `start' /var/www/miq/vmdb/lib/workers/worker_base.rb:23:in `start_worker' /var/www/miq/vmdb/lib/workers/bin/worker.rb:3:in `<top (required)>' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands/runner.rb:52:in `eval' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands/runner.rb:52:in `<top (required)>' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:64:in `require' /opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:64:in `<top (required)>' script/rails:6:in `require'
Created attachment 1065286 [details] evm log
Looks like you are selecting ISO provisioning but not selecting an ISO image. Can you confirm that is the case and if selecting an ISO image resolves this issue. We will still need to resolve the issue that the dialog is not enforcing that the ISO Image dialog field is required when ISO provisioning is selected.
Right , issue is only no ISO image selection enforcement when provision_type ISO is selected. Changing the title
Drew - As I recall the core of the issue is the handling of the required field in the update_field_required method in app/models/miq_provision_virt_workflow.rb. The current logic resets the required field to false, and later depending on the result of the support_pxe?/support_iso? method tries to restore the field's previous required value, but that has already been overwritten. I was thinking about storing/restoring the default value from a different key as a possible solution. We could look at implementing a special validation method for the field which we already do for several other fields.
https://github.com/ManageIQ/manageiq/pull/5395
New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/74d46d2b5d0dece5169474ed84546e1d586ca09f commit 74d46d2b5d0dece5169474ed84546e1d586ca09f Author: Drew Bomhof <dbomhof> AuthorDate: Wed Nov 11 17:17:01 2015 -0500 Commit: Drew Bomhof <dbomhof> CommitDate: Thu Nov 12 09:56:54 2015 -0500 Validate Iso and Pxe child dialogs https://bugzilla.redhat.com/show_bug.cgi?id=1255190 Refactored how the update_field_required method validates if supports_pxe? or supports_iso? are required fields. Renamed the method to update_field_visibility_pxe_iso We now simply apply the :edit, or :hide flags to the MiqProvisionVirtDialog class which implicitly does not validate on hidden fields app/models/miq_provision_virt_workflow.rb | 16 ++++++------ spec/models/miq_provision_virt_workflow_spec.rb | 33 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 8 deletions(-)
New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=e50013377400a98e42910044085a425457014521 commit e50013377400a98e42910044085a425457014521 Author: Drew Bomhof <dbomhof> AuthorDate: Wed Nov 11 17:17:01 2015 -0500 Commit: Drew Bomhof <dbomhof> CommitDate: Fri Nov 13 15:33:43 2015 -0500 Validate Iso and Pxe child dialogs https://bugzilla.redhat.com/show_bug.cgi?id=1255190 Refactored how the update_field_required method validates if supports_pxe? or supports_iso? are required fields. Renamed the method to update_field_visibility_pxe_iso We now simply apply the :edit, or :hide flags to the MiqProvisionVirtDialog class which implicitly does not validate on hidden fields app/models/miq_provision_virt_workflow.rb | 16 ++++++------ spec/models/miq_provision_virt_workflow_spec.rb | 33 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 8 deletions(-)
New commit detected on cfme/5.5.z: https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=f115304ec432d7cbfe223cc58aa816444d95d9bd commit f115304ec432d7cbfe223cc58aa816444d95d9bd Merge: 45ae51e e500133 Author: Greg McCullough <gmccullo> AuthorDate: Fri Nov 13 16:50:58 2015 -0500 Commit: Greg McCullough <gmccullo> CommitDate: Fri Nov 13 16:50:58 2015 -0500 Merge branch '5.5.z_iso_image_selection_validation' into '5.5.z' Validate Iso and Pxe child dialogs https://bugzilla.redhat.com/show_bug.cgi?id=1255190 https://bugzilla.redhat.com/show_bug.cgi?id=1241890 Refactored how the update_field_required method validates if supports_pxe? or supports_iso? are required fields. Renamed the method to update_field_visibility_pxe_iso We now simply apply the :edit, or :hide flags to the MiqProvisionVirtDialog class which implicitly does not validate on hidden fields PR:https://github.com/ManageIQ/manageiq/pull/5395 Cherry-Pick was clean See merge request !431 app/models/miq_provision_virt_workflow.rb | 16 ++++++------ spec/models/miq_provision_virt_workflow_spec.rb | 33 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 8 deletions(-)
Verified in 5.5.0.12
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/RHSA-2015:2551