[Pkg-libvirt-commits] [libguestfs] 14/35: v2v: -o rhev: Chown the image files and metadata after the upload.

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

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

    v2v: -o rhev: Chown the image files and metadata after the upload.
---
 v2v/output_rhev.ml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/v2v/output_rhev.ml b/v2v/output_rhev.ml
index 84157de..d9be514 100644
--- a/v2v/output_rhev.ml
+++ b/v2v/output_rhev.ml
@@ -240,6 +240,16 @@ object
     doc_to_chan chan ovf;
     close_out chan;
 
+    (* Try to chown the images and metadata. *)
+    let cmd = sprintf "chown -R 36.36 %s %s" (quote dir) (quote image_dir) in
+    if verbose then eprintf "%s\n%!" cmd;
+    if Sys.command cmd <> 0 then (
+      (* Note: Don't print the mountpoint in the message below. *)
+      warning ~prog (f_"could not chown newly created RHEV files and directories to 36.36. You may need to do this by hand, otherwise RHEV-M may give errors when trying to import this domain.\n\nThe directories (and all files inside) that have to be owned by 36.36 are:\n%s\n%s")
+        (esd_uuid // "master" // "vms" // vm_uuid)
+        (esd_uuid // "images" // image_uuid)
+    );
+
     (* Finished, so don't delete the target directory on exit. *)
     delete_target_directory <- false
 end

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