@@ -199,6 +199,7 @@ let iter_with_drop ?(doc = "performing unknown operation") f xs =
199199let log_exn ?(doc = " performing unknown operation" ) f x =
200200 try f x
201201 with e ->
202+ Backtrace. is_important e ;
202203 debug " Caught exception while %s in message forwarder: %s" doc
203204 (ExnHelper. string_of_exn e) ;
204205 raise e
@@ -323,9 +324,10 @@ functor
323324 let tolerate_connection_loss fn success timeout =
324325 try fn ()
325326 with
326- | Api_errors. Server_error (ercode, params)
327+ | Api_errors. Server_error (ercode, _) as e
327328 when ercode = Api_errors. cannot_contact_host
328329 ->
330+ Backtrace. is_important e ;
329331 debug
330332 " Lost connection with slave during call (expected). Waiting for \
331333 slave to come up again." ;
@@ -337,8 +339,7 @@ functor
337339 let rec poll i =
338340 match i with
339341 | 0 ->
340- raise (Api_errors. Server_error (ercode, params))
341- (* give up and re-raise exn *)
342+ raise e (* give up and re-raise exn *)
342343 | i -> (
343344 match success () with
344345 | Some result ->
@@ -1367,6 +1368,7 @@ functor
13671368 vbds ;
13681369 vbds
13691370 with e ->
1371+ Backtrace. is_important e ;
13701372 debug " Caught exception marking VBD for %s on VM %s: %s" doc
13711373 (Ref. string_of vm)
13721374 (ExnHelper. string_of_exn e) ;
@@ -1548,6 +1550,7 @@ functor
15481550 (Helpers. will_have_qemu ~__context ~self: vm) ;
15491551 Xapi_network_sriov_helpers. reserve_sriov_vfs ~__context ~host ~vm
15501552 with e ->
1553+ Backtrace. is_important e ;
15511554 clear_vif_reservations ~__context ~vm ;
15521555 clear_reservations ~__context ~vm ;
15531556 raise e
@@ -1692,6 +1695,7 @@ functor
16921695 ) ;
16931696 try f ()
16941697 with exn ->
1698+ Backtrace. is_important exn ;
16951699 if ! restore_old_values_on_error then (
16961700 Db.VM. set_memory_dynamic_min ~__context ~self: vm
16971701 ~value: old_dynamic_min ;
@@ -5271,6 +5275,7 @@ functor
52715275 (fun (vdi , op ) -> mark_vdi ~__context ~vdi ~doc ~op )
52725276 vdi
52735277 with e ->
5278+ Backtrace. is_important e ;
52745279 Option. iter
52755280 (fun (sr , op ) -> SR. unmark_sr ~__context ~sr ~doc ~op )
52765281 sr ;
@@ -6620,6 +6625,7 @@ functor
66206625 -> (
66216626 match rest with
66226627 | [] ->
6628+ Backtrace. is_important e ;
66236629 debug
66246630 " Ran out of hosts to try (and no cluster host on \
66256631 ourselves), reporting error" ;
0 commit comments