Skip to content

Commit

Permalink
Fix logging of CPU pool-level changes
Browse files Browse the repository at this point in the history
This check should be done based on the `features_hvm_host` field now, as
the `features_hvm` field is no longer part of the pool-level cpu_info.

Signed-off-by: Rob Hoes <rob.hoes@citrix.com>
  • Loading branch information
robhoes committed Jul 25, 2023
1 parent 78588d3 commit dd449e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ocaml/xapi/create_misc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -737,15 +737,15 @@ let create_pool_cpuinfo ~__context =
Db.Pool.set_cpu_info ~__context ~self:pool ~value:pool_cpuinfo ;

let before =
getf ~default:(CPU_policy.of_string `host "") features_hvm old_cpuinfo
getf ~default:(CPU_policy.of_string `host "") features_hvm_host old_cpuinfo
in
let after =
getf ~default:(CPU_policy.of_string `host "") features_hvm pool_cpuinfo
getf ~default:(CPU_policy.of_string `host "") features_hvm_host pool_cpuinfo
in
if before <> after && before <> CPU_policy.of_string `host "" then
info
"The pool-level CPU features have changed. Old features_hvm=%s. New \
features_hvm=%s."
"The pool-level CPU features have changed. Old features_hvm_host=%s. New \
features_hvm_host=%s."
(CPU_policy.to_string before)
(CPU_policy.to_string after)

Expand Down

0 comments on commit dd449e0

Please sign in to comment.