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 13, 2024
1 parent e2aa82e commit c710e8f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ocaml/xapi/repository.ml
Original file line number Diff line number Diff line change
Expand Up @@ -155,21 +155,27 @@ 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, use_proxy, client_auth, server_auth =
let ( binary_url
, source_url
, repo_gpgcheck
, 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, false, NoAuth, NoAuth)
(Uri.to_string uri, None, true, 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 @@ -209,6 +215,7 @@ 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 @@ -223,7 +230,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:true ~gpgkey_path
write_yum_config ~source_url ~binary_url ~repo_gpgcheck ~gpgkey_path
~repo_name
in
Xapi_stdext_pervasives.Pervasiveext.finally
Expand Down

0 comments on commit c710e8f

Please sign in to comment.