Bug 736590

Summary: Improve error message when migration fails due to stopped libvirtd on the target
Product: Red Hat Enterprise Linux 7 Reporter: xhu
Component: libvirtAssignee: Peter Krempa <pkrempa>
Status: ASSIGNED --- QA Contact: Fangge Jin <fjin>
Severity: low Docs Contact:
Priority: low    
Version: 7.0CC: berrange, cwei, dyuan, mzhan, rbalakri, weizhan, xuzhang
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description xhu 2011-09-08 03:52:41 EDT
Description of problem:
Error is not clear when migrate but libvirtd is not started on target host

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

How reproducible:

Steps to Reproduce:
On target host:
1. stop libvirtd
# service libvirtd status
libvirtd is stopped

On source host:
1. start a guest with shared nfs image
2. migrate from source to target host:
# virsh migrate vr-rhel6-x86_64-kvm --live qemu+ssh://
Actual results:
# virsh migrate vr-rhel6-x86_64-kvm --live qemu+ssh://
root@'s password: 
error: End of file while reading data: : Input/output error

Expected results:
I think the following error prompt is more clear:
# virsh migrate vr-rhel6-x86_64-kvm --live qemu+ssh://
error: End of file while reading data: : Input/output error
error: failed to connect to the hypervisor

Additional info:
Comment 1 Daniel Berrange 2011-09-12 12:11:22 EDT
This is nothing specific to migration, you'll get the same error message just with

$ virsh -c qemu+ssh://root@localhost/system 
root@localhost's password: 
error: End of file while reading data: : Input/output error
error: failed to connect to the hypervisor

It is not entirely trivial to improve on this due to the way remote SSH tunnelling works.
Comment 2 Jiri Denemark 2011-11-25 10:34:15 EST
This should become better once we have a libssh2 transport (covered by bug 513363). Although nc is unhelpful and doesn't provide any error message when it can't connect to a unix socket. Fortunately, it sets it's return code to 1 in that case. Using libssh2 we can see this return code (and can distinguish it from ssh connection failure, which we can't when exec'ing ssh) and provide a better error message.
Comment 8 Peter Krempa 2013-01-29 10:47:37 EST
There's a possibility that this could be fixed even without the libssh2 driver support. Leaving it open for investigation.
Comment 12 Jiri Denemark 2014-04-04 17:36:37 EDT
This bug was not selected to be addressed in Red Hat Enterprise Linux 6. We will look at it again within the Red Hat Enterprise Linux 7 product.