Skip to content

Commit 3aa0929

Browse files
authored
Don't block switching to a different edition when HA is enabled (#6880)
It assumes that the switching will not cause any differences on the availability of features required by HA.
2 parents 1a091a9 + b6e2a9c commit 3aa0929

1 file changed

Lines changed: 7 additions & 15 deletions

File tree

ocaml/xapi/xapi_host.ml

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2149,21 +2149,13 @@ let apply_edition_internal ~__context ~host ~edition ~additional =
21492149
~additional:new_ed.additional_params
21502150

21512151
let apply_edition ~__context ~host ~edition ~force =
2152-
(* if HA is enabled do not allow the edition to be changed *)
2153-
let pool = Helpers.get_pool ~__context in
2154-
if
2155-
Db.Pool.get_ha_enabled ~__context ~self:pool
2156-
&& edition <> Db.Host.get_edition ~__context ~self:host
2157-
then
2158-
raise (Api_errors.Server_error (Api_errors.ha_is_enabled, []))
2159-
else
2160-
let additional =
2161-
if force then
2162-
[("force", "true")]
2163-
else
2164-
[]
2165-
in
2166-
apply_edition_internal ~__context ~host ~edition ~additional
2152+
let additional =
2153+
if force then
2154+
[("force", "true")]
2155+
else
2156+
[]
2157+
in
2158+
apply_edition_internal ~__context ~host ~edition ~additional
21672159

21682160
let license_add ~__context ~host ~contents =
21692161
let license =

0 commit comments

Comments
 (0)