Skip to content

Commit

Permalink
CP-49526: Resolve non-CDN design comments
Browse files Browse the repository at this point in the history
1 Change the max total bundle files size limit to 1G.
2 Change HTTP error code for `bundle_repo_not_enabled` to 400.

Signed-off-by: Bengang Yuan <bengang.yuan@cloud.com>
  • Loading branch information
BengangY committed Aug 2, 2024
1 parent 5c68118 commit 77333ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ocaml/xapi/xapi_globs.ml
Original file line number Diff line number Diff line change
Expand Up @@ -957,8 +957,8 @@ let ignore_vtpm_unimplemented = ref false

let evacuation_batch_size = ref 10

(* Max size limit of bundle file: 500 MB*)
let bundle_max_size_limit = ref (Int64.of_int (500 * 1024 * 1024))
(* Max size limit of bundle file: 1 GB*)
let bundle_max_size_limit = ref (Int64.of_int (1024 * 1024 * 1024))

type xapi_globs_spec =
| Float of float ref
Expand Down
5 changes: 4 additions & 1 deletion ocaml/xapi/xapi_pool.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3806,5 +3806,8 @@ let put_bundle_handler (req : Request.t) s _ =
Http_svr.headers s (Http.http_400_badrequest ())
)
| `remote ->
raise Api_errors.(Server_error (bundle_repo_not_enabled, []))
error "%s: Bundle repo is not enabled" __FUNCTION__ ;
TaskHelper.failed ~__context
Api_errors.(Server_error (bundle_repo_not_enabled, [])) ;
Http_svr.headers s (Http.http_400_badrequest ())
)

0 comments on commit 77333ee

Please sign in to comment.