Bug 1514939

Summary: [v2v] Transform tagged VMs to RHV failed with "Error during 'Provisioning': undefined method `id' for nil:NilClass"
Product: Red Hat CloudForms Management Engine Reporter: Nisim Simsolo <nsimsolo>
Component: ProvidersAssignee: Shmuel Melamud <smelamud>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: urgent Docs Contact:
Priority: high    
Version: 5.9.0CC: dagur, gblomqui, jfrey, jhardy, jocarter, michal.skrivanek, nsimsolo, obarenbo, tjelinek
Target Milestone: GAKeywords: TestBlocker, TestOnly
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rhv:v2v
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1530772 (view as bug list) Environment:
Last Closed: 2018-06-21 20:24:20 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1530772    
Attachments:
Description Flags
evm.log
none
screenshot of failure message none

Description Nisim Simsolo 2017-11-19 15:01:31 UTC
Description of problem:
Trying to transform tagged VMs failed with unclear error message:
"Error during 'Provisioning': undefined method `id' for nil:NilClass"


Version-Release number of selected component (if applicable):
cfme-5.9.0.8-1.el7cf.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Browse CFME UI -> Compute -> Infrastructure -> Virtual machines.
2. Tag 2 or more VMware VMs, select lifecycle - > transform tagged VMs to RHV
3. Enter details in transform dialog and click submit.

Actual results:
Transform failed with "Error during 'Provisioning': undefined method `id' for nil:NilClass" 

Expected results:
Transform should not fail

Additional info:
screenshot and evm.log (debug level) attached

Comment 2 Nisim Simsolo 2017-11-19 15:02:27 UTC
Created attachment 1355192 [details]
evm.log

Comment 3 Nisim Simsolo 2017-11-19 15:03:26 UTC
Created attachment 1355195 [details]
screenshot of failure message

Comment 4 Daniel Gur 2017-12-03 14:37:20 UTC
Hello All, This bug is totally blocking QE progress in this feature.
Please prioritize accordingly

Comment 5 Shmuel Melamud 2017-12-04 14:19:08 UTC
*** Bug 1518391 has been marked as a duplicate of this bug. ***

Comment 7 CFME Bot 2017-12-21 11:11:27 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/dbfc5ba17e01422fc6462591540dfb2f3e507fe0

commit dbfc5ba17e01422fc6462591540dfb2f3e507fe0
Author:     Shmuel Melamud <smelamud>
AuthorDate: Thu Dec 14 23:41:01 2017 +0200
Commit:     Shmuel Melamud <smelamud>
CommitDate: Wed Dec 20 01:38:11 2017 +0200

    Target for mass VM transformation dialog
    
    Created a separate vm_transform_mass action to handle VM Transform
    button clicks in on Providers page and on Compute > Infrastructure >
    Virtual Machines page. This action interprets the ID passed to it as
    provider ID, while regular vm_transform action interprets it as VM ID.
    If provider ID is not passed, the Redhat provider EMS object is used as
    target.
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1514939
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1516497

 .../application_controller/ci_processing.rb        |  3 ++
 app/controllers/application_controller/explorer.rb |  1 +
 .../actions/provider_actions/mass_transform.rb     | 56 ++++++++++++++++++++++
 .../mixins/actions/vm_actions/transform.rb         | 24 ++++------
 app/controllers/vm_infra_controller.rb             | 23 ---------
 .../application_helper/toolbar/vm_infras_center.rb |  2 +-
 spec/controllers/ems_infra_controller_spec.rb      |  6 +--
 spec/controllers/vm_infra_controller_spec.rb       |  8 ----
 8 files changed, 72 insertions(+), 51 deletions(-)
 create mode 100644 app/controllers/mixins/actions/provider_actions/mass_transform.rb