[Pkg-libvirt-commits] [libguestfs] 11/40: v2v: Clearer error message if ssh-agent authentication is not set up (RHBZ#1139973).

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 3 14:44:42 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag debian/1%1.27.44-1
in repository libguestfs.

commit c49d35a919284f54a8e98a8a17c2543e7973b583
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Wed Sep 10 17:01:10 2014 +0100

    v2v: Clearer error message if ssh-agent authentication is not set up (RHBZ#1139973).
---
 v2v/input_libvirt.ml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/v2v/input_libvirt.ml b/v2v/input_libvirt.ml
index b7f8376..9e8b510 100644
--- a/v2v/input_libvirt.ml
+++ b/v2v/input_libvirt.ml
@@ -33,6 +33,15 @@ let error_if_libvirt_backend () =
     error (f_"because of libvirt bug https://bugzilla.redhat.com/show_bug.cgi?id=1134592 you must set this environment variable:\n\nexport LIBGUESTFS_BACKEND=direct\n\nand then rerun the virt-v2v command.")
   )
 
+(* xen+ssh URLs use the SSH driver in CURL.  Currently this requires
+ * ssh-agent authentication.  Give a clear error if this hasn't been
+ * set up (RHBZ#1139973).
+ *)
+let error_if_no_ssh_agent () =
+  try ignore (Sys.getenv "SSH_AUTH_SOCK")
+  with Not_found ->
+    error (f_"ssh-agent authentication has not been set up ($SSH_AUTH_SOCK is not set).  Please read \"INPUT FROM RHEL 5 XEN\" in the virt-v2v(1) man page.")
+
 class input_libvirt verbose libvirt_uri guest =
 object
   inherit input verbose
@@ -82,6 +91,7 @@ object
 
         | Some server, Some ("xen+ssh" as scheme) -> (* Xen over SSH *)
           error_if_libvirt_backend ();
+          error_if_no_ssh_agent ();
           let f = Lib_xen.map_path_to_uri verbose uri scheme server in
           Some f, Some f
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list