[PATCH for-4.17 v3 12/15] tools/ocaml/xenstored: log live update issues at warning level

Edwin Török posted 15 patches 3 years, 3 months ago
[PATCH for-4.17 v3 12/15] tools/ocaml/xenstored: log live update issues at warning level
Posted by Edwin Török 3 years, 3 months ago
During live update oxenstored tries a best effort approach to recover as
many domains and information as possible even if it encounters errors
restoring some domains.
This defensive approach has already proven useful to recover domains
after a bug in oxenstored.

However the default log level is warning, which means that problems during live
update were not logged at all, unless you've changes oxenstored.conf
prior to live-update.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
---
Reason for inclusion in 4.17:
- makes live update issues debuggable (live update can be used to apply
  security updates to 4.17)

Changes since v2:
- new in v3
---
 tools/ocaml/xenstored/xenstored.ml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/ocaml/xenstored/xenstored.ml b/tools/ocaml/xenstored/xenstored.ml
index d4ff24b440..78177b116f 100644
--- a/tools/ocaml/xenstored/xenstored.ml
+++ b/tools/ocaml/xenstored/xenstored.ml
@@ -184,9 +184,9 @@ module DB = struct
               (Perms.Node.of_string (unhexify perms ^ "\000"))
               (unhexify value)
           | _ ->
-            info "restoring: ignoring unknown line: %s" line
+            warn "restoring: ignoring unknown line: %s" line
         with exn ->
-          info "restoring: ignoring unknown line: %s (exception: %s)"
+          warn "restoring: ignoring unknown line: %s (exception: %s)"
             line (Printexc.to_string exn);
           ()
       with End_of_file ->
-- 
2.34.1


Re: [PATCH for-4.17 v3 12/15] tools/ocaml/xenstored: log live update issues at warning level
Posted by Christian Lindig 3 years, 3 months ago

On 8 Nov 2022, at 15:34, Edwin Török <edvin.torok@citrix.com<mailto:edvin.torok@citrix.com>> wrote:

However the default log level is warning, which means that problems during live
update were not logged at all, unless you've changes oxenstored.conf
prior to live-update.

Signed-off-by: Edwin Török <edvin.torok@citrix.com<mailto:edvin.torok@citrix.com>>
---
Reason for inclusion in 4.17:
- makes live update issues debuggable (live update can be used to apply
 security updates to 4.17)

Changes since v2:
- new in v3
---
tools/ocaml/xenstored/xenstored.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Christian Lindig <christian.lindig@citrix.com<mailto:christian.lindig@citrix.com>>