From f6efd3759d90489fbf93b0044203efc811bc2091 Mon Sep 17 00:00:00 2001 From: Christian Lindig Date: Tue, 6 Nov 2018 13:39:25 +0000 Subject: [PATCH] CA-302194 XSI-87 apply guest agent config on start The /guest_agent_features tree in xenstore disappears during reboot. To make sure it is re-created, we call apply_guest_agent_config() during xapi startup. Signed-off-by: Christian Lindig --- ocaml/xapi/xapi_xenops.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ocaml/xapi/xapi_xenops.ml b/ocaml/xapi/xapi_xenops.ml index af3c24a7095..d47379aa4cf 100644 --- a/ocaml/xapi/xapi_xenops.ml +++ b/ocaml/xapi/xapi_xenops.ml @@ -2323,7 +2323,11 @@ let on_xapi_restart ~__context = () ) (all_known_xenopsds ()); - resync_all_vms ~__context + resync_all_vms ~__context; + info "applying guest agent configuration during restart"; + let pool = Helpers.get_pool ~__context in + let config = Db.Pool.get_guest_agent_config ~__context ~self:pool in + apply_guest_agent_config ~__context config let assert_resident_on ~__context ~self = let localhost = Helpers.get_localhost ~__context in