Skip to content
Browse files

Merge pull request #2649 from thomassa/pool-join-ssl-legacy-match-master

CA-208614: On pool-join, copy ssl_legacy from master.
  • Loading branch information...
2 parents 683ae78 + 1139b99 commit e5123c134efb8759670ecbf0d8c8694d7e63e6a0 @robhoes robhoes committed Apr 28, 2016
Showing with 7 additions and 1 deletion.
  1. +7 −1 ocaml/xapi/xapi_pool.ml
View
8 ocaml/xapi/xapi_pool.ml
@@ -367,6 +367,12 @@ let rec create_or_get_host_on_master __context rpc session_id (host_ref, host) :
create_or_get_sr_on_master __context rpc session_id (my_local_cache_sr, my_local_cache_sr_rec)
end in
+ (* Look up the value on the master of the pool we are about to join *)
+ let master_ssl = Client.Host.get_ssl_legacy ~rpc ~session_id ~self:(get_master rpc session_id) in
+ (* Set value in inventory (to control initial behaviour on next xapi start)
+ * but not in the database of the current pool (the one we're about to leave) *)
+ Xapi_inventory.update Xapi_inventory._stunnel_legacy (string_of_bool master_ssl);
+
debug "Creating host object on master";
let ref = Client.Host.create ~rpc ~session_id
~uuid:my_uuid
@@ -386,7 +392,7 @@ let rec create_or_get_host_on_master __context rpc session_id (host_ref, host) :
* been added to the constructor. *)
~local_cache_sr
~chipset_info:host.API.host_chipset_info
- ~ssl_legacy:host.API.host_ssl_legacy
+ ~ssl_legacy:master_ssl
in
(* Copy other-config into newly created host record: *)

0 comments on commit e5123c1

Please sign in to comment.
Something went wrong with that request. Please try again.