Permalink
Browse files

CP-4318: Handle v6d not running when creating software_version

Signed-off-by: John Else <john.else@citrix.com>
  • Loading branch information...
1 parent 07391fb commit 9f9d2c890e0ba94acc502367af1e1e0e4c099d66 @johnelse johnelse committed Mar 21, 2013
Showing with 10 additions and 2 deletions.
  1. +10 −2 ocaml/xapi/create_misc.ml
View
@@ -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;

0 comments on commit 9f9d2c8

Please sign in to comment.