Bug 1516497
Summary: | [v2v] Single VM or multiple VMs transform failed with error "Source provider must be of type Vmware", "nil"] | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Nisim Simsolo <nsimsolo> | ||||
Component: | Providers | Assignee: | Shmuel Melamud <smelamud> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Nisim Simsolo <nsimsolo> | ||||
Severity: | urgent | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 5.9.0 | CC: | cpelland, dagur, gblomqui, gmccullo, jfrey, jhardy, lsmola, michal.skrivanek, mkanoor, nsimsolo, obarenbo, smelamud, tfitzger, ykaul | ||||
Target Milestone: | GA | Keywords: | 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: | |||||||
: | 1530773 (view as bug list) | Environment: | |||||
Last Closed: | 2018-06-21 20:43:53 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: | 1491182, 1530773 | ||||||
Attachments: |
|
Description
Nisim Simsolo
2017-11-22 18:39:41 UTC
Created attachment 1357740 [details]
evm.log
Hilda, could this also be duplicate of? https://bugzilla.redhat.com/show_bug.cgi?id=1514334 [----] I, [2017-11-22T11:30:11.000282 #63741:c47138] INFO -- : MIQ(EmsRefresh.save_vms_inventory) EMS: [nsimsolo41], id: [1] Duplicate unique values found: ["423c483c-7ef7-1ad8-f56d-2283e40d6624", "423c7623-0a4f-65fc-bcaf-254d3d0e7c10"] looks suspicious, the other id is of a different vm. We need to differentiate between single vm import and mass vm import using tags When doing a single vm the target should be the VM object. When doing mass import the target has to be the EMS object. Thie code https://github.com/ManageIQ/manageiq-ui-classic/blob/d4f2be2fdbd1a82dc232223c60593327c5f9abbd/app/controllers/mixins/actions/vm_actions/transform.rb#L7 Doesn't differentiate between EMS and VM when running the mass import the URL is http://localhost:3000/ems_infra/10000000000001?display=vms The id here is for the EMS and not for VM. the above mentioned code doesn't check if the ID is for VM or EMS and assumes that the object is the VM. That code was written with the assumption that when doing mass import there won't be an ID field. The error mentioned in this ticket happens because we are using the EMS object and assuming its a VM. The code needs to be fixed in PR https://github.com/ManageIQ/manageiq-ui-classic/pull/3073 So that it can properly set the target (In reply to mkanoor from comment #20) > We need to differentiate between single vm import and mass vm import using > tags > > When doing a single vm the target should be the VM object. > > When doing mass import the target has to be the EMS object. > > Thie code > https://github.com/ManageIQ/manageiq-ui-classic/blob/ > d4f2be2fdbd1a82dc232223c60593327c5f9abbd/app/controllers/mixins/actions/ > vm_actions/transform.rb#L7 > > Doesn't differentiate between EMS and VM when running the mass import the > URL is > http://localhost:3000/ems_infra/10000000000001?display=vms > > The id here is for the EMS and not for VM. the above mentioned code doesn't > check if the ID is for VM or EMS and assumes that the object is the VM. That > code was written with the assumption that when doing mass import there won't > be an ID field. > > The error mentioned in this ticket happens because we are using the EMS > object and assuming its a VM. > > The code needs to be fixed in PR > https://github.com/ManageIQ/manageiq-ui-classic/pull/3073 > > So that it can properly set the target Shmuel, do you have everything you need to make progress here? 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 |