Bug 1710448

Summary: Extra variables are not passed properly to ansible when configuring conversion host
Product: Red Hat CloudForms Management Engine Reporter: Tomáš Golembiovský <tgolembi>
Component: V2VAssignee: Fabien Dupont <fdupont>
Status: CLOSED CURRENTRELEASE QA Contact: Yadnyawalk Tale <ytale>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: urgent    
Version: 5.10.4CC: bthurber, dberger, simaishi, sshveta, ytale
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: v2v
Fixed In Version: 5.11.0.5 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1711035 (view as bug list) Environment:
Last Closed: 2019-12-13 15:09:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: V2V Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1707983, 1711035    

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.