Skip to content

Commit

Permalink
Revert "CP-52245: Temp disable repo_gpgcheck when syncing from remote…
Browse files Browse the repository at this point in the history
…_pool repo"

This reverts commit c710e8f.

Signed-off-by: Gang Ji <[email protected]>
  • Loading branch information
gangj committed Dec 26, 2024
1 parent 69ee2ab commit 325e243
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions ocaml/xapi/repository.ml
Original file line number Diff line number Diff line change
Expand Up @@ -155,27 +155,21 @@ let sync ~__context ~self ~token ~token_id ~username ~password =
remove_repo_conf_file repo_name ;
let origin = Db.Repository.get_origin ~__context ~self in

let ( binary_url
, source_url
, repo_gpgcheck
, use_proxy
, client_auth
, server_auth ) =
let binary_url, source_url, use_proxy, client_auth, server_auth =
match origin with
| `remote ->
let plugin = "accesstoken" in
( Db.Repository.get_binary_url ~__context ~self
, Some (Db.Repository.get_source_url ~__context ~self)
, true
, true
, CdnTokenAuth {token_id; token; plugin}
, DefaultAuth
)
| `bundle ->
let uri =
Uri.make ~scheme:"file" ~path:!Xapi_globs.bundle_repository_dir ()
in
(Uri.to_string uri, None, true, false, NoAuth, NoAuth)
(Uri.to_string uri, None, false, NoAuth, NoAuth)
| `remote_pool ->
let cert = Db.Repository.get_certificate ~__context ~self in
let repo_binary_url = Db.Repository.get_binary_url ~__context ~self in
Expand Down Expand Up @@ -215,7 +209,6 @@ let sync ~__context ~self ~token ~token_id ~username ~password =
let plugin = "xapitoken" in
( repo_binary_url
, None
, false
, true
, PoolExtHostAuth {xapi_token; plugin}
, StunnelClientProxyAuth
Expand All @@ -230,7 +223,7 @@ let sync ~__context ~self ~token ~token_id ~username ~password =
s
in
let write_initial_yum_config ~binary_url =
write_yum_config ~source_url ~binary_url ~repo_gpgcheck ~gpgkey_path
write_yum_config ~source_url ~binary_url ~repo_gpgcheck:true ~gpgkey_path
~repo_name
in
Xapi_stdext_pervasives.Pervasiveext.finally
Expand Down

0 comments on commit 325e243

Please sign in to comment.