Skip to content

Commit

Permalink
CP-4318: Handle v6d not running when creating software_version
Browse files Browse the repository at this point in the history
Signed-off-by: John Else <john.else@citrix.com>
  • Loading branch information
johnelse committed Apr 3, 2013
1 parent 07391fb commit 9f9d2c8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ocaml/xapi/create_misc.ml
Expand Up @@ -381,9 +381,17 @@ let make_packs_info () =
let make_software_version () =
let option_to_list k o = match o with None -> [] | Some x -> [ k, x ] in
let info = read_localhost_info () in
let v6_version = V6client.get_version "make_software_version" in
let v6_version =
(* Best-effort attempt to read the date-based version from v6d *)
try
match V6client.get_version "make_software_version" with
| "" -> []
| dbv -> ["dbv", dbv]
with Api_errors.Server_error (code, []) when code = Api_errors.v6d_failure ->
[]
in
Xapi_globs.software_version @
(if v6_version = "" then [] else ["dbv", v6_version]) @
v6_version @
[
"xapi", get_xapi_verstring ();
"xen", info.xen_verstring;
Expand Down

0 comments on commit 9f9d2c8

Please sign in to comment.