Bug 1710448 - Extra variables are not passed properly to ansible when configuring conversion host
Summary: Extra variables are not passed properly to ansible when configuring conversio...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: V2V
Version: 5.10.4
Hardware: Unspecified
OS: Unspecified
urgent
high
Target Milestone: GA
: 5.11.0
Assignee: Fabien Dupont
QA Contact: Yadnyawalk Tale
Red Hat CloudForms Documentation
URL:
Whiteboard: v2v
Depends On:
Blocks: 1707983 1711035
TreeView+ depends on / blocked
 
Reported: 2019-05-15 14:33 UTC by Tomáš Golembiovský
Modified: 2019-12-13 15:09 UTC (History)
5 users (show)

Fixed In Version: 5.11.0.5
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1711035 (view as bug list)
Environment:
Last Closed: 2019-12-13 15:09:19 UTC
Category: Bug
Cloudforms Team: V2V
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tomáš Golembiovský 2019-05-15 14:33:27 UTC
The variables are passed to ansible by adding: --extra-vars 'key=value' to the command. This does not work for values that contain spaces. The correct form has to include a new set of quotes:

    --extra-vars 'key="my long value"'

This way of passing variables is fragile because the value will have to be properly escaped. Better way is to use a file with:

    --extra-vars @my-vars-file.json

JSON and YAML format is accepted.


https://github.com/ManageIQ/manageiq/blob/ea45831ca71f9053a6dbe9c39762d8795e1fc686/app/models/conversion_host.rb#L335

Comment 3 Fabien Dupont 2019-05-16 10:02:49 UTC
[V2V] Conversion Host - Use JSON format for extra vars - https://github.com/ManageIQ/manageiq/pull/18772

Comment 5 Yadnyawalk Tale 2019-06-14 12:36:23 UTC
Fixed! After configuring conversion with SSH I can see id_rsa is correctly getting copied on conversion host's /var/lib/vdsm/.ssh.
Verified on: 5.11.0.8.20190611155126_01e077e

Please note 5.11.0.8 don't have v2v-conversion-ansible package and hence migration not working with that but I have installed package manually and migration is working.
We are tracking that issue under BZ1720614.


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