Signed-off-by: Jon Ludlam <[email protected]>

 ocaml/xapi/xapi_pool.ml |  7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)


# HG changeset patch
# User Jonathan Ludlam <[email protected]>
# Date 1268745996 0
# Node ID 0cdb3a7e5b1d137056fa038ed2408f7d9c376b1e
# Parent  1f355c3b5970c8df1c5b74b0b0996cdffa4fbe7a
CA-27944: On pool eject, remove all locally stored blobs (rrds,messages)

Signed-off-by: Jon Ludlam <[email protected]>

diff -r 1f355c3b5970 -r 0cdb3a7e5b1d ocaml/xapi/xapi_pool.ml
--- a/ocaml/xapi/xapi_pool.ml	Tue Mar 16 12:19:33 2010 +0000
+++ b/ocaml/xapi/xapi_pool.ml	Tue Mar 16 13:26:36 2010 +0000
@@ -649,6 +649,13 @@
 		(* delete backup databases and any temporary restore databases *)
 		Unixext.unlink_safe Xapi_globs.backup_db_xml;
 		Unixext.unlink_safe Xapi_globs.db_temporary_restore_path;
+
+		(* If we've got local storage, remove it *)
+		if (Helpers.local_storage_exists ()) then begin
+		  ignore(Forkhelpers.execute_command_get_output "/bin/rm" ["-rf"; Xapi_globs.xapi_blob_location]);
+		  Unixext.mkdir_safe Xapi_globs.xapi_blob_location 0o700;
+		end;
+
 		(* delete /local/ databases specified in the db.conf, so they get recreated on restart.
 		 * We must leave any remote database alone because these are owned by the pool and
 		 * not by this node. *)
_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to