|
|
|
|
|
|
|
|
|
|
xen-api
[Xen-API] [PATCH 04 of 11] CA-35165: Silence failure when no Pool record
# HG changeset patch
# User David Scott <dave.scott@xxxxxxxxxxxxx>
# Date 1259595423 0
# Node ID 968a9c3b6d3cabb434a4d6252c1caabe0edb78e8
# Parent b9e5b4439b52ca8dabd7214397fc484441767b4e
CA-35165: Silence failure when no Pool record exists i.e. during initial xapi
startup.
Signed-off-by: David Scott <dave.scott@xxxxxxxxxxxxx>
diff -r b9e5b4439b52 -r 968a9c3b6d3c ocaml/xapi/xapi_event.ml
--- a/ocaml/xapi/xapi_event.ml Mon Nov 30 15:37:02 2009 +0000
+++ b/ocaml/xapi/xapi_event.ml Mon Nov 30 15:37:03 2009 +0000
@@ -280,12 +280,15 @@
try
Db_lock.with_lock
(fun () ->
- (* We must hold the database lock since we are sending an update for a
real object
- and we don't want to accidentally transmit an older snapshot. *)
- let pool = Helpers.get_pool ~__context in
- let pool_r = Db.Pool.get_record ~__context ~self:pool in
- let pool_xml = API.To.pool_t pool_r in
- event_add ~snapshot:pool_xml "pool" "mod" (Ref.string_of pool)
+ (* We must hold the database lock since we are sending an
update for a real object
+ and we don't want to accidentally transmit an older
snapshot. *)
+ let pool = try Some (Helpers.get_pool ~__context) with _ ->
None in
+ match pool with
+ | Some pool ->
+ let pool_r = Db.Pool.get_record ~__context
~self:pool in
+ let pool_xml = API.To.pool_t pool_r in
+ event_add ~snapshot:pool_xml "pool" "mod"
(Ref.string_of pool)
+ | None -> () (* no pool object created during initial boot *)
)
with e ->
error "Caught exception sending event heartbeat: %s"
(ExnHelper.string_of_exn e)
1 file changed, 9 insertions(+), 6 deletions(-)
ocaml/xapi/xapi_event.ml | 15 +++++++++------
xen-api.hg-11.patch
Description: Text Data
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-API] [PATCH 00 of 11] Reduce xapi logspam (a bit), David Scott
- [Xen-API] [PATCH 02 of 11] CA-35165: Remove misleading log message from sm_exec, David Scott
- [Xen-API] [PATCH 01 of 11] CA-35165: Clean up xapi startup log messages, particularly those to do with the 'localdb', David Scott
- [Xen-API] [PATCH 05 of 11] CA-35165: Remove a spurious excxeption when refreshing VM_guest_metrics when the VM_guest_metrics doesn't exist (ie for dom0), David Scott
- [Xen-API] [PATCH 03 of 11] CA-35165: Trim a xapi startup message, David Scott
- [Xen-API] [PATCH 07 of 11] CA-35165: Remove some pointless and frequent logging, David Scott
- [Xen-API] [PATCH 08 of 11] CA-35165: Remove some more verbose, pointless and frequent logging, David Scott
- [Xen-API] [PATCH 06 of 11] CA-35165: Mute the error when looking for SM backends in directories which don't exist, David Scott
- [Xen-API] [PATCH 09 of 11] CA-35165: Avoid generating scary-looking exceptions in the startup code: avoid attempting to resynchronise the state of VBDs or VIFs if they are missing (or empty); also silence the setting of the unco-operative flags, David Scott
- [Xen-API] [PATCH 04 of 11] CA-35165: Silence failure when no Pool record exists i.e. during initial xapi startup,
David Scott <=
- [Xen-API] [PATCH 11 of 11] CA-35165: Reduce the amount of log spam created by the xenstore watching code, David Scott
- [Xen-API] [PATCH 10 of 11] CA-35165: Remove spammy 'check_rbac=%b' debug print, David Scott
|
|
|
|
|