Bug 1708802

Summary: [v2v][OSP][SSH]: Migration with SSH on OSP failure
Product: Red Hat CloudForms Management Engine Reporter: Shveta <sshveta>
Component: V2VAssignee: Fabien Dupont <fdupont>
Status: CLOSED CURRENTRELEASE QA Contact: Shveta <sshveta>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: urgent    
Version: 5.10.4CC: bthurber, dmetzger, jprause, simaishi, tgolembi, ytale
Target Milestone: GAKeywords: Reopened
Target Release: 5.10.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-11 12:48:13 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:
Attachments:
Description Flags
Logs none

Description Shveta 2019-05-10 21:57:53 UTC
Created attachment 1566830 [details]
Logs

Description of problem:


Version-Release number of selected component (if applicable):
5.10.4.3.20190509221642_282f74e

How reproducible:


Steps to Reproduce:
1. Added OSP and Vmware. 
2. Configured for SSH
3. Failed with error 

Actual results:


Expected results:


Additional info:
Logs
==========================

ERROR: Failed to add SSH keys to the agent (virt-v2v-wrapper:886)
Traceback (most recent call last):
  File "/usr/bin/virt-v2v-wrapper.py", line 1734, in spawn_ssh_agent
    stdin=DEVNULL)
  File "/usr/lib64/python2.7/subprocess.py", line 575, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['ssh-add']' returned non-zero exit status 1
2019-05-10 17:52:50,297:ERROR: ssh-add output:  (virt-v2v-wrapper:1737)
2019-05-10 17:52:50,298:INFO: have exception: ('An error occured, finishing state file...',) {} (virt-v2v-wrapper:885)
2019-05-10 17:52:50,298:ERROR: An error occured, finishing state file... (virt-v2v-wrapper:886)
Traceback (most recent call last):
  File "/usr/bin/virt-v2v-wrapper.py", line 1980, in main
    raise RuntimeError('Failed to start ssh-agent')
RuntimeError: Failed to start ssh-agent
2019-05-10 17:52:50,299:DEBUG: Cleanup phase (virt-v2v-wrapper:1997)
2019-05-10 17:52:50,300:INFO: Executing command: ['openstack', u'--os-username=admin', u'--os-identity-api-version=3', u'--os-user-domain-name=default', u'--os-auth-url=https://10.8.58.137:13000/v3', u'--os-project-name=admin', u'--os-password=*****', 'volume', 'transfer', 'request', 'list', '--format', 'json'], environment: {} (virt-v2v-wrapper:1769)
2019-05-10 17:52:51,213:ERROR: Command exited with non-zero return code 1, output:
Failed to discover available identity versions when contacting https://10.8.58.137:13000/v3. Attempting to parse version from URL.
SSL exception connecting to https://10.8.58.137:13000/v3/auth/tokens: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:618)

 (virt-v2v-wrapper:410)
2019-05-10 17:52:51,214:ERROR: Failed to remove transfer(s) (virt-v2v-wrapper:183)
2019-05-10 17:52:51,215:ERROR: Wrapper failure (virt-v2v-wrapper:2018)
Traceback (most recent call last):
  File "/usr/bin/virt-v2v-wrapper.py", line 1980, in main
    raise RuntimeError('Failed to start ssh-agent')
RuntimeError: Failed to start ssh-agent
2019-05-10 17:52:51,215:INFO: Removing password files (virt-v2v-wrapper:2020)

Comment 2 Tomáš Golembiovský 2019-05-13 08:08:19 UTC
Could you please list the content of /root/.ssh directory?

Comment 3 Shveta 2019-05-13 17:29:59 UTC
[root@dhcp-8-196-131 ~]# cd /root/.ssh/
[root@dhcp-8-196-131 .ssh]# ll
total 4
-rw-------. 1 root root    0 May 10 08:31 authorized_keys
-rw-r--r--. 1 root root 1658 May 10 17:51 known_hosts


This is from the appliance .

Comment 4 Shveta 2019-05-13 17:30:29 UTC
Appliance : 10.8.196.131

Comment 5 Tomáš Golembiovský 2019-05-13 22:10:36 UTC
I don't see any SSH key there. Was the conversion host properly deployed?

Comment 6 Fabien Dupont 2019-05-14 10:10:46 UTC
The error message isn't related to SSH here:

SSL exception connecting to https://10.8.58.137:13000/v3/auth/tokens: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:618)

It seems to be a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1708359. Do you think we can close this one as duplicate ?

Comment 7 Tomáš Golembiovský 2019-05-14 10:24:09 UTC
(In reply to Fabien Dupont from comment #6)
> The error message isn't related to SSH here:

That's not entirely true. The original error is:

    2019-05-10 17:52:50,296:ERROR: Failed to add SSH keys to the agent (virt-v2v-wrapper:886)

That is because ssh-add fails since there are no keys stored in ~/.ssh. That's why I assume the OSP appliance was not correctly configured.

But I aggree the SSL error is related to bug 1708359.

Comment 8 Fabien Dupont 2019-05-14 10:26:20 UTC
My bad. I started to read from the end and found the SSL error :)
Let's keep it open.

Comment 9 Yadnyawalk Tale 2019-05-17 11:40:22 UTC
Patch from https://bugzilla.redhat.com/show_bug.cgi?id=1707983#c9 should work for the OSP + SSH as well.
Closing this issue in favor of https://bugzilla.redhat.com/show_bug.cgi?id=1707983#c51.

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

Comment 10 Shveta 2019-05-17 17:06:53 UTC
@Ytale Let's keep it open for Separately verifying OSP + SSH .
It's good to track one provider in one BZ so we don't miss.

Comment 14 Shveta 2019-05-28 15:11:12 UTC
Fixed in 5.10.5.0.20190521165820_63c86d5