[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] [PATCH 5 of 5] CA-33440: Remove code which saved the pid of calls to storage backends since these pids could not be safely used



# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1261410032 0
# Node ID d1df586f2ca41591d331cecf58a13dfacd609226
# Parent  5804d83078d753643135d39a82da533a91909132
CA-33440: Remove code which saved the pid of calls to storage backends since 
these pids could not be safely used.

We never agreed that the storage fork/exec interface supported fully 
asynchronous kill(). This removes some temptation.

Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>

diff -r 5804d83078d7 -r d1df586f2ca4 ocaml/xapi/sm_exec.ml
--- a/ocaml/xapi/sm_exec.ml     Mon Dec 21 15:40:31 2009 +0000
+++ b/ocaml/xapi/sm_exec.ml     Mon Dec 21 15:40:32 2009 +0000
@@ -128,9 +128,9 @@
 
(****************************************************************************************)
 (* Functions that actually execute the python backends *)
 
-let spawn_internal ?(cb_set=(fun _ -> ())) ?(cb_clear=(fun () -> ())) cmdarg =
+let spawn_internal cmdarg =
   try
-    Forkhelpers.execute_command_get_output ~cb_set ~cb_clear cmdarg.(0) 
(List.tl (Array.to_list cmdarg))
+    Forkhelpers.execute_command_get_output cmdarg.(0) (List.tl (Array.to_list 
cmdarg))
   with 
   | Forkhelpers.Spawn_internal_error(log, output, Unix.WSTOPPED i) ->
       raise (Api_errors.Server_error (Api_errors.sr_backend_failure, ["task 
stopped"; output; log ]))
@@ -174,9 +174,7 @@
                | None           -> 
                    spawn_internal args
                | Some __context ->
-                   let cb_set pid = TaskHelper.set_external_pid ~__context pid
-                   and cb_clear () = TaskHelper.clear_external_pid ~__context 
in
-                   spawn_internal ~cb_set ~cb_clear args
+                   spawn_internal args
            in
            debug "SM stdout: '%s'; stderr: '%s'" output stderr;
            ((Xml.parse_string output),stderr))
1 file changed, 3 insertions(+), 5 deletions(-)
ocaml/xapi/sm_exec.ml |    8 +++-----


Attachment: xen-api.hg-5.patch
Description: Text Data

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.