# HG changeset patch # User David Scott # Date 1271091324 -3600 # Node ID 64de42caeba1ba515ef948d201c85269a0857d5a # Parent c2ba03f407d05b94ea883eb5dee68be9f24a72bc CA-40149: invalidate the local cache of hostname on Host.set_hostname_live Signed-off-by: David Scott diff -r c2ba03f407d0 -r 64de42caeba1 ocaml/xapi/xapi_host.ml --- a/ocaml/xapi/xapi_host.ml Mon Apr 12 14:44:41 2010 +0100 +++ b/ocaml/xapi/xapi_host.ml Mon Apr 12 17:55:24 2010 +0100 @@ -864,6 +864,7 @@ if is_invalid_hostname hostname then raise (Api_errors.Server_error (Api_errors.host_name_invalid, [ "hostname contains invalid characters" ])); ignore(Forkhelpers.execute_command_get_output "/opt/xensource/libexec/set-hostname" [hostname]); + Debug.invalidate_hostname_cache (); Db.Host.set_hostname ~__context ~self:host ~value:hostname )