File tree 6 files changed +12
-6
lines changed
6 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ open Datamodel_roles
10
10
to leave a gap for potential hotfixes needing to increment the schema version.*)
11
11
let schema_major_vsn = 5
12
12
13
- let schema_minor_vsn = 785
13
+ let schema_minor_vsn = 786
14
14
15
15
(* Historical schema versions just in case this is useful later *)
16
16
let rio_schema_major_vsn = 5
Original file line number Diff line number Diff line change @@ -2006,6 +2006,11 @@ let t =
2006
2006
, " 22.16.0"
2007
2007
, " Became StaticRO to be editable through new method"
2008
2008
)
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
+ )
2009
2014
]
2010
2015
~default_value: (Some (VString " " )) " uefi_certificates"
2011
2016
" The UEFI certificates allowing Secure Boot"
Original file line number Diff line number Diff line change @@ -613,8 +613,8 @@ module Version = struct
613
613
try Scanf. sscanf name " %d.%d.%d%s" of_chunks
614
614
with _ ->
615
615
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__
618
618
)
619
619
620
620
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
3
3
(* BEWARE: if this changes, check that schema has been bumped accordingly in
4
4
ocaml/idl/datamodel_common.ml, usually schema_minor_vsn *)
5
5
6
- let last_known_schema_hash = " 458f20f5270a5615c7ee92be8a383172 "
6
+ let last_known_schema_hash = " 04cff725020babbe2c6962885595a975 "
7
7
8
8
let current_schema_hash : string =
9
9
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 =
2141
2141
in
2142
2142
match (! Xapi_globs. allow_custom_uefi_certs, custom_uefi_certs) with
2143
2143
| 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
2145
2146
| true , _ ->
2146
2147
custom_uefi_certs
2147
2148
Original file line number Diff line number Diff line change @@ -2778,7 +2778,7 @@ let write_uefi_certificates_to_disk ~__context ~host =
2778
2778
if Pool_role. is_master () then
2779
2779
Db.Pool. set_uefi_certificates ~__context
2780
2780
~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) ;
2782
2782
let pool_uefi_certs =
2783
2783
Db.Pool. get_custom_uefi_certificates ~__context
2784
2784
~self: (Helpers. get_pool ~__context)
You can’t perform that action at this time.
0 commit comments