File tree Expand file tree Collapse file tree 6 files changed +12
-6
lines changed Expand file tree Collapse file tree 6 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ open Datamodel_roles
1010 to leave a gap for potential hotfixes needing to increment the schema version.*)
1111let schema_major_vsn = 5
1212
13- let schema_minor_vsn = 785
13+ let schema_minor_vsn = 786
1414
1515(* Historical schema versions just in case this is useful later *)
1616let rio_schema_major_vsn = 5
Original file line number Diff line number Diff line change @@ -2006,6 +2006,11 @@ let t =
20062006 , " 22.16.0"
20072007 , " Became StaticRO to be editable through new method"
20082008 )
2009+ ; ( Changed
2010+ , " 25.10.0"
2011+ , " Field replaced with a digest. You can still get the actual \
2012+ value by calling Host.get_uefi_certificates"
2013+ )
20092014 ]
20102015 ~default_value: (Some (VString " " )) " uefi_certificates"
20112016 " The UEFI certificates allowing Secure Boot"
Original file line number Diff line number Diff line change @@ -613,8 +613,8 @@ module Version = struct
613613 try Scanf. sscanf name " %d.%d.%d%s" of_chunks
614614 with _ ->
615615 failwith
616- (Printf. sprintf " Version schema changed, please change this code %s"
617- __LOC__
616+ (Printf. sprintf " Version schema changed, please change this code %s: %s "
617+ name __LOC__
618618 )
619619
620620 let to_name_date (lst , str ) =
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ let hash x = Digest.string x |> Digest.to_hex
33(* BEWARE: if this changes, check that schema has been bumped accordingly in
44 ocaml/idl/datamodel_common.ml, usually schema_minor_vsn *)
55
6- let last_known_schema_hash = " 458f20f5270a5615c7ee92be8a383172 "
6+ let last_known_schema_hash = " 04cff725020babbe2c6962885595a975 "
77
88let current_schema_hash : string =
99 let open Datamodel_types in
Original file line number Diff line number Diff line change @@ -2141,7 +2141,8 @@ let get_active_uefi_certificates ~__context ~self =
21412141 in
21422142 match (! Xapi_globs. allow_custom_uefi_certs, custom_uefi_certs) with
21432143 | false , _ | true , "" ->
2144- Db.Pool. get_uefi_certificates ~__context ~self
2144+ let master = Db.Pool. get_master ~__context ~self in
2145+ Db.Host. get_uefi_certificates ~__context ~self: master
21452146 | true , _ ->
21462147 custom_uefi_certs
21472148
Original file line number Diff line number Diff line change @@ -2778,7 +2778,7 @@ let write_uefi_certificates_to_disk ~__context ~host =
27782778 if Pool_role. is_master () then
27792779 Db.Pool. set_uefi_certificates ~__context
27802780 ~self: (Helpers. get_pool ~__context)
2781- ~value: disk_uefi_certs_tar ;
2781+ ~value: ( if disk_uefi_certs_tar = " " then " " else Digest. string disk_uefi_certs_tar |> Digest. to_hex) ;
27822782 let pool_uefi_certs =
27832783 Db.Pool. get_custom_uefi_certificates ~__context
27842784 ~self: (Helpers. get_pool ~__context)
You can’t perform that action at this time.
0 commit comments