[Pkg-libvirt-commits] [libguestfs] 44/66: v2v: -o rhev/vdsm: Remove the test that the storage domain is writable.

Hilko Bengen bengen at moszumanska.debian.org
Fri Oct 3 14:47:45 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.54-1
in repository libguestfs.

commit ebb5de6a1f94086ccc6f21a78afebecc360dcd9d
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Tue Sep 23 15:26:03 2014 +0100

    v2v: -o rhev/vdsm: Remove the test that the storage domain is writable.
    
    For '-o rhev' this is likely to fail (although for obscure reasons it
    *doesn't* fail on a real RHEV server, I don't quite understand why).
    The reason is because virt-v2v may be running as root, and with root
    squashing we don't have permissions to write into the storage domain
    directory.
    
    For '-o vdsm', VDSM is supposed to make sure we are running as the
    correct user, so there's no reason to doubt things will work.
---
 v2v/output_rhev.ml | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/v2v/output_rhev.ml b/v2v/output_rhev.ml
index bb77787..bc33186 100644
--- a/v2v/output_rhev.ml
+++ b/v2v/output_rhev.ml
@@ -28,9 +28,7 @@ open DOM
 
 let rec mount_and_check_storage_domain verbose domain_class os =
   (* The user can either specify -os nfs:/export, or a local directory
-   * which is assumed to be the already-mounted NFS export.  In either
-   * case we need to check that we have sufficient permissions to write
-   * to this mountpoint.
+   * which is assumed to be the already-mounted NFS export.
    *)
   match string_split ":/" os with
   | mp, "" ->                         (* Already mounted directory. *)
@@ -98,21 +96,6 @@ and check_storage_domain verbose domain_class os mp =
         master_vms_dir domain_class os os
         domain_class domain_class domain_class in
 
-  (* Check that the SD is writable. *)
-  let testfile = mp // uuid // "v2v-write-test" in
-  let write_test_failed err =
-    error (f_"the %s (%s) is not writable.\n\nThis probably means you need to run virt-v2v as root.\n\nOriginal error was: %s")
-      domain_class os err;
-  in
-  (try
-     let chan = open_out testfile in
-     close_out chan;
-     unlink testfile
-   with
-   | Sys_error err -> write_test_failed err
-   | Unix_error (code, _, _) -> write_test_failed (error_message code)
-  );
-
   (* Looks good, so return the SD mountpoint and UUID. *)
   (mp, uuid)
 

-- 
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