Bug 1727131

Summary: [v2v] [API] It is possible to create multiple conversion hosts, based on the same RHV host
Product: Red Hat CloudForms Management Engine Reporter: Ilanit Stein <istein>
Component: V2VAssignee: Daniel Berger <dberger>
Status: CLOSED ERRATA QA Contact: Shveta <sshveta>
Severity: medium Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: medium    
Version: unspecifiedCC: bthurber, dmetzger, roliveri, simaishi, ytale
Target Milestone: GA   
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: v2v
Fixed In Version: 5.11.0.15 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-12 13:36:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: V2V Target Upstream Version:
Embargoed:

Description Ilanit Stein 2019-07-04 14:54:00 UTC
Description of problem:
In CFME UI, Migration settings, it is possible to add an existing RHV host, as a conversion host.
However, once a RHV host is picked as a conversion host, it is not possible to pick it anymore, to create additional conversion hosts.

Using rest api, it is possible to create multiple conversion hosts, for the same single RHV host 

Version-Release number of selected component (if applicable):
CFME-5.10.6.1
RHV-4.3.4.3

Expected:
api request to create a conversion host, based on a RHV host, in case there such already should fail.

Comment 2 Daniel Berger 2019-07-09 14:34:21 UTC
Ok, I think the best approach is to check the tags to see if a resource is already set as a conversion host.

Comment 3 Daniel Berger 2019-07-11 12:28:37 UTC
Changed it to a model validation:

https://github.com/ManageIQ/manageiq/pull/18959

Comment 4 Shveta 2019-07-26 21:36:47 UTC

{ "name": "env-rhv43-01.cfme2.lab.eng.rdu2.redhat.com", 
  "resource_type": "ManageIQ::Providers::Redhat::InfraManager::Host",
  "resource_id": "1",
  "conversion_host_ssh_private_key": "Bag Attributes\n   ..\n",
  "vmware_vddk_package_url": "http://file.rdu.redhat.com/~ytale/VMware-vix-disklib-6.5.2-6195444.x86_64.tar.gz",
  "auth_user": "root" }


Getting {
"error":{
"kind": "bad_request",
"message": "unsupported resource_type ManageIQ::Providers::Redhat::InfraManager::Host",
"klass": "Api::BadRequestError"
}
}

Comment 8 errata-xmlrpc 2019-12-12 13:36:46 UTC
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/RHBA-2019:4199