Skip to content

Commit

Permalink
CP-52245: Temp disable repo_gpgcheck when syncing from remote_pool repo
Browse files Browse the repository at this point in the history
Will re-enable repo_gpgcheck by reverting this commit after CP-51429 is done.

Signed-off-by: Gang Ji <[email protected]>
  • Loading branch information
gangj committed Dec 12, 2024
1 parent 869f7b3 commit 63c06fe
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions ocaml/xapi/repository.ml
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,24 @@ let sync ~__context ~self ~token ~token_id ~username ~password =
let local_host = "127.0.0.1" in
let local_port = !Xapi_globs.local_yum_repo_port in

let binary_url, source_url, client_auth_config, server_auth_config =
let ( binary_url
, source_url
, repo_gpgcheck
, client_auth_config
, server_auth_config ) =
match origin with
| `remote ->
( Db.Repository.get_binary_url ~__context ~self
, Some (Db.Repository.get_source_url ~__context ~self)
, true
, CdnTokenAuthConf {token; token_id}
, DefaultAuth
)
| `bundle ->
let uri =
Uri.make ~scheme:"file" ~path:!Xapi_globs.bundle_repository_dir ()
in
(Uri.to_string uri, None, NoAuth, NoAuth)
(Uri.to_string uri, None, true, NoAuth, NoAuth)
| `remote_pool ->
let uri =
Uri.make ~scheme:"http" ~host:local_host
Expand All @@ -202,6 +207,7 @@ let sync ~__context ~self ~token ~token_id ~username ~password =
in
( Uri.to_string uri
, None
, false
, PoolExtHostAuthConf {cert; remote_addr; username; password}
, ServerAuthConf
{cert; remote_addr; remote_port= Constants.default_ssl_port}
Expand All @@ -215,7 +221,7 @@ let sync ~__context ~self ~token ~token_id ~username ~password =
s
in
let write_initial_yum_config () =
write_yum_config ~source_url ~binary_url ~repo_gpgcheck:true ~gpgkey_path
write_yum_config ~source_url ~binary_url ~repo_gpgcheck ~gpgkey_path
~repo_name
in
write_initial_yum_config () ;
Expand Down

0 comments on commit 63c06fe

Please sign in to comment.