Skip to content

Commit

Permalink
CA-395174: Try to unarchive VM's metrics when they aren't running
Browse files Browse the repository at this point in the history
Backport xen-api.git 71c39605b3a2dd6eddeba42a5b482b4fc1b3a4e8

Non-running VMs' metrics are stored in the coordinator. When the
coordinator is asked about the metrics try to unarchive them instead of
failing while trying to fetch the coordinator's IP address.

This needs to force the HTTP method of the query to be POST

Also returns a Service Unavailable when the host is marked as Broken.

Signed-off-by: Pau Ruiz Safont <[email protected]>
Signed-off-by: Christian Lindig <[email protected]>
  • Loading branch information
Christian Lindig committed Aug 13, 2024
1 parent 90f9e73 commit a57bf84
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions http-svr/http.ml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ let http_501_method_not_implemented ?(version = "1.0") () =
; "Cache-Control: no-cache, no-store"
]

let http_503_service_unavailable ?(version = "1.0") () =
[
Printf.sprintf "HTTP/%s 503 Service Unavailable" version
; "Connection: close"
; "Cache-Control: no-cache, no-store"
]

module Hdr = struct
let task_id = "task-id"

Expand Down
2 changes: 2 additions & 0 deletions http-svr/http.mli
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ val http_500_internal_server_error : ?version:string -> unit -> string list

val http_501_method_not_implemented : ?version:string -> unit -> string list

val http_503_service_unavailable : ?version:string -> unit -> string list

module Hdr : sig
val task_id : string
(** Header used for task id *)
Expand Down

0 comments on commit a57bf84

Please sign in to comment.