Skip to content

Commit 325e243

Browse files
committed
Revert "CP-52245: Temp disable repo_gpgcheck when syncing from remote_pool repo"
This reverts commit c710e8f. Signed-off-by: Gang Ji <[email protected]>
1 parent 69ee2ab commit 325e243

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

ocaml/xapi/repository.ml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,27 +155,21 @@ let sync ~__context ~self ~token ~token_id ~username ~password =
155155
remove_repo_conf_file repo_name ;
156156
let origin = Db.Repository.get_origin ~__context ~self in
157157

158-
let ( binary_url
159-
, source_url
160-
, repo_gpgcheck
161-
, use_proxy
162-
, client_auth
163-
, server_auth ) =
158+
let binary_url, source_url, use_proxy, client_auth, server_auth =
164159
match origin with
165160
| `remote ->
166161
let plugin = "accesstoken" in
167162
( Db.Repository.get_binary_url ~__context ~self
168163
, Some (Db.Repository.get_source_url ~__context ~self)
169164
, true
170-
, true
171165
, CdnTokenAuth {token_id; token; plugin}
172166
, DefaultAuth
173167
)
174168
| `bundle ->
175169
let uri =
176170
Uri.make ~scheme:"file" ~path:!Xapi_globs.bundle_repository_dir ()
177171
in
178-
(Uri.to_string uri, None, true, false, NoAuth, NoAuth)
172+
(Uri.to_string uri, None, false, NoAuth, NoAuth)
179173
| `remote_pool ->
180174
let cert = Db.Repository.get_certificate ~__context ~self in
181175
let repo_binary_url = Db.Repository.get_binary_url ~__context ~self in
@@ -215,7 +209,6 @@ let sync ~__context ~self ~token ~token_id ~username ~password =
215209
let plugin = "xapitoken" in
216210
( repo_binary_url
217211
, None
218-
, false
219212
, true
220213
, PoolExtHostAuth {xapi_token; plugin}
221214
, StunnelClientProxyAuth
@@ -230,7 +223,7 @@ let sync ~__context ~self ~token ~token_id ~username ~password =
230223
s
231224
in
232225
let write_initial_yum_config ~binary_url =
233-
write_yum_config ~source_url ~binary_url ~repo_gpgcheck ~gpgkey_path
226+
write_yum_config ~source_url ~binary_url ~repo_gpgcheck:true ~gpgkey_path
234227
~repo_name
235228
in
236229
Xapi_stdext_pervasives.Pervasiveext.finally

0 commit comments

Comments
 (0)