Bug 1780034 - [v2v] Conversion host enable api request name field seem to have no affect
Summary: [v2v] Conversion host enable api request name field seem to have no affect
Keywords:
Status: CLOSED DUPLICATE of bug 1810135
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: V2V
Version: 5.11.1
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: GA
: 5.12.0
Assignee: Fabien Dupont
QA Contact: Sudhir Mallamprabhakara
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-12-05 09:41 UTC by Ilanit Stein
Modified: 2020-03-05 16:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-05 16:51:46 UTC
Category: Bug
Cloudforms Team: V2V
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Ilanit Stein 2019-12-05 09:41:15 UTC
Description of problem:
I ran the bellow rest api command to enable a RHV RHEL-7.6 VM, 
as a conversion host.
In the request's body, I mistakenly put a wrong VM ID, of another existing running VM, in the "resource_id" field.

The result:
The VM was picked by the ID.
This result show that the "name" field is ignored.

What is wrong in this result?:
Depend on the "name" field purpose:
- If the purpose is set the name, that should be looked for, to find the VM, 
then such request should fail on resource_id and the name not matching.
- If the purpose is to name the in CFME UI, the conversion host, then this is not done either. the name given in CFME UI to a conversion host is by it's name in the provider.    

Enable Conversion host api request:
==================================
URL: https://<cfme-fqdn>/api/conversion_hosts

Method: POST
Body:

{
    "action": "create",
    "resource": {
        "name": "v2v_migration_vm_0",
        "auth_user": "root",
        "conversion_host_ssh_private_key": "-----BEGIN PRIVATE KEY-----...-----END PRIVATE KEY-----",
        "max_concurrent_tasks": 10,
        "resource_id": "39",    <=== Wrong VM ID
        "resource_type": "ManageIQ::Providers::Redhat::InfraManager::Vm",
        "vmware_vddk_package_url": "http://...VMware-vix-disklib-stable.tar.gz"
    }
}

Version-Release number of selected component (if applicable):
CFME-5.11.1.1
RHV-4.3.7

Comment 2 Fabien Dupont 2019-12-05 13:52:30 UTC
After connecting to your appliance, I see what the problem is.
The virtual machine you configured doesn't have an IP address in CloudForms inventory, so the playbook is run against an empty inventory and it doesn't do anything.
We can add a validation on the fact that the conversion host VM has an IP address.

In the context of UCI, we won't care about installing packages, as they will be part of the image.

I mark it as priority low, because we don't really expect VM deployed to become conversion hosts to not have an IP address.

Comment 3 Fabien Dupont 2020-03-05 16:51:46 UTC

*** This bug has been marked as a duplicate of bug 1810135 ***


Note You need to log in before you can comment on or make changes to this bug.