WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

[Xen-API] [PATCH 5 of 5] CA-33440: Remove code which saved the pid of ca

To: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: [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
From: David Scott <dave.scott@xxxxxxxxxxxxx>
Date: Mon, 21 Dec 2009 18:03:42 +0000
Delivery-date: Mon, 21 Dec 2009 10:00:20 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1261418617@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
# 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